[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scroll without moving the point
From: |
Joe Corneli |
Subject: |
Re: scroll without moving the point |
Date: |
Tue, 29 Mar 2005 08:00:56 -0600 |
Is there a way to configure emacs in order that when I scroll (usually
with the mouse wheel), the point (the cursor position) stay at the same
position in the buffer, even if this point is not in the visible part
anymore? this could be usefull to see a matching parenthesis or the
beginning of a region, etc...
For finding a matching parenthesis, I'd recommend using `forward-sexp'
or `backward-sexp'. These commands should be bound to some convenient
keystroke, since they are just so useful.
In general, I think the answer is probably either "no" or "there's a
better way"... but using a trick I just learned from David Kastrup
here, how about C-SPC C-g <navigate to wherever you want>, then C-u
C-SPC (or alternatively C-x C-x), to return to where you set the mark?
(C-g is only inserted in this sequence to prevent the region from
being highlighted in `transient-mark-mode').
(Sorry that this advice has nothing to do with your mouse wheel, but
you could probably set things up to set/restore the mark etc. all with
the mouse - then you'd be totally set!)