bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50431: revert-buffer doesn't preserve read-onlyness


From: Lars Ingebrigtsen
Subject: bug#50431: revert-buffer doesn't preserve read-onlyness
Date: Wed, 24 Aug 2022 13:35:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

> I don't know at what moment this regression occurred,
> but now M-x revert-buffer in a read-only file buffer
> doesn't keep it read-only.

I've now fixed this in Emacs 29 -- `C-x C-q' records what the user
actually did, so we can restore that state.

If the user hasn't used that command, then reverting works as before --
it uses the permission bits on the file and updates the readedness
state.

I considered only heeding the user-set readedness state if it was
different from the default one -- that is, if the user used the `C-x
C-q' command twice, then readedness state would not be preserved by
reverting, but I think that's too subtle.





reply via email to

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