Subject: bug#5717: closed (Re: bug#5717: 23.1; auto-revert-mode loses point in dired buffers)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 11 Jul 2011 21:38:02 +0000

Your bug report

#5717: 23.1; auto-revert-mode loses point in dired buffers

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
5717: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5717
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5717: 23.1; auto-revert-mode loses point in dired buffers
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Mon, 11 Jul 2011 17:37:28 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

This bug is being closed because it could not be reproduced and there
was no response to a request for more information.
If you still see the problem with the latest Emacs release, 23.3,
please reply with the requested information and it can be reopened if needed.

You can view the whole report at http://debbugs.gnu.org/BUGNUMBER

Juri Linkov wrote:

> Recently we fixed `dired-revert' to keep window points.
> And now I can't reproduce your bug report with the latest code.
> `auto-revert-mode' keeps point in dired buffers.
>
> Could you provide more information: Emacs version number
> and step-by-step recipe with the latest code.

Subject: 23.1; auto-revert-mode loses point in dired buffers
From: [email-masked]
To: [email-masked]
Date: Sat, 13 Mar 2010 23:34:49 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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)