GNU bug report logs -
#34765
26.1; with-temp-buffer should not run buffer-list-update-hook
Previous Next
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
> Cc: contovob <at> tcd.ie, 34765 <at> debbugs.gnu.org, alexanderm <at> web.de,
> monnier <at> IRO.UMontreal.CA
> From: martin rudalics <rudalics <at> gmx.at>
> Date: Wed, 22 May 2019 10:32:39 +0200
>
> >> I have not managed to understand the Vcode_conversion_workbuf_name
> >> vs Vcode_conversion_reused_workbuf rigmarole yet.
> >
> > The latter is a fixed buffer, created once and never killed. So the
> > buffer hooks never run for it, and never affect Emacs. By contrast,
> > the former is a buffer created when the reused buffer is busy and
> > cannot be reused. We then kill Vcode_conversion_workbuf_name when we
> > no longer need it. Thus, buffer hooks run for these work buffers all
> > the time, and for a code-conversion intensive code they could slow
> > down Emacs, specially if the list of buffer hooks is long.
>
> Thanks, I hope I understand it now. Could you pretty please add the
> (instructive for me) "a buffer created when the reused buffer is busy
> and cannot be reused" somewhere to the comments maybe together with a
> reference to reused_workbuf_in_use.
Not sure where you want to add this. coding.c already says:
/* Name (or base name) of work buffer for code conversion. */
Lisp_Object Vcode_conversion_workbuf_name;
/* A working buffer used by the top level conversion. Once it is
created, it is never destroyed. It has the name
Vcode_conversion_workbuf_name. The other working buffers are
destroyed after the use is finished, and their names are modified
versions of Vcode_conversion_workbuf_name. */
static Lisp_Object Vcode_conversion_reused_workbuf;
/* True iff Vcode_conversion_reused_workbuf is already in use. */
static bool reused_workbuf_in_use;
is that what you wanted to see?
> Hopefully this also means that we can use _something like_
> Fgenerate_new_buffer to replace both instances of Fget_buffer_create
> in code_conversion_restore.
You mean code_conversion_save, I presume.
One of those calls to Fget_buffer_create shouldn't generate a new
name, though. It should always use a fixed name.
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.