GNU bug report logs -
#33458
27.0.50; dired loses position when reverted from outside place
Previous Next
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
> Typo. Should be:
>
> M-: (previous-buffer) OR closing DIR-B buffer.
>
> Note: "closing" is `kill-buffer' or `bury-buffer'.
Aha. So after your
4. Let's check position: M-: (with-current-buffer "DIR-A" (point)) ;=> 225, so cursor in the right place.
evaluate
M-: (window-prev-buffers)
You should find your DIR-A together with two markers, the second of
them should be 225. Correct? Now do your
5. Revert original buffer: M-: (with-current-buffer "DIR-A" (dired-revert))
and evaluate
M-: (window-prev-buffers)
again. The second marker will be at 1 because reverting DIR-A just
nuked it.
The only solution I can think of is to have 'dired-restore-positions'
scan 'window-prev-buffers' for each window and if it finds the buffer
that was reverted there, update the associated point position to the
position of the buffer's point it calculated itself. If you want to
give it a try I can tell you everything you need to know.
A more generic solution might be wanted for other auto-revert clients
as well. But that's more hairy and not of much use for dired anyway.
martin
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.