GNU bug report logs -
#74637
[PATCH] Make view-read-only behave like view-file
Previous Next
Reported by: Björn Bidar <bjorn.bidar <at> thaodan.de>
Date: Sun, 1 Dec 2024 20:41:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74637 in the body.
You can then email your comments to 74637 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Sun, 01 Dec 2024 20:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Björn Bidar <bjorn.bidar <at> thaodan.de>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 01 Dec 2024 20:41:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
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.
In GNU Emacs 31.0.50 (build 1, x86_64-suse-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.2)
Repository revision: eee0ed8442aa78320a3e578ab290df145fb49624
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101014
System Description: openSUSE Tumbleweed
Configured using:
'configure --disable-build-details --without-pop --with-mailutils
--without-hesiod --with-gameuser=:games --with-kerberos
--with-kerberos5 --with-file-notification=inotify --with-modules
--enable-autodepend --enable-link-time-optimization --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--localstatedir=/var --sharedstatedir=/var/lib
--libexecdir=/usr/libexec --with-file-notification=yes
--libdir=/usr/lib64 --with-native-compilation=aot
--enable-locallisppath=/usr/share/emacs/31.0.50/site-lisp:/usr/share/emacs/site-lisp
--with-x --with-xim --with-sound --with-xpm --with-jpeg --with-tiff
--with-gif --with-png --with-rsvg --with-dbus --with-xft --without-gpm
--with-tree-sitter --with-x-toolkit=gtk --without-pgtk
--with-toolkit-scroll-bars --x-includes=/usr/include
--x-libraries=/usr/lib64 --with-libotf --with-m17n-flt --with-cairo
--build=x86_64-suse-linux --with-dumping=pdumper
build_alias=x86_64-suse-linux 'CC=sccache cc' 'CFLAGS=-O2 -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
-Werror=return-type -flto=auto -march=znver3 -mmmx -mpopcnt -msse
-msse2 -msse3 -mssse3 -msse4.1 -msse4.2 -mavx -mavx2 -msse4a -mno-fma4
-mno-xop -mfma -mbmi -mbmi2 -maes -mpclmul -mno-gfni -mvpclmulqdq
-mno-3dnow -madx -mabm -mno-cldemote -mclflushopt -mclwb -mclzero
-mcx16 -mno-enqcmd -mf16c -mfsgsbase -mfxsr -mno-hle -msahf -mno-lwp
-mlzcnt -mmovbe -mno-movdir64b -mno-movdiri -mmwaitx -mno-pconfig -mpku
-mprfchw -mno-ptwrite -mrdpid -mrdrnd -mrdseed -mno-rtm -mno-serialize
-mno-sgx -msha -mshstk -mno-tbm -mno-tsxldtrk -mvaes -mno-waitpkg
-mwbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mno-amx-tile
-mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl
-mno-avxvnni -mno-avxifma -mno-avxvnniint8 -mno-avxneconvert
-mno-cmpccxadd -mno-amx-fp16 -mno-prefetchi -mno-raoint
-mno-amx-complex --param l1-cache-size=32 --param l1-cache-line-size=64
--param l2-cache-size=512 -mtune=znver3 -fno-optimize-sibling-calls -O2
-Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
-Werror=return-type -flto=auto -g -D_GNU_SOURCE
-DGDK_DISABLE_DEPRECATION_WARNINGS -DGLIB_DISABLE_DEPRECATION_WARNINGS
-pipe -Wno-pointer-sign -Wno-unused-variable -Wno-unused-label
-DPDMP_BASE='\''"emacs-gtk"'\''' LDFLAGS=-Wl,-O2 'CXX=sccache c++'
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
[0001-Make-view-read-only-behave-like-view-file.patch (text/patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Mon, 02 Dec 2024 12:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 74637 <at> debbugs.gnu.org (full text, mbox):
> 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 <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Mon, 02 Dec 2024 18:09:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> 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 <at> 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.
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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Mon, 02 Dec 2024 19:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 74637 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
> Cc: 74637 <at> debbugs.gnu.org
> Date: Mon, 02 Dec 2024 20:08:46 +0200
>
> Eli Zaretskii <eliz <at> 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 <at> 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.
> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 10:07:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 74637 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: 74637 <at> debbugs.gnu.org
>> Date: Mon, 02 Dec 2024 20:08:46 +0200
>>
>> Eli Zaretskii <eliz <at> 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 <at> 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 (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 14:04:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 74637 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
> Cc: 74637 <at> debbugs.gnu.org
> Date: Tue, 03 Dec 2024 12:06:11 +0200
>
> >> > 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.
It's still a significant change. Killing a buffer is not a minor
think, and restoring it is not always easy, or even possible (e.g.,
the file could have been deleted in the meantime).
My opinion is that if we install this, we need to provide some way of
getting the previous behavior back, for those who may want it.
Stefan and Andrea, WDYT?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 14:27:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 74637 <at> debbugs.gnu.org (full text, mbox):
[செவ்வாய் டிசம்பர் 03, 2024] Eli Zaretskii wrote:
>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: 74637 <at> debbugs.gnu.org
>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>
>> >> > 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.
>
> It's still a significant change. Killing a buffer is not a minor
> think, and restoring it is not always easy, or even possible (e.g.,
> the file could have been deleted in the meantime).
>
> My opinion is that if we install this, we need to provide some way of
> getting the previous behavior back, for those who may want it.
>
> Stefan and Andrea, WDYT?
I am neither Stefan nor Andrea: there have been a number of instances
where Emacs not eagerly killing buffers has saved accidentally or
prematurely deleted files on my end. I would be opposed to a change
that kills the buffer on exiting view-mode entered due to
view-read-only=t to avoid potential data loss.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 19:34:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Visuwesh <visuweshm <at> gmail.com> writes:
> [செவ்வாய் டிசம்பர் 03, 2024] Eli Zaretskii wrote:
>
>>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>>> Cc: 74637 <at> debbugs.gnu.org
>>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>>
>>> >> > 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.
>>
>> It's still a significant change. Killing a buffer is not a minor
>> think, and restoring it is not always easy, or even possible (e.g.,
>> the file could have been deleted in the meantime).
>>
>> My opinion is that if we install this, we need to provide some way of
>> getting the previous behavior back, for those who may want it.
>>
>> Stefan and Andrea, WDYT?
>
> I am neither Stefan nor Andrea: there have been a number of instances
> where Emacs not eagerly killing buffers has saved accidentally or
> prematurely deleted files on my end. I would be opposed to a change
> that kills the buffer on exiting view-mode entered due to
> view-read-only=t to avoid potential data loss.
But does apply to instance of view-read-only? Again it only affects
files which are not writable, i.e. those that could not be deleted by
the user in the first place.
The change is for not writable files plus view-read-only, NOT files which
are visited and then view-mode activated through `view-mode` or
view-read-only through read-only-mode.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 19:40:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: 74637 <at> debbugs.gnu.org
>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>
>> >> > 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.
>
> It's still a significant change. Killing a buffer is not a minor
> think, and restoring it is not always easy, or even possible (e.g.,
> the file could have been deleted in the meantime).
In such instances the files are usually those which are shared by other
users or installed by the system administrator if the file was deleted
it could have been only by the owner or those with the power to delete
them.
Files which the user owns wouldn't be affected.
> My opinion is that if we install this, we need to provide some way of
> getting the previous behavior back, for those who may want it.
>
Should this also affected files through the other instances where
view-mode kills the buffer if not modified? In the instances affected by
the patch view-read-only is more implicit e.g. when following a reference with
xref to a read-only file but view-file is still similar.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Tue, 03 Dec 2024 19:44:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 74637 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
> Cc: Stefan Kangas <stefankangas <at> gmail.com>, Andrea Corallo
> <acorallo <at> gnu.org>, 74637 <at> debbugs.gnu.org
> Date: Tue, 03 Dec 2024 21:39:00 +0200
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > My opinion is that if we install this, we need to provide some way of
> > getting the previous behavior back, for those who may want it.
> >
>
> Should this also affected files through the other instances where
> view-mode kills the buffer if not modified?
It should affect those cases where this change modifies existing
behavior.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Wed, 04 Dec 2024 13:17:02 GMT)
Full text and
rfc822 format available.
Message #35 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: 74637 <at> debbugs.gnu.org
>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>
>> >> > 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.
>
> It's still a significant change. Killing a buffer is not a minor
> think, and restoring it is not always easy, or even possible (e.g.,
> the file could have been deleted in the meantime).
>
> My opinion is that if we install this, we need to provide some way of
> getting the previous behavior back, for those who may want it.
>
> Stefan and Andrea, WDYT?
Agree with your position.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Thu, 05 Dec 2024 02:16:02 GMT)
Full text and
rfc822 format available.
Message #38 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Hello,
I don't think Emacs should start killing buffers that it didn't used to
kill by default. I also think that 'q' shouldn't generally kill
buffers, only close windows and bury buffers.
--
Sean Whitton
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Sat, 07 Dec 2024 00:40:02 GMT)
Full text and
rfc822 format available.
Message #41 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Andrea Corallo <acorallo <at> gnu.org> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>>> Cc: 74637 <at> debbugs.gnu.org
>>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>>
>>> >> > 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.
>>
>> It's still a significant change. Killing a buffer is not a minor
>> think, and restoring it is not always easy, or even possible (e.g.,
>> the file could have been deleted in the meantime).
>>
>> My opinion is that if we install this, we need to provide some way of
>> getting the previous behavior back, for those who may want it.
>>
>> Stefan and Andrea, WDYT?
>
> Agree with your position.
If before killing the file there would be a check if it was deleted
is that better? The check would also improve the view-file related
functions.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Sat, 07 Dec 2024 07:44:02 GMT)
Full text and
rfc822 format available.
Message #44 received at 74637 <at> debbugs.gnu.org (full text, mbox):
> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 74637 <at> debbugs.gnu.org, Stefan Kangas
> <stefankangas <at> gmail.com>
> Date: Sat, 07 Dec 2024 02:39:20 +0200
>
> Andrea Corallo <acorallo <at> gnu.org> writes:
>
> >> Stefan and Andrea, WDYT?
> >
> > Agree with your position.
>
> If before killing the file there would be a check if it was deleted
> is that better? The check would also improve the view-file related
> functions.
Personally, I'm not sure it is much better. First, the file might
have been moved or renamed, not deleted. More generally, it strikes
me as very un-Emacsy to kill a buffer when the user is done with it.
We only do that with temporary buffers created for the purpose of
performing some processing; otherwise we leave the buffers in the
session, leaving it to the user to decide when to kill them. We also
have optional features, like mindnight.el, which are capable of
killing buffers that were not accessed for a long time, and the very
fact that they are optional clearly shows the general attitude of
Emacs: not to kill buffers unless explicitly told so by the user.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Sat, 07 Dec 2024 18:07:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>> Cc: Eli Zaretskii <eliz <at> gnu.org>, 74637 <at> debbugs.gnu.org, Stefan Kangas
>> <stefankangas <at> gmail.com>
>> Date: Sat, 07 Dec 2024 02:39:20 +0200
>>
>> Andrea Corallo <acorallo <at> gnu.org> writes:
>>
>> >> Stefan and Andrea, WDYT?
>> >
>> > Agree with your position.
>>
>> If before killing the file there would be a check if it was deleted
>> is that better? The check would also improve the view-file related
>> functions.
>
> Personally, I'm not sure it is much better. First, the file might
> have been moved or renamed, not deleted. More generally, it strikes
> me as very un-Emacsy to kill a buffer when the user is done with it.
Would a better approach be then that pressing q burries the buffer but
doesn't exit view-mode if entered through view-read-only on a non
writable aka read-only file? Doing so wouldn't remove the option to exit
view-mode on such buffers but keep view-mode on in case the user visits
the buffer again. Pressing q to bury or delete a read-only buffer is a
common action across almost any mode.
> We only do that with temporary buffers created for the purpose of
> performing some processing; otherwise we leave the buffers in the
> session, leaving it to the user to decide when to kill them. We also
> have optional features, like mindnight.el, which are capable of
> killing buffers that were not accessed for a long time, and the very
> fact that they are optional clearly shows the general attitude of
> Emacs: not to kill buffers unless explicitly told so by the user.
Buffer which visit read only files such as system documentation could be
considered temporary but I get the point.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#74637
; Package
emacs
.
(Sun, 15 Dec 2024 18:45:02 GMT)
Full text and
rfc822 format available.
Message #50 received at 74637 <at> debbugs.gnu.org (full text, mbox):
Andrea Corallo <acorallo <at> gnu.org> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
>>> Cc: 74637 <at> debbugs.gnu.org
>>> Date: Tue, 03 Dec 2024 12:06:11 +0200
>>>
>>> >> > 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.
>>
>> It's still a significant change. Killing a buffer is not a minor
>> think, and restoring it is not always easy, or even possible (e.g.,
>> the file could have been deleted in the meantime).
>>
>> My opinion is that if we install this, we need to provide some way of
>> getting the previous behavior back, for those who may want it.
>>
>> Stefan and Andrea, WDYT?
>
> Agree with your position.
+1
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sat, 28 Dec 2024 11:33:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Björn Bidar <bjorn.bidar <at> thaodan.de>
:
bug acknowledged by developer.
(Sat, 28 Dec 2024 11:33:02 GMT)
Full text and
rfc822 format available.
Message #55 received at 74637-done <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Sun, 15 Dec 2024 18:43:39 +0000
> Cc: Björn Bidar <bjorn.bidar <at> thaodan.de>,
> 74637 <at> debbugs.gnu.org
>
> Andrea Corallo <acorallo <at> gnu.org> writes:
>
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> >>> From: Björn Bidar <bjorn.bidar <at> thaodan.de>
> >>> Cc: 74637 <at> debbugs.gnu.org
> >>> Date: Tue, 03 Dec 2024 12:06:11 +0200
> >>>
> >>> >> > 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.
> >>
> >> It's still a significant change. Killing a buffer is not a minor
> >> think, and restoring it is not always easy, or even possible (e.g.,
> >> the file could have been deleted in the meantime).
> >>
> >> My opinion is that if we install this, we need to provide some way of
> >> getting the previous behavior back, for those who may want it.
> >>
> >> Stefan and Andrea, WDYT?
> >
> > Agree with your position.
>
> +1
It sounds like the consensus here is that we should not make this
change, so I'm closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 25 Jan 2025 12:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 206 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.