Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make Emacs mouse scrolling slower and smoother?

When I scroll in Emacs using mouse wheel, it scrolls 5 lines at a time, which, I think, is way too much - where do I set a new value?

Also, when I scroll in Emacs with a mouse (either wheel or scrollbar), the cursor jumps to stay inside the visible screen area - is there a way to override that behavior, making it staying on the line it was on, even when it goes out of screen? In other words, I don't want the position where newly typed symbols appear changed by the scrolling.

Any alternative suggestion on how I could peek into some remote section of code and then quickly return to the former position is also welcome.

like image 918
Headcrab Avatar asked Jan 15 '09 06:01

Headcrab


People also ask

How do I make my mouse scroll smoother?

Scrape off the notches from the wheel. I suggest holding the blade against the notched wheel at a 90° angle to the notches you would like to remove and spinning the wheel with your other hand. Continue until there are no more notches and the wheel is smooth.

How do I slow down my mouse scroll?

In the search box, type mouse, and then click Mouse. Click the Pointer Options tab, and then do any of the following: To change the speed at which the mouse pointer moves, under Motion, move the Select a pointer speed slider toward Slow or Fast.

How do I scroll faster in Emacs?

You can use a higher number after shift for fast scrolling when the shift key is pressed.

Why is my mouse not scrolling smoothly?

Replace the batteries. If you're using a wireless mouse, low battery power is the most common cause of strange mouse behavior. Whether the mouse wheel isn't scrolling or the mouse is otherwise acting erratically, swapping the batteries is a very quick and inexpensive way to rule out this cause.


2 Answers

You can control the amount in variable mouse-wheel-scroll-amount (in mwheel.el).

EDIT: E.g. Add (setq mouse-wheel-scroll-amount '(1 ((shift) . 1) ((control) . nil))) to your .emacs for 1 line at a time.

I also have (setq mouse-wheel-progressive-speed nil) in my .emacs which I think is nicer behaviour.

like image 126
luapyad Avatar answered Oct 05 '22 16:10

luapyad


I use breadcrumb to leave a trail around a buffer or all buffers.

Drop the breadcrumb, go look at whatever you want/need, then jump back to the breadcrumb. Here's what I have things set to, FWIW:

(global-set-key [(f6)] 'bc-set) (global-set-key [(shift f6)] 'bc-list) (global-set-key [(control f6)] 'bc-previous) (global-set-key [(meta f6)] 'bc-next) (global-set-key [(shift control f6)] 'bc-local-previous) (global-set-key [(shift meta f6)] 'bc-local-next) 

Hope that helps.

like image 32
Joe Casadonte Avatar answered Oct 05 '22 16:10

Joe Casadonte