unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Joe Wells <jbw@macs.hw.ac.uk>
To: martin rudalics <rudalics@gmx.at>
Cc: michael_heerdegen@web.de, 457@emacsbugs.donarmstrong.com
Subject: bug#457: wdired and auto-revert-mode
Date: Mon, 04 Aug 2008 12:18:42 +0100	[thread overview]
Message-ID: <86abftuiy5.fsf@macs.hw.ac.uk> (raw)
In-Reply-To: <mailman.15789.1217765249.18990.bug-gnu-emacs@gnu.org> (martin rudalics's message of "Sun\, 03 Aug 2008 13\:45\:42 +0200")

martin rudalics <rudalics@gmx.at> 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	other threads:[~2008-08-04 11:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.15789.1217765249.18990.bug-gnu-emacs@gnu.org>
2008-08-04 11:18 ` Joe Wells [this message]
2008-08-04 12:03   ` bug#457: wdired and auto-revert-mode martin rudalics
2008-08-04 13:33     ` Joe Wells
2008-08-04 16:08       ` martin rudalics
2008-08-04 18:38         ` Joe Wells
2008-08-04 21:24           ` martin rudalics
     [not found]         ` <mailman.15844.1217875649.18990.bug-gnu-emacs@gnu.org>
2008-08-11 16:28           ` Michael Heerdegen
2008-08-11 17:30             ` Joe Wells
2008-08-13 16:22               ` Michael Heerdegen
2008-08-21  8:04                 ` martin rudalics
2008-08-03 11:45 martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86abftuiy5.fsf@macs.hw.ac.uk \
    --to=jbw@macs.hw.ac.uk \
    --cc=457@emacsbugs.donarmstrong.com \
    --cc=michael_heerdegen@web.de \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).