[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27243: another case: dired-auto-revert-buffer jumps point to beginni
From: |
Stephen Berman |
Subject: |
bug#27243: another case: dired-auto-revert-buffer jumps point to beginning of buffer |
Date: |
Mon, 25 May 2020 09:26:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
On Mon, 25 May 2020 05:51:07 +0200 Michael Heerdegen <michael_heerdegen@web.de>
wrote:
> Stephen Berman <stephen.berman@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
bug#27243: another case: dired-auto-revert-buffer jumps point to beginning of buffer, martin rudalics, 2020/05/26