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: JohnF
Subject: Re: .emacs to keep cursor stationary when scrolling with mouse
Date: Sat, 30 May 2015 03:43:21 +0000 (UTC)
User-agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (NetBSD/6.1.5 (i386))

Jorge A. Alfaro-Murillo <jorge.alfaro-murillo@yale.edu> wrote:
> 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.

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.
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.

> 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,

-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )


reply via email to

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