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 19:38:20 +0100 Message-ID: <86wsiwtylf.fsf@macs.hw.ac.uk> References: <86abftuiy5.fsf@macs.hw.ac.uk> <4896F015.8080008@gmx.at> <864p60vrar.fsf@macs.hw.ac.uk> <48972981.5030600@gmx.at> Reply-To: Joe Wells , 457@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1217875671 7969 80.91.229.12 (4 Aug 2008 18:47:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Aug 2008 18:47:51 +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 20:48:41 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 1KQ56l-0007WR-Qh for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Aug 2008 20:48:40 +0200 Original-Received: from localhost ([127.0.0.1]:42308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ55q-00060u-Tp for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Aug 2008 14:47:42 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQ55b-0005xJ-2L for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 14:47:27 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQ55Z-0005wr-6u for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 14:47:26 -0400 Original-Received: from [199.232.76.173] (port=58937 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ55Y-0005wo-W5 for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 14:47:25 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:44623) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KQ55Y-0002Bp-Cx for bug-gnu-emacs@gnu.org; Mon, 04 Aug 2008 14:47:24 -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 m74IlMiR031541; Mon, 4 Aug 2008 11:47:22 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m74Ij44c030393; Mon, 4 Aug 2008 11:45:04 -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 18:45:04 +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.121787511828706 (code B ref 457); Mon, 04 Aug 2008 18:45:04 +0000 Original-Received: (at 457) by emacsbugs.donarmstrong.com; 4 Aug 2008 18:38:38 +0000 Original-Received: from mail-r.hw.ac.uk (mail-r.hw.ac.uk [137.195.101.217]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m74IcXrC028700 for <457@emacsbugs.donarmstrong.com>; Mon, 4 Aug 2008 11:38:35 -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 1KQ4wn-0007cA-QD; Mon, 04 Aug 2008 19:38:21 +0100 Original-Received: from lxultra1.macs.hw.ac.uk ([137.195.27.173]:46470 helo=127.0.0.1) by izanami.macs.hw.ac.uk with smtp (Exim 4.51) id 1KQ4wn-0004To-HQ; Mon, 04 Aug 2008 19:38:21 +0100 Original-Received: (nullmailer pid 3598 invoked by uid 1001); Mon, 04 Aug 2008 18:38:21 -0000 In-Reply-To: <48972981.5030600@gmx.at> (martin rudalics's message of "Mon\, 04 Aug 2008 18\:08\:33 +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=-4.399, required 5, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) 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 14:47:26 -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:19015 Archived-At: martin rudalics writes: >> Just make sure to leave the buffer marked as modified as long as there >> are changes that should not be lost by reverting. If you do that, >> then auto-revert-mode will not lose changes. > > At the very moment the OP got "frustrated", the buffer was apparently > _unmodified_ since otherwise Emacs would have refused to auto-revert it. > Hence, the problem seems not in losing any changes. The original bug report stated this: =E2=80=9CIt is very frustrating when the buffer reverts while editing file names.=E2=80=9D This seems to indicate that Michael was complaining about the buffer getting reverted while he was in the middle of editing file names. I'm not sure how this can happen unless something is clearing the buffer-modified flag, because auto-revert-handler refuses to do anything if the buffer-modified flag is set. Perhaps Michael can clarify what exactly the bad behavior was? >> Is something in wdired doing (set-buffer-modified-p nil) *before* the >> changes have been recorded? > > Yes, but why should that matter here? BTW, `wdired' also resets > `buffer-undo-list'. The important aspect is that as long as a user is > in `wdired-mode', buffer-modified status and `buffer-undo-list' should > faithfully reflect the user's editing steps. As long as the buffer is marked as modified, it will not be auto-reverted. If it only gets marked unmodified after the user is done editing file names, then I don't see what the problem is. It is hard to make any recommendation without a clearer description of how to reproduce the problem, whatever the problem might be. > Did you try my `buffer-read-only' patch? No. > I use neither `dired' nor `auto-revert-mode'. --=20 Joe --=20 Heriot-Watt University is a Scottish charity registered under charity number SC000278.