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: Thu, 09 Sep 2021 15:16:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Richard Stallman <rms@gnu.org> writes:

> How about just this: keep buffer-read-only unchanged?
>
> If it differs from the file's permissions, almost certainly
> the user changed it and will beglad of revert-buffer preserves it.

Yes, but that's my point -- we need to store the file's permissions
somewhere so that we can see whether buffer-read-only was set/unset
because of that or not.  (Since the file's permissions may change
afterwards.)

> The other case is that the file permissions have been changed
> since visiting the file.  But users won't be shocked if
> revert-buffer fails to change buffer-read-only in that case,
> and they will know what to do.

No, people have work flows that depend on revert-buffer updating the
readedness based on the file's readedness, and this would disrupt that.
And there's no need to.  We just have to do a small bit of programming.  :-)

-- 
(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]