Emacs line no. in status bar set to '??'
Asked Answered
D

1

8

I am having an issue in emacs (24) where occasionally the line no. in the status bar gets set to ??, e.g.

U:---   filename   All   (1000, 4)    (Conf[Unix])

switches to:

U:---   filename   All   (??, 4)    (Conf[Unix])

its a bit irritating and something I'd like to be able to prevent

Dint answered 18/7, 2014 at 9:3 Comment(1)
as an aside - how do you get 2 question marks (on their own) in a question title? it beats me!Dint
D
11

From the emacs documentation for line-number-mode:

"Line numbers do not appear for very large buffers and buffers with very long lines; see variables line-number-display-limit and line-number-display-limit-width."

If you set line-number-display-limit to nil, you should always see a line number.

Dwan answered 18/7, 2014 at 9:8 Comment(4)
well spotted, it does seem to occur when files get big - either length or width ways..Dint
Those limits are undoubtedly a performance measure, so you might not want to enforce this unnecessarily.Deice
@Deice yep, I have it set no nil and sometimes when viewing large files I have to wait for it to calculate the line number. I don't mind that though :)Dwan
possibly the use of linum-mode is more efficient for large files? I thought in some cases that this fix hadn't worked but I think I was just experiencing the latency mentioned due to the large file sizes i was dealing withDint

© 2022 - 2024 — McMap. All rights reserved.