all messages for Emacs-related lists mirrored at yhetil.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: 70820@debbugs.gnu.org, Visuwesh <visuweshm@gmail.com>
Subject: bug#70820: [PATCH] Editable grep buffers
Date: Sat, 18 May 2024 09:34:25 -0400	[thread overview]
Message-ID: <jwvttivntcl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <864jb89zwq.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 08 May 2024 16:49:41 +0300")

>> > I don't think I understand this difficulty, either: with
>> > occur-edit-mode it is solved by making occur-edit-mode be derived from
>> > occur-mode.  Couldn't you do the same with your mode?
>> 
>> No because occur-mode makes occur-revert-arguments permanent-local so
>> `g' survives the major-mode changes.
>> 
>> For revert-buffer alone, compilation-arguments needs to be marked
>> permanent-local.  As it is a part of compile.el, I am not sure if
>> marking it as such is safe.  This is why I think having a minor-mode is
>> better.
>
> It sounds like a minor issue which shouldn't have such grave
> consequences.  Why do you think making compilation-arguments
> permanent-local would be a problem?  We could ask people who
> frequently contribute to compile.e land grep.el if they see any
> problem with doing that.

AFAICT it would be harmless to make it permanent-local.  Indeed, this
var belongs with the contents of the buffer rather than with its mode
(in a sense it is akin to `buffer-file-name` in that it says where the
contents comes from), so it makes a lot of sense to mark it
permanent-local.

Side note: I believe things become simpler&cleaner if you separate the
major mode function from the command that switches to it (just like
`wdired-change-to-wdired-mode` is separate from `wdired-mode`).

E.g. that lets you save&restore buffer-local vars like
`compilation-arguments`, and it let you remove or disable
`compilation--remove-properties` in a straightforward manner.


        Stefan






  parent reply	other threads:[~2024-05-18 13:34 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07 16:25 bug#70820: [PATCH] Editable grep buffers Visuwesh
2024-05-07 17:23 ` Jim Porter
2024-05-08  3:12   ` Visuwesh
2024-05-08  4:11     ` Jim Porter
2024-05-08  5:11       ` Visuwesh
2024-05-18 13:23   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-07 18:08 ` Eli Zaretskii
2024-05-08  3:22   ` Visuwesh
2024-05-08 11:58     ` Eli Zaretskii
2024-05-08 12:18       ` Visuwesh
2024-05-08 13:49         ` Eli Zaretskii
2024-05-09 10:32           ` Visuwesh
2024-05-12  4:45             ` Visuwesh
2024-05-18  9:28               ` Eli Zaretskii
2024-05-18 13:35                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18 15:44                   ` Eli Zaretskii
2024-05-18 16:27                     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18 16:28                       ` Eli Zaretskii
2024-05-20 10:10                         ` Visuwesh
2024-05-18 13:34           ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-08 17:37       ` Jim Porter
2024-05-08 18:42         ` Eli Zaretskii
2024-05-08 19:19           ` Jim Porter
2024-05-08 19:23             ` Jim Porter
2024-05-09  4:41               ` Eli Zaretskii
2024-05-09 16:14                 ` Jim Porter

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

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

  git send-email \
    --in-reply-to=jwvttivntcl.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70820@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=visuweshm@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.