unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: emacs-devel@gnu.org
Subject: Re: Change in `revert-buffer' behavior [28.0.50]
Date: Tue, 27 Jul 2021 17:28:14 +0200	[thread overview]
Message-ID: <87lf5rg4j5.fsf@telefonica.net> (raw)
In-Reply-To: CAFyQvY1M4r8PC3ixWDBZD4xzSS35myud20+vqVmXUaGHMSqzXA@mail.gmail.com

Kaushal Modi <kaushal.modi@gmail.com> writes:

> Hello,
>
> I use the `revert-buffer' function frequently and after a recent rebuild of
> emacs from master after about a month, I noticed a big difference in its
> behavior.
>
> When I change the read-onlyness of a file from the disk, M-x revert-buffer
> doesn't reflect that change any more. This is really important as I am
> working in a centralized VCS where the files have to be "checked out" i.e.
> make writable before I can modify them.
>
> Now when the commands in the terminal check in and check out the file, the
> read-only/writable status doesn't update when I revert-buffer in Emacs.
>
> *Earlier M-x revert-buffer always showed the correct read-only state. Now,
> I need to kill the buffer and reopen to see the correct status.*
>
> I believe it is kind of related to this commit:
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=fcae435f598471a2911641412125c5ac4f73559f

I think that the author was trying to preserve the user's decision about
the read-only-ness of the buffer, assuming that the file's permissions
did not change since last visit.

AFAIK currently we have no method for distinguising if the buffer was
made read-only/writable by the user or because Emacs reflected the file
system's permissions.




  parent reply	other threads:[~2021-07-27 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-27 15:09 Change in `revert-buffer' behavior [28.0.50] Kaushal Modi
2021-07-27 15:25 ` bug#35166: " Lars Ingebrigtsen
2021-07-27 15:39   ` Kaushal Modi
2021-07-27 15:28 ` Óscar Fuentes [this message]
2021-07-27 15:43   ` Kaushal Modi

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=87lf5rg4j5.fsf@telefonica.net \
    --to=ofv@wanadoo.es \
    --cc=emacs-devel@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).