* bug#70587: More buffers that ought to be read-only
@ 2024-04-26 1:16 Dan Jacobson
2024-04-26 9:58 ` Sean Whitton
2024-04-26 10:48 ` Eli Zaretskii
0 siblings, 2 replies; 22+ messages in thread
From: Dan Jacobson @ 2024-04-26 1:16 UTC (permalink / raw)
To: 70587
diff-default-read-only is a variable defined in ‘diff-mode.el’.
Its value is nil
If non-nil, ‘diff-mode’ buffers default to being read-only.
That's funny, it seems they are already read-only, without setting this
variable. Maybe this variable can be retired.
The *compilation* buffer of M-x compile is also read-only. Good.
But how about *Shell Command Output*, and errors buffers, they should be
read-only by default too.
Why? Because tons of times we realize for the last half hour we have
been editing our program's output buffer instead of the source code.
(Often due to using sh -x or make (without -s) which echo command
lines.)
emacs-version "29.3"
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-26 1:16 bug#70587: More buffers that ought to be read-only Dan Jacobson
@ 2024-04-26 9:58 ` Sean Whitton
2024-04-26 10:48 ` Eli Zaretskii
1 sibling, 0 replies; 22+ messages in thread
From: Sean Whitton @ 2024-04-26 9:58 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 70587
Hello,
On Fri 26 Apr 2024 at 09:16am +08, Dan Jacobson wrote:
> diff-default-read-only is a variable defined in ‘diff-mode.el’.
> Its value is nil
> If non-nil, ‘diff-mode’ buffers default to being read-only.
>
> That's funny, it seems they are already read-only, without setting this
> variable. Maybe this variable can be retired.
It's very useful to have them editable sometimes.
> The *compilation* buffer of M-x compile is also read-only. Good.
>
> But how about *Shell Command Output*, and errors buffers, they should be
> read-only by default too.
>
> Why? Because tons of times we realize for the last half hour we have
> been editing our program's output buffer instead of the source code.
No, it is very useful to be able to edit them.
It would make sense to have a customisation variable to change it.
--
Sean Whitton
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-26 1:16 bug#70587: More buffers that ought to be read-only Dan Jacobson
2024-04-26 9:58 ` Sean Whitton
@ 2024-04-26 10:48 ` Eli Zaretskii
2024-04-26 11:02 ` Dan Jacobson
1 sibling, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-26 10:48 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 70587
> From: Dan Jacobson <jidanni@jidanni.org>
> Date: Fri, 26 Apr 2024 09:16:08 +0800
>
> diff-default-read-only is a variable defined in ‘diff-mode.el’.
> Its value is nil
> If non-nil, ‘diff-mode’ buffers default to being read-only.
>
> That's funny, it seems they are already read-only, without setting this
> variable. Maybe this variable can be retired.
I cannot reproduce this. E.g., visiting a file that turned on
diff-mode doesn't make the buffer read-only. So please show a recipe,
preferably starting from "emacs -Q", where a diff-mode buffer is
read-only without changing this variable from its default value of
nil.
> But how about *Shell Command Output*, and errors buffers, they should be
> read-only by default too.
>
> Why? Because tons of times we realize for the last half hour we have
> been editing our program's output buffer instead of the source code.
>
> (Often due to using sh -x or make (without -s) which echo command
> lines.)
A simple "C-x C-q" should set you up, in those cases.
Emacs cannot possibly cater to each and every use case out there.
Sometimes you need to do stuff manually, if your case is specialized
to require that.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-26 10:48 ` Eli Zaretskii
@ 2024-04-26 11:02 ` Dan Jacobson
2024-04-26 11:13 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Dan Jacobson @ 2024-04-26 11:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587
All I know is I use
= runs the command dired-diff
Also in the "rare case that one needs to use the washroom while driving the car,"
instead of driving around with the doors open all day long, and seat belts off..."
it should be they who are forced to use C-x C-q to make those buffers read-write.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-26 11:02 ` Dan Jacobson
@ 2024-04-26 11:13 ` Eli Zaretskii
2024-04-27 7:24 ` Dan Jacobson
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-26 11:13 UTC (permalink / raw)
To: Dan Jacobson; +Cc: 70587
> Date: Fri, 26 Apr 2024 19:02:04 +0800
> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 70587@debbugs.gnu.org
>
> All I know is I use
> = runs the command dired-diff
In what mode, please?
I asked for a complete reproduction recipe, so could you please
provide such a recipe?
> Also in the "rare case that one needs to use the washroom while driving the car,"
> instead of driving around with the doors open all day long, and seat belts off..."
> it should be they who are forced to use C-x C-q to make those buffers read-write.
Strawman.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-26 11:13 ` Eli Zaretskii
@ 2024-04-27 7:24 ` Dan Jacobson
2024-04-27 7:57 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Dan Jacobson @ 2024-04-27 7:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587
EZ> I asked for a complete reproduction recipe, so could you please
EZ> provide such a recipe?
$ emacs -Q /etc
then on e.g., adduser.conf.update-old, press "=", and enter the second
name. Redo shows I did
(dired-diff "/etc/adduser.conf" nil)
Also *Shell Command Output* should be in View mode.
Otherwise every time we expect to scroll it,
the strangest thing happens. We end up inserting a
space (' ') into the beginning of the first line.
And, a half an hour later, having forgot that mishap,
end up sticking a "q" in it when it's time to leave.
q as in quicksand, which is what the buffer feels like.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-27 7:24 ` Dan Jacobson
@ 2024-04-27 7:57 ` Eli Zaretskii
2024-04-27 8:15 ` bug#70602: Add hooks to control *Shell Command Output* Dan Jacobson
2024-04-28 3:02 ` bug#70587: More buffers that ought to be read-only Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-27 7:57 UTC (permalink / raw)
To: Dan Jacobson, Stefan Monnier; +Cc: 70587
> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: 70587@debbugs.gnu.org
> Date: Sat, 27 Apr 2024 15:24:52 +0800
>
> EZ> I asked for a complete reproduction recipe, so could you please
> EZ> provide such a recipe?
>
> $ emacs -Q /etc
> then on e.g., adduser.conf.update-old, press "=", and enter the second
> name. Redo shows I did
> (dired-diff "/etc/adduser.conf" nil)
Thanks. This is because the command 'diff' unconditionally puts the
buffer into read-only mode.
Stefan, this seems to be due to your changes in b2e4481906ec: you
added '(setq buffer-read-only t)' which was not there before (in fact,
the code before those changes did the opposite:
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -131,37 +147,32 @@
- (thisdir default-directory)
- proc)
- (save-excursion
- (display-buffer buf)
- (set-buffer buf)
- (setq buffer-read-only nil)
+ (with-current-buffer buf
+ (setq buffer-read-only t)
So I suggest to remove the setting of buffer-read-only there'
diff-mode will do TRT according to diff-default-read-only.
> Also *Shell Command Output* should be in View mode.
> Otherwise every time we expect to scroll it,
> the strangest thing happens. We end up inserting a
> space (' ') into the beginning of the first line.
> And, a half an hour later, having forgot that mishap,
> end up sticking a "q" in it when it's time to leave.
> q as in quicksand, which is what the buffer feels like.
That's a separate issue, and I don't agree that *Shell Command Output*
should be in View mode by default. The space will only be inserted if
you mistakenly think the buffer is in View mode, and likewise with
'q'.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70602: Add hooks to control *Shell Command Output*
2024-04-27 7:57 ` Eli Zaretskii
@ 2024-04-27 8:15 ` Dan Jacobson
2024-04-28 3:02 ` bug#70587: More buffers that ought to be read-only Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 22+ messages in thread
From: Dan Jacobson @ 2024-04-27 8:15 UTC (permalink / raw)
To: 70602
M-! (translated from <escape> !) runs the command shell-command (found
in global-map), which is an interactive native-compiled Lisp function
in ‘simple.el’.
There are no hooks available to make the buffer it creates be in View Mode.
One cannot even, via .emacs, make it read-only.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-27 7:57 ` Eli Zaretskii
2024-04-27 8:15 ` bug#70602: Add hooks to control *Shell Command Output* Dan Jacobson
@ 2024-04-28 3:02 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 4:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 5:13 ` Eli Zaretskii
1 sibling, 2 replies; 22+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-28 3:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587, Dan Jacobson
> Stefan, this seems to be due to your changes in b2e4481906ec: you
> added '(setq buffer-read-only t)' which was not there before (in fact,
> the code before those changes did the opposite:
>
> --- a/lisp/vc/diff.el
> +++ b/lisp/vc/diff.el
> @@ -131,37 +147,32 @@
> - (thisdir default-directory)
> - proc)
> - (save-excursion
> - (display-buffer buf)
> - (set-buffer buf)
> - (setq buffer-read-only nil)
> + (with-current-buffer buf
> + (setq buffer-read-only t)
>
> So I suggest to remove the setting of buffer-read-only there'
> diff-mode will do TRT according to diff-default-read-only.
There is no right or wrong answer here. The current design reflects the
behavior I think makes more sense, but that's largely just my
personal preference. The above patch was no mistake.
But if we install the above patch, then *vc-diff* will suddenly not be
read-only any more, so we should arguably change
`diff-default-read-only` at the same time, which will in turn cause
another behavior change when people open a `.diff` file.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 3:02 ` bug#70587: More buffers that ought to be read-only Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-28 4:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 5:13 ` Eli Zaretskii
1 sibling, 0 replies; 22+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-28 4:26 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587, Dan Jacobson
> There is no right or wrong answer here. The current design reflects the
> behavior I think makes more sense, but that's largely just my
> personal preference. The above patch was no mistake.
>
> But if we install the above patch, then *vc-diff* will suddenly not be
^^^^^^^
revert
- Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 3:02 ` bug#70587: More buffers that ought to be read-only Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 4:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-28 5:13 ` Eli Zaretskii
2024-04-28 9:04 ` Dan Jacobson
` (2 more replies)
1 sibling, 3 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-28 5:13 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 70587, jidanni
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Dan Jacobson <jidanni@jidanni.org>, 70587@debbugs.gnu.org
> Date: Sat, 27 Apr 2024 23:02:16 -0400
>
> > Stefan, this seems to be due to your changes in b2e4481906ec: you
> > added '(setq buffer-read-only t)' which was not there before (in fact,
> > the code before those changes did the opposite:
> >
> > --- a/lisp/vc/diff.el
> > +++ b/lisp/vc/diff.el
> > @@ -131,37 +147,32 @@
> > - (thisdir default-directory)
> > - proc)
> > - (save-excursion
> > - (display-buffer buf)
> > - (set-buffer buf)
> > - (setq buffer-read-only nil)
> > + (with-current-buffer buf
> > + (setq buffer-read-only t)
> >
> > So I suggest to remove the setting of buffer-read-only there'
> > diff-mode will do TRT according to diff-default-read-only.
>
> There is no right or wrong answer here. The current design reflects the
> behavior I think makes more sense, but that's largely just my
> personal preference. The above patch was no mistake.
If your personal preference is that diff-mode buffers should be
read-only, then you (and those who agree with you) should customize
diff-default-read-only to a non-nil value. What we have now is a
mess: some cases which invoke diff-mode behave according to
diff-default-read-only, while others behave differently
unconditionally.
However, if by "no mistake" you mean something else, please elaborate
why it was no mistake.
> But if we install the above patch, then *vc-diff* will suddenly not be
> read-only any more, so we should arguably change
> `diff-default-read-only` at the same time, which will in turn cause
> another behavior change when people open a `.diff` file.
Why should *vc-diff* be read-only regardless of
diff-default-read-only? And why visiting a .diff file is different in
this regard?
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 5:13 ` Eli Zaretskii
@ 2024-04-28 9:04 ` Dan Jacobson
2024-04-28 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 20:35 ` Dmitry Gutov
2 siblings, 0 replies; 22+ messages in thread
From: Dan Jacobson @ 2024-04-28 9:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587, Stefan Monnier
I got an idea: how about a pair of variables
"buffers-that-should-be-read-only-regexp",
"buffers-that-should-not-be-read-only-regexp",
which would be shipped with reasonable defaults...
And then the user can tweak them to their own tastes.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 5:13 ` Eli Zaretskii
2024-04-28 9:04 ` Dan Jacobson
@ 2024-04-28 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 15:18 ` Eli Zaretskii
2024-04-28 20:35 ` Dmitry Gutov
2 siblings, 1 reply; 22+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-28 14:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587, jidanni
> Why should *vc-diff* be read-only regardless of
> diff-default-read-only? And why visiting a .diff file is different in
> this regard?
I've been wondering the same and I don't have a good answer.
In practice, I edit diffs much more often when they're in a file than when
they're in *vc-diff*, but it's far from clear to me why that is the case.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-28 15:18 ` Eli Zaretskii
2024-04-28 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-28 15:18 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 70587, jidanni
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: jidanni@jidanni.org, 70587@debbugs.gnu.org
> Date: Sun, 28 Apr 2024 10:57:26 -0400
>
> > Why should *vc-diff* be read-only regardless of
> > diff-default-read-only? And why visiting a .diff file is different in
> > this regard?
>
> I've been wondering the same and I don't have a good answer.
> In practice, I edit diffs much more often when they're in a file than when
> they're in *vc-diff*, but it's far from clear to me why that is the case.
Does it mean you will not be terribly mad if I remove the read-only
setting from "M-x diff", and let it behave as every other client of
diff-mode?
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 15:18 ` Eli Zaretskii
@ 2024-04-28 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-04 11:22 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-04-28 15:30 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 70587, jidanni
> Does it mean you will not be terribly mad if I remove the read-only
> setting from "M-x diff", and let it behave as every other client of
> diff-mode?
I don't have a strong opinion on this, no (diff-mode buffers are
among those where I use `C-x C-q` most frequently).
`C-x v =` is an important "client of diff-mode" (arguably more
important than `M-x diff`), and it does make `*vc-diff*` read-only,
so if you want to change `M-x diff`, I suggest you change `C-x v =` at
the same time.
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 5:13 ` Eli Zaretskii
2024-04-28 9:04 ` Dan Jacobson
2024-04-28 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-04-28 20:35 ` Dmitry Gutov
2024-04-29 6:57 ` Eli Zaretskii
2024-04-30 9:56 ` Dan Jacobson
2 siblings, 2 replies; 22+ messages in thread
From: Dmitry Gutov @ 2024-04-28 20:35 UTC (permalink / raw)
To: Eli Zaretskii, Stefan Monnier; +Cc: 70587, jidanni
On 28/04/2024 08:13, Eli Zaretskii wrote:
>> But if we install the above patch, then*vc-diff* will suddenly not be
>> read-only any more, so we should arguably change
>> `diff-default-read-only` at the same time, which will in turn cause
>> another behavior change when people open a `.diff` file.
> Why should*vc-diff* be read-only regardless of
> diff-default-read-only? And why visiting a .diff file is different in
> this regard?
I also think that we should flip diff-default-read-only to true, and
drop the special casing in vc-diff. :-)
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 20:35 ` Dmitry Gutov
@ 2024-04-29 6:57 ` Eli Zaretskii
2024-04-30 9:56 ` Dan Jacobson
1 sibling, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-04-29 6:57 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 70587, monnier, jidanni
> Date: Sun, 28 Apr 2024 23:35:34 +0300
> Cc: 70587@debbugs.gnu.org, jidanni@jidanni.org
> From: Dmitry Gutov <dmitry@gutov.dev>
>
> On 28/04/2024 08:13, Eli Zaretskii wrote:
> >> But if we install the above patch, then*vc-diff* will suddenly not be
> >> read-only any more, so we should arguably change
> >> `diff-default-read-only` at the same time, which will in turn cause
> >> another behavior change when people open a `.diff` file.
> > Why should*vc-diff* be read-only regardless of
> > diff-default-read-only? And why visiting a .diff file is different in
> > this regard?
>
> I also think that we should flip diff-default-read-only to true, and
> drop the special casing in vc-diff. :-)
That doesn't answer my questions.
Flipping the default value would require much more than 2 or 3 people
asking for it.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 20:35 ` Dmitry Gutov
2024-04-29 6:57 ` Eli Zaretskii
@ 2024-04-30 9:56 ` Dan Jacobson
1 sibling, 0 replies; 22+ messages in thread
From: Dan Jacobson @ 2024-04-30 9:56 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: Eli Zaretskii, Stefan Monnier, 70587
[-- Attachment #1: Type: text/html, Size: 864 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-04-28 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-04 11:22 ` Eli Zaretskii
2024-05-04 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 22+ messages in thread
From: Eli Zaretskii @ 2024-05-04 11:22 UTC (permalink / raw)
To: Stefan Monnier, Dmitry Gutov; +Cc: 70587, jidanni
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: jidanni@jidanni.org, 70587@debbugs.gnu.org
> Date: Sun, 28 Apr 2024 11:30:26 -0400
>
> > Does it mean you will not be terribly mad if I remove the read-only
> > setting from "M-x diff", and let it behave as every other client of
> > diff-mode?
>
> I don't have a strong opinion on this, no (diff-mode buffers are
> among those where I use `C-x C-q` most frequently).
>
> `C-x v =` is an important "client of diff-mode" (arguably more
> important than `M-x diff`), and it does make `*vc-diff*` read-only,
> so if you want to change `M-x diff`, I suggest you change `C-x v =` at
> the same time.
So the two most important clients of diff-mode unconditionally make
the buffer read-only, but we have a diff-mode option that by default
leaves the buffer writable? This makes absolutely no sense to me!
Does anyone have any explanation for how we ended up in this
situation?
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-05-04 11:22 ` Eli Zaretskii
@ 2024-05-04 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-04 21:40 ` Dan Jacobson
0 siblings, 1 reply; 22+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-05-04 14:36 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Dmitry Gutov, 70587, jidanni
> Does anyone have any explanation for how we ended up in this
> situation?
I view the read-only or not status as something that depends more on
where the data came from than on the mode being used for it.
[ So, by and large, I agree with Dan that things like `*Shell Command
Output*` and errors buffers might benefit from being made read0only by
default. ]
Stefan
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-05-04 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-05-04 21:40 ` Dan Jacobson
2024-05-05 5:36 ` Eli Zaretskii
0 siblings, 1 reply; 22+ messages in thread
From: Dan Jacobson @ 2024-05-04 21:40 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Dmitry Gutov, Eli Zaretskii, 70587
On Sat, May 04, 2024 at 10:36:07AM -0400, Stefan Monnier wrote:
> [ So, by and large, I agree with Dan that things like `*Shell Command
> Output*` and errors buffers might benefit from being made read0only by
> default. ]
Currently there is no way for users to even make *Shell Command
Output* read only even if they wanted. No hook. No variable. Nothing.
Execpt of course manually hitting C-x C-q. Good thing at least one can also set view-read-only.
Also what's so good about having *Shell Command Output* read-write,
when anything you change will get lost? Unless OK, you are planning to
feed it back in to a second shell-command-on-region.
^ permalink raw reply [flat|nested] 22+ messages in thread
* bug#70587: More buffers that ought to be read-only
2024-05-04 21:40 ` Dan Jacobson
@ 2024-05-05 5:36 ` Eli Zaretskii
0 siblings, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2024-05-05 5:36 UTC (permalink / raw)
To: Dan Jacobson; +Cc: dmitry, 70587, monnier
> Date: Sun, 5 May 2024 05:40:03 +0800
> From: Dan Jacobson <jidanni@jidanni.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, Dmitry Gutov <dmitry@gutov.dev>,
> 70587@debbugs.gnu.org
>
> On Sat, May 04, 2024 at 10:36:07AM -0400, Stefan Monnier wrote:
> > [ So, by and large, I agree with Dan that things like `*Shell Command
> > Output*` and errors buffers might benefit from being made read0only by
> > default. ]
>
> Currently there is no way for users to even make *Shell Command
> Output* read only even if they wanted. No hook. No variable. Nothing.
>
> Execpt of course manually hitting C-x C-q. Good thing at least one can also set view-read-only.
I'm okay with adding a hook, patches welcome.
> Also what's so good about having *Shell Command Output* read-write,
> when anything you change will get lost? Unless OK, you are planning to
> feed it back in to a second shell-command-on-region.
I'm sorry, but this kind of reasoning is a non-starter. That you
personally (and a couple of others) would prefer those buffers to be
read-only is not a reason good enough to make the change affect
everyone else, given that the current behavior is very old. Not going
to happen.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2024-05-05 5:36 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 1:16 bug#70587: More buffers that ought to be read-only Dan Jacobson
2024-04-26 9:58 ` Sean Whitton
2024-04-26 10:48 ` Eli Zaretskii
2024-04-26 11:02 ` Dan Jacobson
2024-04-26 11:13 ` Eli Zaretskii
2024-04-27 7:24 ` Dan Jacobson
2024-04-27 7:57 ` Eli Zaretskii
2024-04-27 8:15 ` bug#70602: Add hooks to control *Shell Command Output* Dan Jacobson
2024-04-28 3:02 ` bug#70587: More buffers that ought to be read-only Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 4:26 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 5:13 ` Eli Zaretskii
2024-04-28 9:04 ` Dan Jacobson
2024-04-28 14:57 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-28 15:18 ` Eli Zaretskii
2024-04-28 15:30 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-04 11:22 ` Eli Zaretskii
2024-05-04 14:36 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-04 21:40 ` Dan Jacobson
2024-05-05 5:36 ` Eli Zaretskii
2024-04-28 20:35 ` Dmitry Gutov
2024-04-29 6:57 ` Eli Zaretskii
2024-04-30 9:56 ` Dan Jacobson
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).