1

In .org files—I've seen it only in a file with over 1k lines—emacs sometimes displays a secondary "line number" next to certain headings, like so:

screenshot

The left-most gutter is populated by linum+, but the digit 8 on line 7 is what confuses me. The heading has no contents, just an empty line (line 8).

I believe the extra / floating digit gives the final line number of the collapsed heading...but what caused the number to show up in the first place? What mode is this coming from? Why doesn't it happen to all headings?

And so on. Thanks!

  • Does your problem go away if you use the built-in linum-mode, without modifications such as linum+? How about trying nlinum-mode written by Stefan, instead of using the built-in linum-mode? Where did you get your linum+? – lawlist Aug 27 '16 at 23:21
  • As it turns out, I actually am using built-in linum-mode, not linum+ after all... – Henry Aug 28 '16 at 14:23
  • Other than using nlinum-mode by Stefan, you may wish to try manually evaluating (linum-update-current) and see if that makes the visual glitch go away. If it does, then consider figuring out where and when to make those additional calls. I disable a custom modified version of linum-mode in buffers with a lot of code-folding going on (such as org-mode buffers), because it creates a significant slow-down in performance. Long buffers also will result in slow-down due to the function count-lines. There are workarounds, but they are beyond the scope of this thread. – lawlist Aug 28 '16 at 16:27
  • Switching to nlinum-mode solves the issue. Thanks for your help! – Henry Aug 29 '16 at 14:22

Your Answer

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

Browse other questions tagged or ask your own question.