all messages for Emacs-related lists mirrored at yhetil.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 19:38:20 +0100	[thread overview]
Message-ID: <86wsiwtylf.fsf@macs.hw.ac.uk> (raw)
In-Reply-To: <48972981.5030600@gmx.at> (martin rudalics's message of "Mon\, 04 Aug 2008 18\:08\:33 +0200")

martin rudalics <rudalics@gmx.at> 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
   names.”

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?

No.

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

-- 
Joe


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







  reply	other threads:[~2008-08-04 18:38 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 ` bug#457: wdired and auto-revert-mode Joe Wells
2008-08-04 12:03   ` martin rudalics
2008-08-04 13:33     ` Joe Wells
2008-08-04 16:08       ` martin rudalics
2008-08-04 18:38         ` Joe Wells [this message]
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

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

  git send-email \
    --in-reply-to=86wsiwtylf.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.