GNU bug report logs - #34765
26.1; with-temp-buffer should not run buffer-list-update-hook

Previous Next

Package: emacs;

Reported by: Alexander Miller <alexanderm <at> web.de>

Date: Tue, 5 Mar 2019 22:58:02 UTC

Severity: normal

Tags: fixed

Found in version 26.1

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


Message #158 received at 34765 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 34765 <at> debbugs.gnu.org, alexanderm <at> web.de,
 Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>,
 monnier <at> IRO.UMontreal.CA
Subject: Re: bug#34765: 26.1; with-temp-buffer should not run
 buffer-list-update-hook
Date: Mon, 30 Nov 2020 18:07:12 +0000
martin rudalics <rudalics <at> gmx.at> writes:

> If you think that patch is of some use, please try to
> polish it up and push it.  Honestly, I've forgotten all about it.

Sure, I'll give it a go.

I'm slightly confused about the conclusion of this thread, though.
You and Eli said it was too radical to set inhibit_buffer_hooks based
on whether a buffer name starts with a space, as there may be legitimate
cases where those hooks should run in a temporary buffer.

I accept this, but I don't see how setting inhibit_buffer_hooks based on
a new optional argument to Fgenerate_new_buffer (and/or
Fget_buffer_create) solves the problem entirely.

If I create a temporary buffer with the proposed

  (generate-new-buffer "foo" t)

then how do I later tell Emacs that this buffer's hooks should run?

In other words, can we be sure that the buffers we choose to create with
inhibit_buffer_hooks set will *never* need to later unset it?

Should we expose a getter or setter for this buffer member, or is that
opening ourselves up to abuse?

I suppose if someone *really* wanted to un-temporarify a buffer with
inhibit_buffer_hooks set, they could create a new, non-temporary buffer
and swap buffer contents, or something to that effect?

Am I wildly misunderstanding something here?

> And also tell us why 'buffer-list-update-hook' would be still needed now
> that we have 'window-selection-change-functions'.

I've yet to look into these hooks and their precise semantics, but are
you suggesting that one might obsolete the other, in which case we
should deprecate the old one?

Thanks,

-- 
Basil




This bug report was last modified 4 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.