help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .emacs to keep cursor stationary when scrolling with mouse


From: Jorge A. Alfaro-Murillo
Subject: Re: .emacs to keep cursor stationary when scrolling with mouse
Date: Fri, 29 May 2015 15:44:27 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

JohnF writes:

I'm pretty clueless about emacs lisp, and have tried to set up an .emacs that emulates dumb editor behavior. That works mostly the way I want, except that when running under X and scrolling text with mouse (both scrolling with mouse wheel and dragging the text bar on the window's right-hand side), the cursor still jumps around. It remains stationary when scrolling with keyboard arrow-up/down and keyboard page-up/down, which is what I want. But I can't get the cursor to remain stationary when scrolling with the mouse. How's that done??

I think that what you want is to not see the point (you call it cursor) in your screen and to keep the point always fixed. I know that is standard "modern" editor behavior, but why would you want that? In those editors when you scroll, the point remains where it was and when you type you miss what you were seeing because the screen goes back to where it was before you scrolled. If you want to edit the buffer in a different place that is irritating. Now if what you want is to browse the buffer in a different place you can do way better: split the window (C-x 2 or C-x 3) and scroll on the other one. Or if you do not want to split the window then push the mark (C-<space> C-<space>) browse what you want and then jump the mark (C-u C-<space>) that will get you to where you were before.

This also goes hand in hand with using the mark and the region, which is an integral part of emacs. Moving the point with the scroll is what you would expect if you are selecting a region.

Best,
--
Jorge.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]