From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Wells Newsgroups: gmane.emacs.bugs Subject: bug#457: wdired and auto-revert-mode Date: Mon, 04 Aug 2008 12:18:42 +0100 Message-ID: <86abftuiy5.fsf@macs.hw.ac.uk> References: Reply-To: Joe Wells , 457@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1217850515 16519 80.91.229.12 (4 Aug 2008 11:48:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Aug 2008 11:48:35 +0000 (UTC) Cc: michael_heerdegen@web.de, 457@emacsbugs.donarmstrong.com To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 04 13:49:25 2008 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.50) id 1KPyZ1-0003rr-RQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Aug 2008 13:49:24 +0200 Original-Received: from localhost ([127.0.0.1]:44242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPyY6-0001iH-W8 for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Aug 2008 07:48:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KPyXC-0001DQ-4M for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 07:47:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KPyXA-0001Cc-IM for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 07:47:28 -0400 Original-Received: from [199.232.76.173] (port=35189 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KPyX9-0001CM-Vr for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 07:47:28 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:55775) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KPyX7-0002jL-Oa for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 07:47:27 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m74BlMEJ003371; Mon, 4 Aug 2008 04:47:23 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m74BU3Gv030308; Mon, 4 Aug 2008 04:30:03 -0700 X-Loop: don@donarmstrong.com Resent-From: Joe Wells Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 04 Aug 2008 11:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 457 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 457-submit@emacsbugs.donarmstrong.com id=B457.121784880627593 (code B ref 457); Mon, 04 Aug 2008 11:30:03 +0000 Original-Received: (at 457) by emacsbugs.donarmstrong.com; 4 Aug 2008 11:20:06 +0000 Original-Received: from mail-r4.hw.ac.uk (mail-r.hw.ac.uk [137.195.101.219]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m74BK2M0027384 for <457@emacsbugs.donarmstrong.com>; Mon, 4 Aug 2008 04:20:04 -0700 Original-Received: from izanami.macs.hw.ac.uk ([137.195.13.6]) by mail-r.hw.ac.uk with esmtp (Exim 4.54) id 1KPy5L-0000Ur-PQ; Mon, 04 Aug 2008 12:18:43 +0100 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:46619 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1KPy5L-0003vh-IA; Mon, 04 Aug 2008 12:18:43 +0100 Original-Received: (nullmailer pid 5999 invoked by uid 1001); Mon, 04 Aug 2008 11:18:42 -0000 In-Reply-To: (martin rudalics's message of "Sun\, 03 Aug 2008 13\:45\:42 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-HW-MailScanner-Information: Please contact the HW Helpdesk for more information X-HW-MailScanner: Found to be clean X-HW-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5, autolearn=not spam) X-HW-MailScanner-From: jbw@macs.hw.ac.uk X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 04 Aug 2008 07:47:28 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:19005 Archived-At: martin rudalics writes: >> Changing to wdired should temporarily turn off `auto-revert-mode' if >> it was enabled in the corresponding dired buffer. It is very >> frustrating when the buffer reverts while editing file names. The correct way to handle this is to mark the buffer as modified during the period for which it should not be auto-reverted. The function auto-revert-handler refuses to do anything with buffers that are marked as modified. The first thing auto-revert-handler does is check the condition (buffer-modified-p). -- Joe > Could you please try whether the attached patch handles the problem. > > Thanks, martin. > > *** dired.el.~1.406.~ 2008-07-30 09:30:57.453125000 +0200 > --- dired.el 2008-08-03 10:43:25.921875000 +0200 > *************** > *** 717,722 **** > --- 717,725 ---- > (and (stringp dirname) > (not (when noconfirm (file-remote-p dirname))) > (file-readable-p dirname) > + ;; Don't auto-revert when the dired buffer can be currently > + ;; written by the user (as in `wdired-mode', see bug#457). > + buffer-read-only > (dired-directory-changed-p dirname)))) > > ;; Separate function from dired-noselect for the sake of dired-vms.el. -- Heriot-Watt University is a Scottish charity registered under charity number SC000278.