unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#5717: 23.1; auto-revert-mode loses point in dired buffers
@ 2010-03-14  7:34 flat0103
  2010-03-14 21:55 ` Juri Linkov
  0 siblings, 1 reply; 3+ messages in thread
From: flat0103 @ 2010-03-14  7:34 UTC (permalink / raw)
  To: 5717

In dired buffers, auto-revert-mode will cause the location of point to change to point-min whenever a change occurs.  It seems much better to keep current point; this may not always be the same cursor location, but will be correct much more often.

Patch follows:

diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index 81d9fbf..697507f 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -478,6 +478,8 @@ This is an internal function used by Auto-Revert Mode."
 	  (when eob (goto-char (point-max)))
 	  (dolist (window eoblist)
 	    (set-window-point window (point-max)))))
+      (unless eoblist
+        (goto-char (point)))
       ;; `preserve-modes' avoids changing the (minor) modes.  But we
       ;; do want to reset the mode for VC, so we do it manually.
       (when (or revert auto-revert-check-vc-info)








^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-11 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-14  7:34 bug#5717: 23.1; auto-revert-mode loses point in dired buffers flat0103
2010-03-14 21:55 ` Juri Linkov
2011-07-11 21:37   ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).