[Top][All Lists]

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

Re: Setting point

From: Stefan Monnier
Subject: Re: Setting point
Date: Fri, 13 Apr 2018 18:14:29 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>>>> That's switch-to-buffer-preserve-window-point in action.
>>> Ah, thanks.  Even if there's no window displaying the buffer?
>>> I guess Gnus will have to bind that variable before manipulating point
>>> in the *Group* buffer...
>> That variable takes effect when the buffer is displayed, not when its
>> point is moved.
>> So you should probably set it buffer-locally instead.
> Hm...  But I don't really want to interfere permanently with any user
> settings:

I believe you do, tho only for a particular circumstance.

> I just want to move the point in the *Group* buffer the way it
> used to move before whatever was introduced recently (i.e., during the
> past ten years :-)).

What you describe is called "interfere with user settings".

switch-to-buffer-preserve-window-point was introduced mainly so that if
you have a buffer displayed in 2 windows or more, switching to some
other buffer and back will get you to the original point instead of
moving you to one of the points of one of the other windows displaying
that buffer.

That seems to be fundamentally incompatible with your desire to move
point programmatically while the buffer is not displayed.

BTW, I'm not sure exactly what is the circumstance where you want Gnus
to do that, but maybe a better solution is to move point at another
moment, i.e. either before *Group* is un-displayed, or after *Group* is
re-displayed.  E.g. instead of moving point to the next group when
I leave a group, Gnus could move point to the next group just before
entering the group (at which point *Group* is still displayed).


reply via email to

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