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: Tue, 07 Sep 2021 17:52:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Glenn Morris <rgm@gnu.org> writes:

> Juri Linkov wrote:
>
>> 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.
>
> For me, it reverts it to whatever the permission bits on the file say.
> Which is IMO the correct behaviour for revert-buffer.

Yup. 

> Perhaps you are referring to a short-lived change from
> https://debbugs.gnu.org/35166#24
> which was quickly reverted?

Making revert-buffer preserve user-initiated readedness changes isn't
trivial.  We'd need to record whether the buffer is read-only because it
was read from a read-only file (and vice versa), and then use that data
point in revert-buffer (to see whether we should respect the current
readedness state or not).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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