Linked Questions

-1
votes
1answer
52 views

How to get line number for a given buffer position in a performant way?

I have list of buffer positions and I want to get the numbers of the lines at those positions. Is there a better way to do that then using with-current-buffer, goto-point and get-thing-at-point 'line? ...
0
votes
2answers
83 views

How to detect the number of lines scrolled from scroll up/down?

When running scroll-up or scroll-down, it's possible emacs isn't scrolling the number of lines requested (if you hit the start/end of the buffer for eg). Is there a convenient way to know how many ...
2
votes
1answer
207 views

get buffer scroll position and height (aka min and max on-screen buffer locations)

I'm interested in the region of a buffer that is visible on-screen. How do you get the current scroll position of a buffer? I.e. the line number of the topmost line in the viewable area? (Given ...
0
votes
0answers
174 views

Slow Emacs at editing elisp files

When editing .el files my Emacs is very slow. The larger the file, the worse it behaves, it is especially visible while scrolling or using autocompletion of any kind. It becomes pretty visibly slow at ...
1
vote
2answers
184 views

speed up sml-modeline, is this possible?

I really like the package sml-modeline (it is available on melpa): https://melpa.org/#/sml-modeline With it I replaced my vertical scrollbars. But when opening large text files like this Raspbian-...
2
votes
0answers
122 views

hide-show with linum

When working on huge files, it seems that when hide-show collapses a large multi-line block, linum still creates hidden overlays for every line in the hidden block leading to unresponsive emacs. Is ...
2
votes
1answer
419 views

How can I move by screen lines as quickly as forward-line?

next-line is very slow, and this is creating problems. I'll give some background then explain why. By default, linum.el treats a wrapped line as a single line, and it takes into account hidden lines ...
4
votes
1answer
568 views

Display max line in bottom line (nox) (aka mode-line)

How can I display the max line of a file in the bar at the bottom? So, how could it say "L1/L1300" instead of just "Top L1", if the respective happens to have 1300 lines?
5
votes
4answers
928 views

How can I delete specified lines?

I want to delete lines with number 03,08,13,18,...., 3+5n. How can I do that? Thank you very much.
6
votes
1answer
97 views

How to determine the line number of the first visible line of a window?

How to determine the line number of the first visible line of a window?
23
votes
1answer
2k views

What piece of code in Emacs makes `line-number-mode` print “??” as line number in buffers with long lines?

I'm using line-number-mode to have an indicator of the current line in my modeline, however for large files or rather, files with long lines, it starts displaying two question marks instead of a line ...