* Scrolling affects region... what to do?
@ 2005-04-18 23:43 David Reitter
0 siblings, 0 replies; 3+ messages in thread
From: David Reitter @ 2005-04-18 23:43 UTC (permalink / raw)
When a region (with several lines) is marked first and then the shown
part of the buffer is changed via the scrollbar or for example with
M-v, one boundary of the region will change to remain next to the
point, which moves to a new place when scrolling. Sometimes, the region
is heavily modified, with one boundary jumping by several paragraphs.
The region may become smaller or larger.
What's obviously happening is that the point comes along whenever one
scrolls somewhere, so that the region between mark and point will
change. This is entirely undesirable for me (and other Mac users) -
what can I do about it? Can I somehow make the point be independent of
the shown part of the buffer?
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Scrolling affects region... what to do?
[not found] <mailman.1920.1113867935.2895.help-gnu-emacs@gnu.org>
@ 2005-04-19 0:28 ` rgb
2005-04-19 3:39 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: rgb @ 2005-04-19 0:28 UTC (permalink / raw)
David Reitter wrote:
> When a region (with several lines) is marked first and then the shown
> part of the buffer is changed via the scrollbar or for example with
> M-v, one boundary of the region will change to remain next to the
> point, which moves to a new place when scrolling. Sometimes, the
region
> is heavily modified, with one boundary jumping by several paragraphs.
> The region may become smaller or larger.
>
> What's obviously happening is that the point comes along whenever one
> scrolls somewhere, so that the region between mark and point will
> change. This is entirely undesirable for me (and other Mac users) -
> what can I do about it? Can I somehow make the point be independent
of
> the shown part of the buffer?
>
This has long been a sore point (at least for me) with no relief
in sight. The best you can do is open another window or frame
onto the buffer being marked to take whatever excursions are
required. Narrowing is also an option under certain circumstances.
Even more rarely, you can use secondary selection which doesn't move
with point.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Scrolling affects region... what to do?
[not found] <mailman.1920.1113867935.2895.help-gnu-emacs@gnu.org>
2005-04-19 0:28 ` rgb
@ 2005-04-19 3:39 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2005-04-19 3:39 UTC (permalink / raw)
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-19 3:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 23:43 Scrolling affects region... what to do? David Reitter
[not found] <mailman.1920.1113867935.2895.help-gnu-emacs@gnu.org>
2005-04-19 0:28 ` rgb
2005-04-19 3:39 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).