Mac – Emacs line number

emacssearch-engines

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!

Best Answer

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.

Related Question