GNU bug report logs - #27243
dired-auto-revert-buffer jumps point to beginning of buffer

Previous Next

Package: emacs;

Reported by: Antoine Levitt <antoine.levitt <at> gmail.com>

Date: Sun, 4 Jun 2017 23:46:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>, antoine.levitt <at> gmail.com, monnier <at> IRO.UMontreal.CA, 27243 <at> debbugs.gnu.org
Subject: bug#27243: another case: dired-auto-revert-buffer jumps point to beginning of buffer
Date: Mon, 25 May 2020 09:26:38 +0200
On Mon, 25 May 2020 05:51:07 +0200 Michael Heerdegen <michael_heerdegen <at> web.de> wrote:

> Stephen Berman <stephen.berman <at> gmx.net> writes:
>
>> > As long as the current behavior doesn't change, it's fine with me.
>>
>> I pushed the fix to master (8e394b082b).
>
> This broke a different use case for me.
>
> I'm using switch-to-buffer-preserve-window-point > t and
> dired-auto-revert-buffer > nil.
>
> Say I have a frame showing the same dired buffer twice, with different
> values of point, in two windows.  When I hit ^ and then RET in
> succession in the first window, I'm back in that buffer but point now
> equals window-point of the second window.  Emacs failed to restore the
> correct value of point.  If I revert this commit which replaced
> `switch-to-buffer' with `pop-to-buffer-same-window' in `find-file', the
> correct value of point is restored as expected.
> `pop-to-buffer-same-window' probably doesn't care about
> `switch-to-buffer-preserve-window-point' at all?

Is this with -Q?  I don't see this with -Q in a build from (not current
but recent) master.  I tried to reproduce what you described as follows:

1. emacs -Q
2. M-: switch-to-buffer-preserve-window-point RET => t
   M-: dired-auto-revert-buffer RET => nil
3. C-x d RET M-: (point) => 211
4. C-x 2 C-x o 10 n M-: (point) => 890
5. C-x o ^ RET M-: (point) => 211
also: 6. C-x o ^ RET M-: (point) => 890

If Emacs behaves as you described, the result in step 5 should have been
890, or have I misunderstood you?

Steve Berman




This bug report was last modified 4 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.