8

I am having problems obtaining a line number while within an emacs buffer. I have the following number in my initilization file: (setq line-number-display-limit 2000000), and I have verified that line number mode it turned on. When I first enter the (~500) line buffer, emacs provides me with a line number; however, it very quickly switched the line number reading to L??.

Any thoughts as to what could be wrong?

P.S. I have found searching for an answer to this problem nearly impossible as the key character string (L??) is seen by search engines as L(any character)(any character) -- does anybody know a way around this?

Any help will be much appreciated. Thanks in advance!

migrated from stackoverflow.com May 24 '11 at 12:33

This question came from our site for professional and enthusiast programmers.

  • Any errors/messages in *Messages*? – Anonymous May 23 '11 at 12:31
  • Do you mean this part: i.imgur.com/Augko.png Can you give us a picture? – Cheeso May 23 '11 at 13:02
8

Do you have very long (wide) lines? Have you seen line-number-display-limit-width ?

line-number-display-limit-width is a variable defined in `C source code'. Its value is 200

Documentation:
*Maximum line width (in characters) for line number display.
If the average length of the lines near point is bigger than this, then the
line number may be omitted from the mode line.

  • Yes, that is in fact the problem. Thank you so much! – Anonymous May 23 '11 at 13:16
  • I never knew that, I've just lived with it. For years. Thanks! – Anonymous May 23 '11 at 14:48
0

I had the same problem and setting line-number-display-limit-width solved it. I set it using 'customize' and 'Save for future sessions'. I thought that 'Save for future sessions' would include the 'Set for Current Session'. But that seems not to be the case. I had to quit and re-start emacs in order to make it take effect. That was in a GNU Emacs 22.3.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.