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: Richard Stallman
Subject: bug#50431: revert-buffer doesn't preserve read-onlyness
Date: Wed, 08 Sep 2021 23:07:35 -0400

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > 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).

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.

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.


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







reply via email to

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