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

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







reply via email to

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