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

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

Re: Scrolling affects region... what to do?


From: Stefan Monnier
Subject: Re: Scrolling affects region... what to do?
Date: Mon, 18 Apr 2005 23:39:15 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> what can I do about it? Can I somehow make the point be independent of the
> shown part of the buffer?

Not really, tho in theory everything's possible.
First you need to figure out whether you want to make point independent from
the displayed part of the buffer, or if you want to make point independent
from the region.

Then you need to come up with a way to try and implement that.

The second option can be done by redefining region-beginning and region-end,
and then go through a lot of code to change it so it uses
region-beginning/region-end instead of point/mark.  It's probably a lot of
work, but it should be fairly straightforward and you should be able to get
most of it accepted in the official Emacs (replacing point/mark with
region-beginning/region-end is normally harmless so it shouldn't be too
hard to get it accepted).

The first option is probably a bit more tricky, but maybe you can try and
get it working by adding some code to pre-command-hook that moves point
to the "display-independent position" and then a post-command-hook which
moves it back to the "displayed position".  This way you might be able to
decouple point from the displayed part of the buffer.


        Stefan


reply via email to

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