GNU bug report logs - #33458
27.0.50; dired loses position when reverted from outside place

Previous Next

Package: emacs;

Reported by: v88m <at> posteo.net

Date: Wed, 21 Nov 2018 20:46:01 UTC

Severity: minor

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.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: v88m <at> posteo.net
Cc: 33458 <at> debbugs.gnu.org
Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place
Date: Thu, 22 Nov 2018 10:38:32 +0100
On Thu, 22 Nov 2018 12:07:04 +0300 v88m <at> posteo.net wrote:

> Thanks,
>
> On Wed, Nov 21 2018, Stephen Berman wrote:
>
>> I assume you used `C-x b' (switch-to-buffer) to switch back.
>
> No, just close DIR-B buffer or do M-: (previous-buffer).

Ah, ok, didn't think of those.

>> If so, this happens because dired-revert erases and then repopulates
>> the buffer it's called on, which relocates the markers used by
>> switch-to-buffer to find window-point when
>> switch-to-buffer-preserve-window-point is t, which is it by default
>> since Emacs 26.  If you set that variable to nil, point will be where
>> you expected after `C-x b'.
>
> Now it works for `C-x b' but not for M-: (previous-buffer) of closing
> DIR-B buffer. Point still lost.

Hmm...

>> Alternatively, if you use `C-x d' (i.e. M-x dired) to return to the
>> DIR-A buffer, point will be where you expected (even if
>> switch-to-buffer-preserve-window-point is t).
>
> Yes, it does, but more consistent behavior needed.

I agree.

>> See bug#27243,
>> https://lists.gnu.org/archive/html/bug-gnu-emacs/2017-06/msg00147.html
>
> Good explanation, but your patches seems outdated and doesn't work for
> me either.

It seems it's necessary to go back and look at the issue again, taking
your cases into account.  I don't have time to do that now, but will try
to when I can; maybe someone else will find a fix sooner.

Steve Berman




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

Previous Next


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