[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Change in `revert-buffer' behavior [28.0.50]

From: Óscar Fuentes
Subject: Re: Change in `revert-buffer' behavior [28.0.50]
Date: Tue, 27 Jul 2021 17:28:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

reply via email to

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