[Top][All Lists]

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

Re: goto-char doesn't stick

From: Stefan Monnier
Subject: Re: goto-char doesn't stick
Date: Thu, 15 Jun 2017 09:24:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>>>> (progn
>>>> (set-buffer "z")
>>>> (goto-char LOCATION))
>> [...]
>>> It's a feature, new in Emacs 26.  If you don't like it, turn off
>>> switch-to-buffer-preserve-window-point.
>> Really?  Why would set-buffer+goto-char be affected by a variable named
>> switch-to-buffer-* ?
> The switch-to-buffer-preserve-window-point affects point when you
> switch to buffer "z" later.

I don't understand the scenario you have in mind.  If I do

    M-: (with-current-buffer "z" (goto-char (1+ (point))) (point))

repeatedly, when "z" is not displayed, I see an increasing sequence, so
the value of point is correctly preserved.

> No, I verified that it happens when "z" is not displayed in any window.

I wonder what's the difference between your test and mine.


reply via email to

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