unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
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 19:39:25 +0300	[thread overview]
Message-ID: <83ttri1a2q.fsf@gnu.org> (raw)
In-Reply-To: <jwvy1gu8irl.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Mon, 25 Sep 2023 09:52:36 -0400)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: kediez@gmail.com,  66181@debbugs.gnu.org
> Date: Mon, 25 Sep 2023 09:52:36 -0400
> 
> >> > 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.

Would it work (and be okay) to make inhibit-modification-hooks
buffer-local in a buffer in which occur-edit-mode is turned on?





  reply	other threads:[~2023-09-25 16:39 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
2023-09-25 16:39           ` Eli Zaretskii [this message]
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

  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=83ttri1a2q.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=66181@debbugs.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 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).