Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
392 views

After change from Ubuntu to Lubuntu the mouse wheel (scroll) doesn't work without pressing CTRL together

When I try to scroll with mouse I receive a message saying Wrong type argument: commandp, mouse-5 or Wrong type argument: commandp, mouse-4. This happens after I tried a lot of random fixes. Before ...
Felipe's user avatar
  • 241
0 votes
2 answers
569 views

How to change line COUNT for for evil-scroll-up

How to change line COUNT with C-u or C-d for evil-scroll-up or evil-scroll-down? From Spacemacs help: C-u (evil-scroll-up COUNT) C-d (evil-scroll-down COUNT) If COUNT is not specified the function ...
wolfv's user avatar
  • 1,393
0 votes
1 answer
294 views

Line numbers break scroll margin

I'm trying to set a scroll margin to emacs with the scroll-margin variable, but I've noticed that when you do that and you have display-line-numbers-mode enabled, the scrolling doesn't work properly ...
Jesse's user avatar
  • 1,994
5 votes
1 answer
1k views

Automatically scroll *compilation* window, beside source-buffer window

I edit C in two windows side-by-side, source on left, compilation results on right. I have F5 bound to recompile. Currently I have to do: F5 to run make, Move to *compilation* buffer in right ...
Scotsgeek's user avatar
1 vote
0 answers
129 views

cannot rebind M-p [closed]

I try to customize the scrolling experience within Emacs and for that rebound M-n and M-p to a new functionality, namely (global-set-key "\M-n" "\C-u20\C-v") (global-set-key "\M-p" "\C-u20\M-v") ...
CD86's user avatar
  • 573
2 votes
0 answers
76 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 ...
phipsgabler's user avatar
4 votes
2 answers
2k views

Is there a way to increase speed of scrolling when holding down C-n/C-p/C-f/C-b?

Title is basically the question. If I hold down C-n, C-p, etc., for a second or two, the speed at which it scrolls is too slow for my liking. Is there a way to make it scroll faster if I hold one of ...
user4601931's user avatar
2 votes
1 answer
320 views

Execute function when (after) window scrolls

