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!

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

2 Answers 2


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.

  • Yes, that is in fact the problem. Thank you so much!
    – Anonymous
    May 23, 2011 at 13:16
  • I never knew that, I've just lived with it. For years. Thanks!
    – Anonymous
    May 23, 2011 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .