[Top][All Lists]

[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, 04 Aug 2008 19:38:20 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

martin rudalics <address@hidden> 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:

  “It is very frustrating when the buffer reverts while editing file

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?


> I use neither `dired' nor `auto-revert-mode'.


Heriot-Watt University is a Scottish charity
registered under charity number SC000278.

reply via email to

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