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: 66181@debbugs.gnu.org, kediez@gmail.com
Subject: bug#66181: Subject: 29.1; Occur changes don't affect Dired buffer
Date: Mon, 25 Sep 2023 09:52:36 -0400	[thread overview]
Message-ID: <jwvy1gu8irl.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83y1gu1iv5.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 25 Sep 2023 16:29:34 +0300")

>> > Stefan, do we have any safe means of running the hooks in this case?
>> > I thought about running the buffer-local values of before- and
>> > after-change-functions by hand from occur-after-change-function,
>> > skipping the t entry, but I'm not sure this is safe.  It is certainly
>> > messy, so if there's a more elegant way, I'd like to know.
>> 
>> Arguably, the `inhibit-modification-hooks` let-binding that surrounds
>> code run from within modification hooks should be buffer-local, which
>> would solve these problems, AFAIK.
>
> Not sure I understand: we let-bind inhibit-modification-hooks in C,
> via specbind, and that binds the global value, since
> inhibit-modification-hooks is not a per-buffer variable.  Or am I
> missing something.

You're right that's what we currently do.

> Do you mean we should add a new specbind_local function that makes
> only a buffer-local let-binding?

For example, yes.  Or we could call `Fmake_local_variable` before the
`specbind`, or we could make `inhibit-modification-hooks` into one of
those vars that are "really always" buffer-local, like `major-mode`,
`buffer-file-name` and a few others.


        Stefan






  reply	other threads:[~2023-09-25 13:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 11:32 bug#66181: Subject: 29.1; Occur changes don't affect Dired buffer Maske
2023-09-24 16:21 ` Garjola Dindi
2023-09-25  7:29 ` Eli Zaretskii
2023-09-25  8:42   ` Eli Zaretskii
2023-09-25 13:07     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-25 13:29       ` Eli Zaretskii
2023-09-25 13:52         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-09-25 16:39           ` Eli Zaretskii
2023-09-25 17:04             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=jwvy1gu8irl.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=66181@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=kediez@gmail.com \
    --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 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.