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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 34765 <at> debbugs.gnu.org, alexanderm <at> web.de, monnier <at> IRO.UMontreal.CA
Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
Date: Wed, 24 Apr 2019 14:12:59 +0300
> Cc: 34765 <at> debbugs.gnu.org, alexanderm <at> web.de, monnier <at> IRO.UMontreal.CA
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Wed, 24 Apr 2019 09:27:59 +0200
> 
>  >> Stefan asked me to add a variable 'inhibit-buffer-list-update-hook'
>  >> and I came up with the attached.  WDYT?
>  >
>  > Did he also ask you to remove the inhibit_buffer_hooks flag of the
>  > buffer object?  I'd rather prefer that you set that flag for temporary
>  > buffers.  In any case, removing the flag will get back the problem
>  > with hidden buffers used by coding.c, right?  I don't want to lose
>  > that.
> 
> FWIW handling of the the inhibit_buffer_hooks flag is unaffected by my
> patch.

You are right, sorry.

>  > More generally, I don't understand the need for this variable.  If we
>  > just want to inhibit the hooks for temporary buffers, we don't need to
>  > provide a variable, we can do that internally and unconditionally.
>  > The variable assumes there are other legitimate use cases where a Lisp
>  > program would want to inhibit the hooks, and that we agree to let Lisp
>  > programs do that.  What are those use cases?
> 
> I don't know.  The one we care about in the case at hand is that of
> 'with-temp-buffer' which seems innocuous enough for being used in the
> body of a function run by 'buffer-list-update-hook'.  Since that macro
> is in subr.el and as such cannnot easily set the inhibit_buffer_hooks
> flag, the 'inhibit-buffer-list-update-hook' variable provides a simple
> workaround.

I meant to suggest that get-buffer-create sets this flag when the name
of the buffer fits the template of temporary buffers.  Exactly like it
does for code-conversion buffers now.




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.