bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#457: wdired and auto-revert-mode


From: Joe Wells
Subject: bug#457: wdired and auto-revert-mode
Date: Mon, 11 Aug 2008 18:30:07 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Michael Heerdegen <address@hidden> 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 “there exist
uncommitted changes that the user probably does not want to lose”.
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.

-- 
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).







reply via email to

[Prev in Thread] Current Thread [Next in Thread]