unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: Michael Albinus <michael.albinus@gmx.de>, 17148@debbugs.gnu.org
Subject: bug#17148: 23.1; Revert Buffer
Date: Tue, 01 Apr 2014 16:14:04 -0400	[thread overview]
Message-ID: <jwvd2h0u7wu.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <gk38hx59lr.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 01 Apr 2014 11:54:08 -0400")

>> Emacs is not notified, when a file changes its state outside Emacs. Only
>> prior to writing to a file Emacs checks, whether a file has changed on disk.
> Why can't the revert-buffer menu-item check the file mode bits match,
> the same way it verifies the modtime? IMO it should just call
> file-attributes once, and use that to check time and permissions.

Because revert-buffer is meant to handle the file's content, not its
read-only setting.
E.g. maybe the buffer is read-only because the user hit C-x C-q.

Maybe we should use a 3rd setting for buffer-read-only which says "obey
the file's writability".


        Stefan





  parent reply	other threads:[~2014-04-01 20:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 13:33 bug#17148: 23.1; Revert Buffer Joe Camaioni
2014-04-01  7:06 ` Michael Albinus
2014-04-01 15:54   ` Glenn Morris
2014-04-01 18:04     ` Michael Albinus
2014-04-01 18:30       ` Glenn Morris
2014-04-01 18:40         ` Michael Albinus
2014-04-01 19:01           ` Glenn Morris
2014-04-02 13:03             ` Stefan Monnier
2014-04-01 20:14     ` Stefan Monnier [this message]
2014-04-02  6:45       ` Glenn Morris
2014-04-02 13:04         ` Stefan Monnier
2022-02-22 14:45 ` bug#17148: Revert buffer menu-item and file permission changes Lars Ingebrigtsen
2022-02-22 16:53   ` Eli Zaretskii
2022-02-22 17:56     ` Lars Ingebrigtsen

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=jwvd2h0u7wu.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=17148@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=rgm@gnu.org \
    /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).