unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 70587@debbugs.gnu.org, Dan Jacobson <jidanni@jidanni.org>
Subject: bug#70587: More buffers that ought to be read-only
Date: Sat, 27 Apr 2024 23:02:16 -0400	[thread overview]
Message-ID: <jwvpluajiyh.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86zftfw841.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 27 Apr 2024 10:57:34 +0300")

> 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






  parent reply	other threads:[~2024-04-28  3:02 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-04-28  4:26             ` 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  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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpluajiyh.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70587@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=jidanni@jidanni.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).