unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" 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: larsi@gnus.org, 49160@debbugs.gnu.org, dick.r.chiang@gmail.com
Subject: bug#49160: 28.0.50; [PATCH] Uninitialized inhibit_buffer_hooks
Date: Wed, 11 Jan 2023 21:16:20 +0000	[thread overview]
Message-ID: <871qo0vkkb.fsf@tcd.ie> (raw)
In-Reply-To: <83wn5slt22.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 11 Jan 2023 15:22:32 -0500")

Eli Zaretskii [2023-01-11 15:22 -0500] wrote:

>> From: "Basil L. Contovounesios" <contovob@tcd.ie>
>> Cc: Eli Zaretskii <eliz@gnu.org>,  49160@debbugs.gnu.org,  dick
>>  <dick.r.chiang@gmail.com>
>> Date: Wed, 11 Jan 2023 20:13:21 +0000
>> 
>> Fmake_indirect_buffer continues to run buffer-list-update-hook
>> regardless of the new argument.  Any objections to changing that?
>
> buffer-list-update-hook is not a buffer-hook, strictly speaking.

Right, but it's inhibited together with 'strict' buffer-hooks (and
documented as such) everywhere except for make-indirect-buffer: see
get-buffer-create, generate-new-buffer, struct buffer, "(elisp) Buffer
List", "(elisp) Creating Buffers", "(elisp) Buffer Internals", and
etc/NEWS.28.

In fact, "(elisp) Indirect Buffers" even says about
make-indirect-buffer:

     *Note Creating Buffers, for the meaning of INHIBIT-BUFFER-HOOKS.

Where "(elisp) Creating Buffers" elaborates:

     Both functions accept an optional argument INHIBIT-BUFFER-HOOKS.  If
  it is non-‘nil’, the buffer they create does not run the hooks
  ‘kill-buffer-hook’, ‘kill-buffer-query-functions’ (*note Killing
  Buffers), and ‘buffer-list-update-hook’ (*note Buffer List).  This
  avoids slowing down internal or temporary buffers that are never
  presented to users or passed on to other applications.

So while inhibit-buffer-hooks may be a slightly loose name, I think
make-indirect-buffer should nevertheless heed it for
buffer-list-update-hook as well, for the same reason this is done
everywhere else.

> So I'm not sure we want this.  What is the real-life use case behind
> this request?

The real-life use case is satisfying this bug report+patch from me,
fixing what seems like a simple oversight, and the ensuing peace of mind
that I will be grateful for, of course ;).

Thanks,

-- 
Basil





  reply	other threads:[~2023-01-11 21:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 19:39 bug#49160: 28.0.50; [PATCH] Uninitialized inhibit_buffer_hooks dick
2021-06-22 11:41 ` Eli Zaretskii
2021-07-19 16:23   ` Lars Ingebrigtsen
2021-07-19 16:47     ` Eli Zaretskii
2023-01-11 20:13     ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-11 20:23       ` Eli Zaretskii
2023-01-11 21:16         ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-01-12  7:39           ` Eli Zaretskii
2023-01-12 16:25             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-14 13:20               ` Eli Zaretskii
2023-01-14 14:01                 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-01-17 11:08                 ` Basil L. Contovounesios 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=871qo0vkkb.fsf@tcd.ie \
    --to=bug-gnu-emacs@gnu.org \
    --cc=49160@debbugs.gnu.org \
    --cc=contovob@tcd.ie \
    --cc=dick.r.chiang@gmail.com \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    /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).