From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook Date: Wed, 06 Mar 2019 18:57:07 +0100 Message-ID: <5C8009F3.5000405@gmx.at> References: <5C7FD591.9090505@gmx.at> <83lg1sc8ob.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="190986"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 34765@debbugs.gnu.org, alexanderm@web.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Mar 06 18:58:13 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 1h1ao0-000nX6-Id for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 18:58:12 +0100 Original-Received: from localhost ([127.0.0.1]:36979 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1anz-0008Uo-KY for geb-bug-gnu-emacs@m.gmane.org; Wed, 06 Mar 2019 12:58:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57058) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1anu-0008Uh-4u for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 12:58:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1anr-0006ys-1i for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 12:58:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49338) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h1anq-0006yW-Jx for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 12:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h1anq-0007Av-Bk for bug-gnu-emacs@gnu.org; Wed, 06 Mar 2019 12:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Mar 2019 17:58:02 +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.155189504827532 (code B ref 34765); Wed, 06 Mar 2019 17:58:02 +0000 Original-Received: (at 34765) by debbugs.gnu.org; 6 Mar 2019 17:57:28 +0000 Original-Received: from localhost ([127.0.0.1]:34649 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1anH-0007A0-Ku for submit@debbugs.gnu.org; Wed, 06 Mar 2019 12:57:27 -0500 Original-Received: from mout.gmx.net ([212.227.15.18]:55969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h1anF-00079m-OJ for 34765@debbugs.gnu.org; Wed, 06 Mar 2019 12:57:26 -0500 Original-Received: from [192.168.1.100] ([213.162.73.163]) by mail.gmx.com (mrgmx001 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M8m7Q-1hDinS0dIq-00C9iZ; Wed, 06 Mar 2019 18:57:18 +0100 In-Reply-To: <83lg1sc8ob.fsf@gnu.org> X-Provags-ID: V03:K1:x5bVcPOxwV8CFW8CLJAyVdRuj2WCn4OweHdZ9bD/fF8YZYATCCj FLYHTHJTFZr2zMJdAQjE27785KrdnSh+FXAZF8VaWnzLluGJVx14evdfw+55qUJXRmdJ0Se 6utij+dmNgH83Gev/DikkXDbUQ8slf54+QehaNR8UkriT1uXjDe/jJrRjz0H5vng8ev/atN cZD0ZVvLGhwY4Pi3Q6Oug== X-UI-Out-Filterresults: notjunk:1;V03:K0:jjdPIREU/vY=:C1thZr3QF6dtdf7qa5FcuM nvPQVDUvMcxSQjf4zNNdiFTbaszqSN6gExWmSboIuLHVz4bg4rQv5DRZyLm2Feh2Mghi5Hyqn fXkDMhnC/Ru2BEYJNXPXUUmEb3StFeBIfzdEnkqfDcLAE7j3XB0gy8mEgQoGiHfj/3/wzixe+ FQjKeiFScYhpboIzdKcn0/u6pbBNsUv0/Wm1IK3KVFGH9K/Pz1A3URzqK06TYp8S/9ESljvvv kFOS00gjQHtfCQ9LcCY0wMZBPSwBhjT0sfez9bIed8+p09kd/EJ3IUSi9RX2pZpvLYDRJWwkW fhUf05uUnCKnVDb/gP5VcnYrjlwdQqluDkwhlwM9M64bOaZ//7yfN/TMsrCjPjZm7xvvqrDHY sxB8GwkquN9B9TFgQwoODUj63KlE6OAu61PoAp+PjNcROWs0f8RaWCwtFdT4CwVEmE0QMKp9Y g3LI5hwLBtNjskgW0Uqo6bZpESYVo+IuFNumG3hv9QoqGbz3D/XWCBfAIYPenxthJiZd1gbip ARVyVjgftARzDuD7DZs114/2M4Cj34ycwOwTz8LiQA3owywVwVKBUpeGDckA+wWz2329JK/Fi BraidCRUpQZhwwlInud0vm2/IJxYVZbKILVHamLCQ6tWJFb1QtVeKxHFqordPU/hXmk+1E2fu n/arzjju7xeIuX/c5cSPhsIVnT1XVWy06KFKUvhczhwSIvHDlv3YmEsEA7Qp7RvPyHfJZUAuP cKTnn6VEZj23kv7Jp5jxmlAa0WWi0ZGfTatOKqmTB/0h6pW6uh50KbJ7omW2KdcdP7XS4uLi 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:156105 Archived-At: >> Maybe we should indeed rebind 'buffer-list-update-hook' around the >> 'generate-new-buffer' and 'kill-buffer' calls of 'with-temp-buffer'. > > Wouldn't that be a backward-incompatible change? It would be a backward-incompatible change. > How long did we call > that hook for temporary buffers? Ever since that hook existed. > Also, can generate-new-buffer and/or > kill-buffer run some hooks which might modify other, non-temporary > buffers? 'generate-new-buffer' calls 'get-buffer-create' and that one runs only 'buffer-list-update-hook'. 'kill-buffer' runs its usual hooks and if one of them runs 'kill-buffer' for another buffer we'd have a problem. An even more radical solution would be to never run 'buffer-list-update-hook' for buffers whose name starts with a space. Backward-incompatible as well but cleaner from a designer's POV. In either case it wouldn't help the OP since he probably (hopefully) won't need a solution for Emacs 27 (where he should be able to use 'window-selection-change-functions' instead) and we are certainly not going to change this for Emacs 26. martin