Questions tagged [scrolling]
is for commands to move text up and down and sideways in a window. Scrolling forward moves the buffer text upwards and scrolling backward moves downwards. Horizontal scrolling moves the buffer text left or right. Emacs provides many functions, key bindings, and programming facilities for scrolling.
127
questions
1
vote
1
answer
29
views
recenter-top-bottom does not work in elisp code
I have below code in init.el, it calls recenter-top-bottom to scroll the current line(at the middle of screen) to top. If I run C-L it works fine, but below does not move the line to the top of the ...
0
votes
1
answer
43
views
Scroll Between Files Continuously in One Window
I am looking for a way to view multiple org files that are siblings in a directory, one after another, similar to the way you might scroll a feed of blog posts. For simplicity let's say I have an org ...
0
votes
1
answer
61
views
Is it possible to simultaneously scroll horizontaly two windows?
Emacs 27.1
If I want to simultaneously scroll vertically two windows I use
M-x scroll-all-mode
OK. But this scrolls windows vertically.
But I need to scroll both windows horizontally. Is it possible?
0
votes
0
answers
48
views
Doesn't automatically jump to different characters in both buffers
Emacs 27.1
I want to find differents between 2 buffers.
I use command ediff-buffers
Steps:
Type the n in the Ediff Control Panel
Again Type the n in the Ediff Control Panel
And because the line is ...
0
votes
0
answers
16
views
Setting `scroll-conservatively` to 101 causes `dired` buffer can not be recentered when revert
When I set scroll-conservatively to 101 as recommended from many scrolling packages. But I find that in a dired buffer containing many files, revert-buffer (g) will not recenter the point to center ...
1
vote
1
answer
46
views
`recenter` issue in `xref-go-back` when using `lsp-mode`
I have the below setting in my config as recommended by many scrolling packages like ultra-scroll-mac.
(setq scroll-conservatively 101)
The issue is, when using this config with lsp-mode, xref-go-...
0
votes
1
answer
136
views
Where is pixel-scroll-precision-use-momentum described in more detail?
Precision scrolling in Emacs 29 introduces several variables to control the momentum effect while scrolling.
Are these terms defined anywhere in more detail, possibly by using a formula or two to ...
0
votes
0
answers
12
views
Scroll margin in buffers list
Setting (setq smooth-scroll-margin 10) with the smooth-scrolling package enables the introduction of a scroll margin, which has the advantage of avoiding jumps when the cursor reaches the end of the ...
4
votes
2
answers
977
views
pixel-scroll-precision-mode has no effect
I've just updated to Emacs 29, but running (pixel-scroll-precision-mode 1), even with emacs -Q, doesn't have any visible effect for me. (default-value 'pixel-scroll-precision-mode) evaluates to t but ...
1
vote
0
answers
432
views
With pixel scroll precision enabled in Emacs 29.1 RC1, is the following code still required?
I have the following code in my Emacs configuration to enhance the default scrolling behavior:
(use-package mwheel
:ensure nil
:custom
(mouse-wheel-scroll-amount '(1 ((shift) . 1)))
(mouse-...
0
votes
0
answers
123
views
recenter'ing a window that does not display current-buffer
I am facing a recurring problem with recenter in Emacs. Sometimes, when I execute recenter, it doesn't work and I get the following message: recenter'ing a window that does not display current-buffer. ...
0
votes
1
answer
158
views
Sometimes broken scrolling in Emacs while using the touchpad
I am usually able to scroll in Emacs using both, scrolling with the keyboard keys and scrolling using the touchpad.
In order to achieve smooth scrolling line by line with a point in the center line of ...
0
votes
1
answer
66
views
How to continue scrolling up with point at top of the buffer?
While toying around with not functioning scroll-enhancing packages and scripts I have seen cases of scrolling down beyond the end of the buffer, but haven't seen scrolling up beyond the top of the ...
5
votes
0
answers
368
views
Why doesn't `scroll-margin` work? [Solved]
scroll-margin is 1 but Emacs still sometimes allows the cursor to stay at the 1st line of a window.
Follow these steps to reproduce it (or see the GIF below):
emacs -Q
In buffer *scratch*, C-x C-e:
...
1
vote
1
answer
363
views
Bug-free smooth scrolling for Emacs 29
I want Emacs to scroll on [up] and [down] cursor keys one line at a time.
I have already installed and checked out following packages:
smooth-scroll
smooth-scrolling
good-scroll
Only smooth-...
1
vote
1
answer
46
views
Why does other-window-for-scrolling ignores variable other-window-scroll-buffer?
According to the documentation of other-window-for-scrolling we should be able to specify the "other window" by setting the variable other-window-scroll-buffer:
other-window-for-scrolling ...
1
vote
1
answer
216
views
Make C-v and M-v smoother
Trying to mirror my neovim setup in emacs I haven't found a way to make C-v and M-v scroll smoothly, i.e., line by line. Most solutions I looked at improve mouse and point scrolling, but not the ...
1
vote
1
answer
140
views
A way to pin a header line when scrolling?
Is there a way to pin a line at the top of the window, so that it stays there when scrolling? I'm writing a log viewer in Emacs Lisp, and I display each record with the fields padded so that it ...
0
votes
1
answer
117
views
Is there a way to keep the *Messages* buffer scrolled to the bottom?
I like to watch the *Messages* buffer while I debug elisp code. However, I often have to manually scroll the buffer as it fills up to see new messages. Is there any way to keep the *Messages* buffer ...
0
votes
1
answer
695
views
How can I get horizontal scrolling in PDFview to work?
Problem description:
I am working on a small notebook and often find myself reading pdf's on half the screen, which is even smaller. Sometimes I would like to be able to zoom into a pdf a tiny bit ...
1
vote
1
answer
79
views
Is there a library to make `'evil-goto-mark` restore the screen position of the marker?
I use emacs and evil. If I set a marker using 'evil-set-marker, scroll elsewhere in the file, and then execute 'evil-goto-mark or 'evil-goto-mark-line, the window will scroll back until the position I’...
0
votes
1
answer
47
views
(evil-scroll-up COUNT) not working in Spacemacs
I am trying to make this shortcut work:
(global-set-key (kbd "<s-C-M-S-return>") '(evil-scroll-up 8))
But it is not working.
If I remove the COUNT:
(global-set-key (kbd "<s-C-...
1
vote
2
answers
90
views
How to show more of the buffer in the current window?
Sometimes I have the current buffer in the current window displayed sub-optimally: there is a lot of
buffer not shown, and there is a lot of empty space at the bottom below the EOB.
E.g.:
the buffer ...
2
votes
1
answer
113
views
How to disable ggtags' *ggtags-global* buffer scrolling?
when I do next-error, the *ggtags-global* buffer scrolls down one line.
I hope that the *ggtags-global* buffer doesn't scroll, whether it's executing next-error, previous-error, or compile-goto-error.
...
0
votes
0
answers
101
views
Buffer divider staggered upon split window and scroll
Whenever I split windows or scroll with a split window, the buffer dividers and text end up staggered horizontally.
Here is a screenshot of a file without the split window or issue shown.
And here is ...
0
votes
0
answers
59
views
Reset horizontal scroll after line motion
I currently satisfice by disabling auto-hscroll-mode, but I want it back.
I know you can make it hscroll only the current line by setting it to 'current-line. Doesn't fix the problem.
Problem: it's ...
0
votes
1
answer
454
views
Touchpad vertical scroll gesture scrolls too much lines in GUI on Windows 10
How can I change that? I probably need something like fractional scrolling?
Look at that video https://streamable.com/lfic9h
1
vote
1
answer
365
views
mwheel-scroll bindings between GUI and terminal?
Using an Emacs daemon (28, pgtk branch) switching between GUI and terminal, I can't get mouse scrolling to work on both. They work on each individually, but the issue is with the mouse-wheel-{up,down}-...
4
votes
2
answers
479
views
How to scroll to the beginning of the line in Emacs
I have buffer and I end up at 1616 column (I have one very long line, bug string). Is there a way to scroll the beginning of the line with a single commands. Is there a way to reset the buffer without ...
3
votes
1
answer
71
views
how to make `C-l` override `centered-cursor-mode`?
I love centered-cursor-mode. It keeps my cursor in the center of the screen always.
However, on rare occasions, I need to use C-l recenter-top-bottom to "scroll" in order to view text lower ...
3
votes
0
answers
470
views
Prevent Emacs from scrolling past the last line
Obviously Emacs never scrolls "above" the first line of the buffer. By contrast, it shows a bunch of empty space after the document if you scroll to the last line:
I want to make the bottom ...
2
votes
1
answer
108
views
How to distinguish a scroll from a change of buffer in a function called from ‘window-scroll-functions’?
I've written a function that recenters the point each time it makes a long jump and I added it to the hook window-scroll-functions. The length of the jump is determined by comparing the return value ...
1
vote
1
answer
213
views
How to make Isearch highlight more matches when I scroll?
upon having used Isearch or C-u C-s to highlight a word, when I use then C-v or M-v for scrolling the highlights remain due to setting
(setq-default
isearch-allow-scroll t
lazy-highlight-...
0
votes
0
answers
115
views
Scroll by visual line in `centered-cursor-mode`?
Mouse scrolling with visual-line-mode in centered-cursor-mode is jumpy as anything when you're writing prose. A single line of text can be 10 or more visual lines.
Editing in refill-mode or auto-fill-...
1
vote
0
answers
144
views
Emacs 27 scrolling issue
In Emacs 27, in -nw mode at least which is what I use, I've found an issue with scrolling.
If you open emacs to see two files at once: emacs -nw -q file1 file2, and then scroll down the left window ...
1
vote
0
answers
80
views
view-scroll-half-page-forward messes up scrolling
I have the following in my config
(setq scroll-preserve-screen-position 1)
;;scroll window up/down by one line
(global-set-key (kbd "s-n") (kbd "C-u 1 C-v"))
(global-set-key (kbd &...
0
votes
0
answers
451
views
Scrolling lag on Linux
Emacs scrolling is lagging for me on Linux but not on macOS. I'm using Ubuntu 20 and also tried Solus but behavior is the same. Faster system helps but not enough. What so special about emacs build on ...
0
votes
2
answers
898
views
How to get scrolling without jumps (by one line) in info mode?
I'm new to Emacs and trying to learn it using the built-in manuals (tutorial, manual and lisp intro).
I used (setq scroll-step 1) to avoid jumps in the normal mode, yet when viewing info - the scroll ...
1
vote
1
answer
52
views
How to customize scrolling for any action that moves the point?
Say I have an action that moves the point (adds 100 to it for example).
It should be possible to wrap this with a function or macro that gives additional behavior, eg:
(global-set-key (kbd "<...
0
votes
1
answer
44
views
Fractional vertical scrolling
I found this link About fractional verticle scrolling for emacs. However there was not any explanation about how to configure this for scrolling of normal files.
How do I configure a fractional scroll ...
3
votes
1
answer
400
views
Can page-down clamp the last line to the bottom of the window?
When using page-down (internally scroll-up-command), sometimes the window ends up in a state where end end-of-file is at the top of the screen.
Is there a way to page-down, clamping window position ...
2
votes
1
answer
249
views
How to get emacs to keep cursor in the middle of buffer during search?
(I am using Aquamacs 3.5 which is based on GNU Emacs 25.3.50.1, in case this matters.)
While searching (isearch-forward) in a buffer it often happens that I need to see some lines before/after the ...
0
votes
0
answers
120
views
mac-mwheel-scroll screws centered-positon-mode when using mouse pad on a macbook laptop
I am able to scroll using navigation buttons and external mouse on a Mac with this code that keeps the cursor at a specific line at all times.
I am using this code since it is much faster than ...
2
votes
1
answer
267
views
Linked, Split screen scrolling for a single buffer?
I would like to be able to have
a C-x 3 split to have two windows in a frame
both windows view a single buffer
window on left ends at line n
window on right starts at line n +/- configurable offset
...
1
vote
1
answer
1k
views
How to scroll using mouse while keeping cursor on same line/position?
I am using this minor mode to scroll and keep cursor on same line, mwheel-scroll however screws up the smooth scroll since it moves the cursor to a different line, scrolling return the cursor back to ...
0
votes
1
answer
114
views
How to disable a minor/major mode so that mwheel-scroll don’t take effect?
I am trying to have a simple solution to center the cursor at all times. I found that centered-cursor-mode was too slow and found this simpler solution.
The only problem is mouse scrolling no longer ...
1
vote
0
answers
196
views
scroll-preserve-screen-position screws up evil-scroll-down (C-d) in evil
centered-cursor-mode has been extremely sluggish so I found that this setup achieves the same without the slowness:
(setq scroll-preserve-screen-position t
scroll-conservatively 0
maximum-...
0
votes
0
answers
397
views
Why is scrolling line-by-line so much slower compared to vi-mode?
I was wondering if anyone has faced this issue before or is just me loosing my mind? It seems that C-n and C-p are so slow and sluggish compared to the j and k keys when using evil-mode. Is there any ...
1
vote
2
answers
123
views
How to prevent scroll up doing nothing when the value is too big?
When calling (scroll-up N) with a large value that would exceed the buffer length - nothing happens.
For example:
(global-set-key (kbd "<f4>") (lambda () (interactive) (scroll-up 10000)))
...
0
votes
1
answer
314
views
Possible to smooth scroll using pixel and line offsets?
I'm running into an odd problem scrolling by pixels, it seems calling scroll-up doesn't properly handle pixel scrolling (set-window-vscroll).
This is a simple test that attempts to scroll up by ...