From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook Date: Wed, 22 May 2019 13:06:48 +0300 Message-ID: <83woii7qh3.fsf@gnu.org> References: <5C7FD591.9090505@gmx.at> <83lg1sc8ob.fsf@gnu.org> <5C8009F3.5000405@gmx.at> <767e1b59-6ac2-cd11-076e-82a56ac53e29@gmx.at> <11be4631-b087-52a3-92fe-4cbd5248908d@gmx.at> <838svxxk41.fsf@gnu.org> <49c11920-0909-dcc2-4a39-4cdcfaf20453@gmx.at> <87lfzwg04h.fsf@tcd.ie> <87ftp9jl8q.fsf@tcd.ie> <5f39dc18-e4d4-dfbc-3bed-18542a10aedb@gmx.at> <87v9y4p7c6.fsf@tcd.ie> <838suz7xqi.fsf@gnu.org> <89140fef-3447-078f-32fe-8c9206e14c59@gmx.at> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="145333"; mail-complaints-to="usenet@blaine.gmane.org" Cc: contovob@tcd.ie, 34765@debbugs.gnu.org, monnier@IRO.UMontreal.CA, alexanderm@web.de To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 22 12:10:33 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hTOCf-000bdo-11 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2019 12:10:33 +0200 Original-Received: from localhost ([127.0.0.1]:39618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTOCd-0004Lv-H0 for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 May 2019 06:10:31 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:51787) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTO9H-0001ul-8Q for bug-gnu-emacs@gnu.org; Wed, 22 May 2019 06:07:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hTO9G-0003XP-54 for bug-gnu-emacs@gnu.org; Wed, 22 May 2019 06:07:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56276) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hTO9G-0003XC-0h for bug-gnu-emacs@gnu.org; Wed, 22 May 2019 06:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hTO9F-0004L3-Qm for bug-gnu-emacs@gnu.org; Wed, 22 May 2019 06:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 May 2019 10:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34765 X-GNU-PR-Package: emacs Original-Received: via spool by 34765-submit@debbugs.gnu.org id=B34765.155851961216660 (code B ref 34765); Wed, 22 May 2019 10:07:01 +0000 Original-Received: (at 34765) by debbugs.gnu.org; 22 May 2019 10:06:52 +0000 Original-Received: from localhost ([127.0.0.1]:41587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTO95-0004Kd-SR for submit@debbugs.gnu.org; Wed, 22 May 2019 06:06:52 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37337) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hTO92-0004KP-Ph for 34765@debbugs.gnu.org; Wed, 22 May 2019 06:06:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34985) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hTO8x-0003FM-4y; Wed, 22 May 2019 06:06:43 -0400 Original-Received: from [176.228.60.248] (port=4094 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hTO8w-0003hn-Eh; Wed, 22 May 2019 06:06:42 -0400 In-reply-to: <89140fef-3447-078f-32fe-8c9206e14c59@gmx.at> (message from martin rudalics on Wed, 22 May 2019 10:32:39 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159641 Archived-At: > Cc: contovob@tcd.ie, 34765@debbugs.gnu.org, alexanderm@web.de, > monnier@IRO.UMontreal.CA > From: martin rudalics > 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.