GNU bug report logs -
#4880
point moves in other dired windows
Previous Next
Reported by: Per Starbäck <per <at> starback.se>
Date: Fri, 6 Nov 2009 15:45:04 UTC
Severity: normal
Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Since other buffers of the same dir won't be reverted, then yes,
> there is no point in saving their points.
That looks good, thanks. Just one more thing:
> (defun dired-restore-positions (positions)
> "Restore POSITIONS saved with `dired-save-positions'."
> ! (let ((buf-file-pos (nth 0 positions)))
> ! (unless (and (nth 0 buf-file-pos)
> ! (dired-goto-file (nth 0 buf-file-pos)))
> ! (goto-char (nth 1 buf-file-pos))
> ! (dired-move-to-filename)))
> ! (dolist (win-file-pos (nth 1 positions))
> ! (with-selected-window (nth 0 win-file-pos)
> (unless (and (nth 1 win-file-pos)
> (dired-goto-file (nth 1 win-file-pos)))
> (goto-char (nth 2 win-file-pos))
In restore, we should check that the window's buffer is still "our
buffer". In some rare occasions, revert-buffer may cause some prompt or
other thing that may change some window's configuration, so better be
safe than sorry.
I know this is not a new problem in your code, but while we're here, can
you fix this other one as well (and then commit)?
Stefan
This bug report was last modified 15 years and 146 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.