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: Sat, 30 May 2015 21:18:32 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

JohnF writes:
Thanks for terminology correction. Well, I do want to see the point, but, yes, very definitely, I want it to stay fixed when text scrolls. That is, keboard page up/down should scroll text and not move point. Ditto for mouse wheel scrolling and for mouse drag bar.

It is like that by default, except when the point gets out of view. I have never seen any mode that doesn't show the point in a window, which is basically what you need if I understand correctly, if someone knows about a mode that behaves like that it might be a good start to figure out how to do it.
My .emacs works fine for keyboard page up/down, but not for mouse. For keyboard arrow up/down, point should (of course) move one row, but shouldn't jump back towards center when it nears window top/bottom. And my .emacs already works for that, too. So no problem there. Just with mouse.
I know that is standard "modern" editor behavior, but why would you want that?

That's just my preference. Yours is apparently different, which is okay by me. I can no more "justify" my own editor preference than I can justify my favorite flavor ice cream (mocha almond crunch). The very first line of the gnu emacs page http://www.gnu.org/software/emacs/ says "GNU Emacs is an extensible, customizable text editor..." which sounds to me like they're very intentionally acknowledging the importance of accommodating different preferences for different people, rather than establishing their own personal preferences (whatever those happen to be) as the standard.

"It is your preference" is another way to say that you want it that way, I was just asking why, to see if there was another way to do what you want, for example, if it is to go to where you were before, there are better ways: pushing the mark, adding the point to the register, bookmarks, multiple windows and winner-mode, etc. That is why I wanted to know, I am not trying to establish my personal preferences, if I would be trying to establish my preferences I would have asked why do you need to use the mouse in the first place.

It just feels like the reason you want that is that you are used to that
behavior with other editors. You can certainly tweak emacs to do what
you want, but it will require quite a lot of effort and re-writing basic
functions of movement and display of the window, plus quite a bit of
knowledge of elisp. I just wanted to tell you that the fact that the
point moves with scrolling when it gets out of sight was one of the
things that striked me as a strange behavior when I started using emacs
a couple of years ago, but once I understood better how the region and
the mark work, that behavior made sense, especially when the region is
active.

--
Jorge.




reply via email to

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