bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook


From: Eli Zaretskii
Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook
Date: Thu, 25 Apr 2019 13:49:19 +0300

> Cc: 34765@debbugs.gnu.org, alexanderm@web.de, monnier@IRO.UMontreal.CA
> From: martin rudalics <rudalics@gmx.at>
> Date: Thu, 25 Apr 2019 12:31:20 +0200
> 
>  >>   > 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.
>  >>
>  >> We don't have a "template of temporary buffers".
>  >
>  > Of course we do: with-temp-buffer produces buffer names that follow
>  > such a template.
> 
> IIUC we'd need an expression similar to Vcode_conversion_workbuf_name
> to use in 'get-buffer-create'

That's what I meant, yes.

>  >> For example, a buffer specified by the BUFNAME arg of
>  >> 'with-output-to-temp-buffer' should not match such a template.
>  >
>  > Such buffers should not necessarily be exempt from running the hooks,
>  > AFAIU.  In any case, one can always bind the hook locally to nil in
>  > the body of the macro, right?
> 
> Unless the body changes the buffer list in some signifcant way, for
> example, by creating or deleting another buffer.

Sure, but that's why this should not be done unconditionally.

> Then what about the buffers created by 'with-temp-file' or
> 'with-output-to-string'?

Fine with me.  But the former already uses with-temp-buffer, so I
don't think we need anything special for it.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]