Subject: bug#33458: 27.0.50; dired loses position when reverted from outside place

From: [email-masked]
Date: Thu, 22 Nov 2018 12:07:04 +0300

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).

> 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.

> 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.

> 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.

-- 
WBR, Yuri