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, 11 Aug 2008 18:30:07 +0100 Message-ID: <86k5enh334.fsf@blueyonder.co.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 1218499510 7813 80.91.229.12 (12 Aug 2008 00:05:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2008 00:05:10 +0000 (UTC) Cc: 457@emacsbugs.donarmstrong.com To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Aug 12 02:06:02 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 1KShOh-0005x3-Fx for geb-bug-gnu-emacs@m.gmane.org; Tue, 12 Aug 2008 02:05:59 +0200 Original-Received: from localhost ([127.0.0.1]:47713 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KShNl-0006cw-Aw for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 20:05:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSbUP-0006BT-I7 for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 13:47:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSbUN-00067K-Q9 for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 13:47:29 -0400 Original-Received: from [199.232.76.173] (port=42015 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSbUN-00066t-FG for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 13:47:27 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:50196) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KSbUM-0008GG-H0 for bug-gnu-emacs@gnu.org; Mon, 11 Aug 2008 13:47:26 -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 m7BHlOQM009951; Mon, 11 Aug 2008 10:47:24 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m7BHZ3bW005754; Mon, 11 Aug 2008 10:35: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, 11 Aug 2008 17:35: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.12184758174799 (code B ref 457); Mon, 11 Aug 2008 17:35:03 +0000 Original-Received: (at 457) by emacsbugs.donarmstrong.com; 11 Aug 2008 17:30:17 +0000 Original-Received: from smtp-out5.blueyonder.co.uk (smtp-out5.blueyonder.co.uk [195.188.213.8]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7BHUCsT004781 for <457@emacsbugs.donarmstrong.com>; Mon, 11 Aug 2008 10:30:14 -0700 Original-Received: from [172.23.170.140] (helo=anti-virus02-07) by smtp-out5.blueyonder.co.uk with smtp (Exim 4.52) id 1KSbDf-0005r7-JP; Mon, 11 Aug 2008 18:30:11 +0100 Original-Received: from [82.41.74.248] (helo=127.0.0.1) by asmtp-out6.blueyonder.co.uk with smtp (Exim 4.52) id 1KSbDc-0007JD-Ke; Mon, 11 Aug 2008 18:30:08 +0100 Original-Received: (nullmailer pid 23460 invoked by uid 1001); Mon, 11 Aug 2008 17:30:07 -0000 X-Mail-Via: blue In-Reply-To: (Michael Heerdegen's message of "Mon\, 11 Aug 2008 18\:28\:09 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) SMTP-Host: smtp.blueyonder.co.uk SMTP-Port: 25 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Resent-Date: Mon, 11 Aug 2008 13:47:29 -0400 X-Mailman-Approved-At: Mon, 11 Aug 2008 20:04:46 -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:19311 Archived-At: Michael Heerdegen writes: > I'll try to make clear what happened to the best of my recollection: > > (0) C-x d my-dir > > (1) I marked some files with % *, m, u etc. > > (2) I killed the formerly marked files in the dired buffer (k). > > (3) I pressed r (`wdired-change-to-wdired-mode') (resulting in making > the buffer non-modified again). Ahh! That's the bug: wdired-change-to-wdired-mode does (set-buffer-modified-p nil), which incorrectly forgets about modifications made by other commands. In this case, (buffer-modified-p) is a poor proxy for =E2=80=9Cthere exist uncommitted changes that the user probably does not want to lose=E2=80=9D. The buffer-modified flag is mostly good enough for buffers visiting ordinary files, but is hard to keep correct for fancy buffers like Dired buffers. Of course, this wasn't so important before auto-revert-mode existed. --=20 Joe > (4) Directly after that, M-x query-replace-regexp. While I was > specifying the regexp, the buffer reverted, and I had to restart with (1).