Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|improve this question

migrated from 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: Can you give us a picture? – Cheeso May 23 '11 at 13:02
up vote 8 down vote accepted

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

*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.

share|improve this answer
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

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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