I need to execute a function every time a window scrolls. I mean the function to be executed at point "after" the window has been scrolled (with C-v, M-v or with the <down> key). I tried: (add-...
Gabriele's user avatar
  • 1,642
7 votes
2 answers
6k views

Smooth scrolling by pixel-lines

With GNU Emacs 26.1 installing either smooth scroll while adding (require 'smooth-scroll) (smooth-scroll-mode t) to my .emacs, or smooth scrolling with (require 'smooth-scrolling) (smooth-...
Calaf's user avatar
  • 483
1 vote
2 answers
285 views

Scroll vertically while keeping horizontal position

I'm viewing a file containing visually aligned columns in truncate line mode, and would like to scroll vertically without changing my horizontal scroll position. But scroll-down always moves the ...
Dov Grobgeld's user avatar
1 vote
1 answer
233 views

In-sync editing the same file in two frames

For a lecture, I'll have a setup with two frames (one on my notebooks's screen, the other on the projector) showing the same file. When editing the file in the "master" frame I need the "slave" frame ...
Tom's user avatar
  • 23
1 vote
2 answers
441 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. ...
Adam's user avatar
  • 1,907
6 votes
1 answer
2k views

can scrolling be smoother than single line in emacs/org-mode?

Using the trackpad, the scrolling in emacs/spacemacs is notably less smooth than in modern browsers and other editors. I have to confess that this jerkiness irks me more than I would prefer but I have ...
Willy Tanner's user avatar
10 votes
4 answers
2k views

How to autoscroll a window to always show the end of a growing buffer?

Context: I have a window that shows the output of a shell command. As new lines are added, I'd like the window to always show the most recent lines. Example: (let ((temp-window (or (get-buffer-...
tmalsburg's user avatar
  • 2,570
0 votes
1 answer
138 views

Cursor position variable

Here's my function: (defun scroller-down () "Scrolling down conditional for buffer and minibuffer." (interactive) (if (active-minibuffer-window) (ivy-scroll-down-command) (scroll-down-...
John DeBord's user avatar
2 votes
2 answers
478 views

Scroll only current line when truncating lines

When using (set-default 'truncate-lines t), and when moving to the end of the long line, is it possible to make Emacs scroll only that line, while the other lines stand still? nano does this.
forthrin's user avatar
  • 451
5 votes
1 answer
216 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 (...
jcarpenter2's user avatar
5 votes
1 answer
979 views

How do I make a buffer automatically scroll to its end?

I have a buffer in which the pressed keys echo, and I want the cursor in it always be at the very end. How can I accomplish this?
HappyFace's user avatar
  • 830
1 vote
1 answer
236 views

Align lines of two separate files in two split-windows?

Is there a way to align line numbers of separate buffers, one in each split window?
Geremia's user avatar
  • 171
1 vote
0 answers
372 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 ...
Adam's user avatar
  • 1,907
3 votes
0 answers
83 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?
Tobias's user avatar
  • 33.3k
3 votes
0 answers
86 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 ...
deshmukh's user avatar
  • 1,912
6 votes
1 answer
2k views

emulation of scroll-off?

Vim has an option called scrolloff (e.g. set scrolloff=7) which automatically scrolls down or up to keep the cursor/point from getting within a certain distance of the top or bottom of the window. Is ...
Greg Nisbet's user avatar
1 vote
0 answers
804 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 ...
Evan Aad's user avatar
  • 1,551
2 votes
1 answer
433 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 ...
jcarpenter2's user avatar
3 votes
2 answers
220 views

Using ggtags tag lookup along with centered-cursor-mode

I am using centered-cursor-mode to center the cursor at 10 lines above center at all times. I am trying to have ggtags respects this setup after each tag lookup. When I have the cursor at any point ...
SFbay007's user avatar
  • 584
0 votes
0 answers
43 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 ...
AlwaysLearning's user avatar
6 votes
2 answers
428 views

How to scroll while using multiple cursor?

I use a lot multiple cursor and sometimes I have to select some words which are off the screen, in sublime text I do not encounter any problem, I can just scroll and continue selecting words. This, ...
Nisba's user avatar
  • 905
1 vote
0 answers
139 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 ...
fghj's user avatar
  • 193
3 votes
1 answer
430 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 <...
Silvio Mayolo's user avatar
1 vote
1 answer
733 views

Is there a package for moving screen instead of cursor?

I am using emacs for a few months now and it is going ok. I want to know if there is a package out there which can help me move the screen instead of my cursor. For example, if I move one line down(...
harsh atal's user avatar
1 vote
0 answers
115 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 '(...
Pavel Galashin's user avatar
1 vote
1 answer
823 views

graphical emacs on windows - scrolling slow

I am using emacs 25.1, the "official" minGW build, on Windows 7. Opening a very simple text file, even with emacs -Q, leads to slow scrolling. Hit PgUp/Down and it takes time. This happens when I ...
D Strozzi's user avatar
  • 101
3 votes
1 answer
167 views

How to vertically center when opening a file:line from emacsclient?

Is there a way to center the vertical scroll position when using emacs client to open a file at a position? eg: emacsclient +$NUM:$COL $FILE --no-wait --alternate-editor=emacs Is it possible to ...
ideasman42's user avatar
  • 8,846
6 votes
2 answers
395 views

How to prevent org-mode from repositioning text in the window when cycling visibility?

In org-mode, when I cycle through the visibility of the document via the TAB key (org-cycle), the text sometimes gets repositioned. If there is enough text below the headline such that it will not ...
faulty_ram_sticks's user avatar
0 votes
2 answers
242 views

Disabling reusage of evil scroll count

If evil-scroll-line-down is not given a count argument, the last count is used. This is not the behaviour of vim, which scrolls one line if no count is specified. How can I get vim behaviour?
Toothrot's user avatar
  • 3,274
3 votes
1 answer
657 views

ansi-term scroll problem on fast output

I use a terminal from within Emacs via M-x RET ansi-term RET. The problem is that when I run a program which echoes a lot of output, ansi-term first scrolls with the output (such that the last line of ...
space_voyager's user avatar
1 vote
1 answer
460 views

Disable scroll inertia in Emacs for macOS (Sierra)

The title pretty much sums it up, I'd like to avoid that the scroll continues when I release the touchpad. Here's my custom variable about the mouse wheel behaviour: '(mouse-wheel-scroll-amount '(1 ((...
cYrus's user avatar
  • 222
2 votes
1 answer
281 views

on Mac, scroll-down or scroll-up don't move point to very top/bottom

I'm fairly new to the Mac, and I've started using Emacs. I've noticed that the scroll-down command, bound to Meta-v, works okay to scroll the visible portion of the buffer, except that it doesn't move ...
composerMike's user avatar
5 votes
4 answers
5k views

How can I scroll a half page on C-v and M-v?

I use Spacemacs, and for some time I've rebound C-v and M-v to spacemacs/scroll-half-page-down and spacemacs/scroll-half-page-up, respectively, to aid my understanding of the buffer as I move through ...
Violet's user avatar
  • 488
2 votes
0 answers
3k 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 ...
John Forkosh's user avatar
1 vote
0 answers
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 ...
ivan's user avatar
  • 1,948
2 votes
2 answers
502 views

Temporarily disable scrolling

Is there a way to temporarily disable scrolling in an emacs buffer? I would like to "lock" a particular line to be (say) the top of the displayed portion of the buffer, so that if I accidentally try ...
ShreevatsaR's user avatar
3 votes
1 answer
123 views

Can buffer boundaries be displayed at the top and bottom of windows?

I know that Emacs can display the buffer boundaries in the fringe, by displaying angles at the boundaries, and arrows where the buffer can be scrolled. Is there some way to display these boundaries, ...
amdt's user avatar
  • 96
5 votes
1 answer
180 views

How to get `window-end` when the window scrolls?

From the doc of window-end function: Even if update is non-nil, window-end does not attempt to scroll the display if point has moved off the screen, the way real redisplay would do. It does not ...
cutejumper's user avatar
3 votes
0 answers
473 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 ...
Hatshepsut's user avatar
0 votes
0 answers
33 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 ...
emacsomancer's user avatar
  • 1,041
5 votes
1 answer
1k views

How to recreate iA Writer-style typewriter scrolling in Emacs?

The popular Mac editor iA Writer (https://ia.net/writer/mac/) has many nifty features that I rather like. So far, I've been able to recreate the look and feel for the most part -- except for the ...
Hannu Rajaniemi's user avatar
3 votes
1 answer
187 views

More useful vertical scrolling in emacs

I am trying to compare two log files, side by side in two emacs buffers. The logfiles are similar in context, but some have extra debug inserted. This makes simple use of pgup/pgdown painful as things ...
Joey O's user avatar
  • 135
1 vote
2 answers
270 views

Why is my minibuffer scrolling and preventing me from seeing emacs asking me questions?

My new emacs is scrolling minibuffer text so that I can't see simple stuff, like when emacs asks if I want to save changes to a file before exiting. Doing this both in a mac window or in Terminal. ...
mkosma's user avatar
  • 113