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.

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
172 views

(progn (scroll-up 1) (goto-char 0)) is different from (scroll-up 1) then (goto-char 0)

In any buffer, try to eval-expression the expression (scroll-up 1) and then eval (goto-char 0). The window scrolls up, then point is moved to the beginning of the buffer. Now, try eval-ing (progn (...
4
votes
2answers
1k views

Terminal Emacs not receiving <wheel-up> or <wheel-down>?

From what I understand, I should be able to get mouse scrolling to work in emacs nox mode with the following: (require 'mouse) (xterm-mouse-mode t) (mouse-wheel-mode t) (global-set-key (kbd "<...
4
votes
0answers
184 views

How to actually scroll with popup-tip :scroll-bar t?

Following this blog post, I am interested in using popup.el for my own purposes. In the post, he mentions to add a scroll bar with the :scroll-bar argument. If I include the :scroll-bar t option in ...
3
votes
0answers
74 views

Hook variable for horizontal scrolling

There is the hook variable window-scroll-functions for functions to be called before redisplay after vertical scrolling. Is there a similar variable for horizontal scrolling?
3
votes
0answers
59 views

Synchronised scrolling of HTML file and eww buffer

I am editing a HTML file. I have done C-x 3. Now, in the other split window, I want to open a browser, such as eww. And as I move in the HTML file, I want the browser window to show the ...
3
votes
0answers
373 views

Scrolling in tmux in emacs

I'm using emacs to run ansi-term with an ssh'ed tmux inside. I can scroll using my prefix C-b + [ as per this thread, but I would like to be able to scroll with the mouse immediately. This seems to ...
3
votes
0answers
926 views

fast moving cursor?

What can I add to my .emacs to make the cursor move more quickly? Specifically, I'm looking for faster rates for (holding arrow-keys and C-arrow keys (ie skipping over whitespace with my current ...
2
votes
0answers
65 views

“Negative” scrolling, or: actually recentering first line

Usually, there's some extra "virtual" space shown at the bottom of a buffer, which makes the visual appearance of a file longer than it actually is. This is quite convenient, e.g., if you're trying ...
2
votes
0answers
140 views

Horizontal Scroll Wheel on Mouseover Buffer

My mouse has a horizontal scroll function, where I can tap the scroll wheel left and right to scroll horizontally. By default, it seems Emacs does nothing with that. The scroll wheel produces <...
2
votes
0answers
89 views

Is it possible to use the mouse wheel for company mode?

I'm using the Cocoa version of Emacs. When company mode presents a list of completions you can use the mouse to select one. It would seem natural to be able to use the mouse wheel to scroll through ...
1
vote
0answers
31 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
0answers
13 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 &...
1
vote
0answers
48 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-...
1
vote
0answers
152 views

org-mode and insert-sliced-image

I read in the Emacs manual online about using insert-sliced-image to create smooth scrolling with inline images. I would like to use this to override org-toggle-inline-images, so that I can get ...
1
vote
0answers
85 views

Tabbar scrolling jumps back

I am using tabbar and some settings for smooth scrolling which seem to conflict with each other in a weird way. Here is a minimal init.el file: (package-initialize) (setq mouse-wheel-scroll-amount '(...
1
vote
0answers
2k views

Set scroll-amount for mouse wheel in .emacs

What I've tried in .emacs (note: I don't know elisp, and just tried cobbling this stuff together from googling and from other people's stuff) is (mouse-wheel-mode 't) ;;; mouse-wheel enabled (setq ...
1
vote
0answers
2k views

mouse-wheel-follow-mouse for horizontal scrolling?

I like having mouse-wheel-follow-mouse set to non-nil, so I can use the trackpad to scroll an inactive window. Unfortunately, it doesn't apply to horizontal scrolling, so if I try to scroll an ...
1
vote
0answers
118 views

How can I prevent a setting in init.el from being overridden during startup?

Using emacs-mac-port, and I'm trying to configure horizontal scrolling with the trackpad. The following expressions work if I execute them manually via eval-last-sexp, (global-set-key [wheel-right] (...
1
vote
0answers
644 views

scroll-preserve-screen-position causes cursor to move forward one character at screen boundary

I am using (setq scroll-preserve-screen-position t) as suggested at https://superuser.com/a/184421/39697, and it works well, except for me, when I scroll at the top of the screen using scroll-up-line,...
0
votes
1answer
12 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 ...
0
votes
0answers
30 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-...
0
votes
0answers
70 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
0answers
73 views

disable automatic python file scrolling if using blacken or yapfify

I am using blacken to automatically format my python files (use-package blacken :demand t :after python :init (add-hook 'python-mode-hook 'blacken-mode) ) (use-package python :mode ("\\.py\\'" ...
0
votes
0answers
39 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 ...
0
votes
0answers
155 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 ...
0
votes
0answers
222 views

Horizontal Scroll Bar Mode with trackpad

How can I use my trackpad to scroll left and right, when in horizontal-scroll-bar-mode? I am running GNU Emacs 25.3.3 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) of 2017-09-28. ...
0
votes
0answers
326 views

How to scroll down/up by one full screen?

Is there a way to scroll down/up by one full screen? My keyboard doesn't have special purpose keys for this function. In other words, is there a single command that is equivalent to the following ...
0
votes
0answers
40 views

Synchronizing the units in which horizontal scrolling is measured with buffer columns

The problem I am trying to solve is determining how many columns of the current buffer are hidden due to horizontal scrolling. The documentation states: The horizontal scroll position is measured ...
0
votes
0answers
80 views

how to debug who move cursor

I have very annoying problem, after I run M-x compile time to time cursor jump from middle of buffer to the first line. I want to find out culprit (I found mode who responsible for this, but I want ...
0
votes
0answers
27 views

Adjust scrolling after font increase/decrease

After text-scale-decrease or text-scale-increase scrolling (e.g. with space, scroll-down) does not seem to take the text scaling into account. Is there a way to adjust the scroll commands to reflect ...