[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50431: revert-buffer doesn't preserve read-onlyness
From: |
Juri Linkov |
Subject: |
bug#50431: revert-buffer doesn't preserve read-onlyness |
Date: |
Wed, 24 Aug 2022 20:12:50 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> 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.
I confirm that now the read-only status is restored,
but reverting loses view-mode:
C-h C-t -- note "View" on the mode-line;
C-x x g -- "View" is lost.
- bug#50431: revert-buffer doesn't preserve read-onlyness, Lars Ingebrigtsen, 2022/08/24
- bug#50431: revert-buffer doesn't preserve read-onlyness,
Juri Linkov <=
- bug#50431: revert-buffer doesn't preserve read-onlyness, Lars Ingebrigtsen, 2022/08/25
- bug#50431: revert-buffer doesn't preserve read-onlyness, Juri Linkov, 2022/08/25
- bug#50431: revert-buffer doesn't preserve read-onlyness, Eli Zaretskii, 2022/08/25
- bug#50431: revert-buffer doesn't preserve read-onlyness, Juri Linkov, 2022/08/25
- bug#50431: revert-buffer doesn't preserve read-onlyness, Eli Zaretskii, 2022/08/26
- bug#50431: revert-buffer doesn't preserve read-onlyness, Juri Linkov, 2022/08/26
- bug#50431: revert-buffer doesn't preserve read-onlyness, Drew Adams, 2022/08/26
- bug#50431: revert-buffer doesn't preserve read-onlyness, Lars Ingebrigtsen, 2022/08/26
- bug#50431: revert-buffer doesn't preserve read-onlyness, Eli Zaretskii, 2022/08/26
- bug#50431: revert-buffer doesn't preserve read-onlyness, Drew Adams, 2022/08/26