From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: flat0103@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#5717: 23.1; auto-revert-mode loses point in dired buffers Date: Sat, 13 Mar 2010 23:34:49 -0800 Message-ID: <87mxybjqzq.fsf@nflath-laptop.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1268553319 3149 80.91.229.12 (14 Mar 2010 07:55:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 14 Mar 2010 07:55:19 +0000 (UTC) To: 5717@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Mar 14 08:55:15 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NqifJ-0002nB-VO for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Mar 2010 08:55:14 +0100 Original-Received: from localhost ([127.0.0.1]:53656 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqifH-0000U6-E2 for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Mar 2010 03:55:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nqiet-0000Tt-1z for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:54:47 -0400 Original-Received: from [140.186.70.92] (port=33204 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nqieo-0000TR-Mo for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:54:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nqien-0001J9-Ig for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:54:42 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36038) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nqien-0001J5-HA for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:54:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NqiMk-0007sQ-K2; Sun, 14 Mar 2010 03:36:02 -0400 X-Loop: bug-gnu-emacs@gnu.org Resent-From: flat0103@gmail.com Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Mar 2010 07:36:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-GNU-PR-Message: report 5717 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.126855211330260 (code B ref -1); Sun, 14 Mar 2010 07:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Mar 2010 07:35:13 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NqiLv-0007s1-1y for submit@debbugs.gnu.org; Sun, 14 Mar 2010 03:35:13 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NqiLr-0007rw-TA for submit@debbugs.gnu.org; Sun, 14 Mar 2010 03:35:10 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:52968) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NqiLo-0003NX-BZ for submit@debbugs.gnu.org; Sun, 14 Mar 2010 03:35:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NqiLn-0000sE-KF for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:35:03 -0400 Original-Received: from [140.186.70.92] (port=52955 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NqiLl-0000pY-PL for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:35:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NqiLk-0008Gi-0c for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:35:01 -0400 Original-Received: from mail-px0-f204.google.com ([209.85.216.204]:57407) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NqiLj-0008GY-SU for bug-gnu-emacs@gnu.org; Sun, 14 Mar 2010 03:34:59 -0400 Original-Received: by pxi42 with SMTP id 42so903001pxi.26 for ; Sat, 13 Mar 2010 23:34:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:date:message-id:to :subject; bh=NUl8gUMfAp+dcYVL9gTR2rI8uTJrGzbjA/iMkHRml5Y=; b=E5Ont1Cm2211RfqZT6Zh9utJYqvp/FDUnoc23gjnGKutYmBiGsPwyrjiZkMszZ7AuP pIcvW44K+2oLbAAdfHLsM36ZuBFAbGYWqdjMLPKNOnJRyw/dV7NOR4bVHhJX70Q9OXnQ mjHpY1YOawiv3U91+zlPAmCtAbgbpyRMg+rBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:message-id:to:subject; b=oQLytXMwdV7hr62cjNRKdmxUNcaTLrNYRxfb41/B5MZN5xZu4m14NbkFN/LQ6g8QY0 qVcp0aakBbCzy5aWW2kxFR8D00lScgAs2zDW4Za128A9AJbuYzoy+era3tCzN2J5ft1/ Ej2KeH/mxNGKG9uzLxNIExh4DtlLnm3+/3veI= Original-Received: by 10.114.187.19 with SMTP id k19mr519175waf.20.1268552098363; Sat, 13 Mar 2010 23:34:58 -0800 (PST) Original-Received: from nflath-laptop (c-67-170-87-148.hsd1.wa.comcast.net [67.170.87.148]) by mx.google.com with ESMTPS id 23sm3931404pzk.14.2010.03.13.23.34.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 13 Mar 2010 23:34:58 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 14 Mar 2010 03:36:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:35570 Archived-At: 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)