[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#74637: [PATCH] Make view-read-only behave like view-file
From: |
Björn Bidar |
Subject: |
bug#74637: [PATCH] Make view-read-only behave like view-file |
Date: |
Tue, 03 Dec 2024 12:06:11 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar@thaodan.de>
>> Cc: 74637@debbugs.gnu.org
>> Date: Mon, 02 Dec 2024 20:08:46 +0200
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> >> Date: Sun, 01 Dec 2024 22:40:16 +0200
>> >> From: Björn Bidar via "Bug reports for GNU Emacs,
>> >> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> >>
>> >> Make view-mode behave like when called in view-file when entered because
>> >> `view-read-only' is true on a file which is not writable.
>> >> The change makes the view-read-only behave better on files which are
>> >> not writable.
>> >> Now it makes Emacs behave more like less on these files.
>> >
>> > That's an incompatible behavior change. Is that justified? How can
>> > we be sure that everyone agrees with your interpretation of this mode?
>>
>> All other view-file like modes behave like this, you view the file and
>> leave the file with q.
>
> That doesn't change the fact that view-mode didn't behave like that,
> until now.
View-mode isn't change outside of the specific situation of opening a
file which isn't writable. I worded it wrong in the doc string.
Please check the updated docstring or different wording.
>> But even going with that point: You open a file file which isn't
>> writable. Once you hit q the window is quit and the buffer is buried.
>> What do you do now next time you visit that file?
>> The buffer was buried, view-mode isn't active anymore, you would have
>> to activate view-mode again to go where you left off.
>>
>> If you would want to edit the file the you visited this way you would
>> have not pressed q but e to exit view mode and the proceeded to exit
>> read-only-mode and edit the file.
>
> What about entering view-mode by typing "C-x C-q" in a buffer whose
> file is writable? Why should we kill the buffer when the user turns
> off view-mode in that file's buffer?
The change doesn't affect those situations. If you exit view-mode this way
after having it activated through "C-x C-q" you would exit view-mode
burry the buffer but not kill it.
0001-Make-view-read-only-behave-like-view-file.patch
Description: Text Data
- bug#74637: [PATCH] Make view-read-only behave like view-file, Björn Bidar, 2024/12/01
- bug#74637: [PATCH] Make view-read-only behave like view-file, Eli Zaretskii, 2024/12/02
- bug#74637: [PATCH] Make view-read-only behave like view-file, Andrea Corallo, 2024/12/04
- bug#74637: [PATCH] Make view-read-only behave like view-file, Björn Bidar, 2024/12/06
- bug#74637: [PATCH] Make view-read-only behave like view-file, Eli Zaretskii, 2024/12/07
- bug#74637: [PATCH] Make view-read-only behave like view-file, Björn Bidar, 2024/12/07
- bug#74637: [PATCH] Make view-read-only behave like view-file, Stefan Kangas, 2024/12/15