From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.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: Mon, 30 Nov 2020 20:01:48 +0100 Message-ID: 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> <87h7sp1xay.fsf@gnus.org> <83r1rgpusx.fsf@gnu.org> <87pn5u7m0y.fsf@gnus.org> <5bdc73dd-af73-1b9a-9bb4-e154787e1976@gmx.at> <87a6uzan9s.fsf@tcd.ie> <71b78484-b0a7-3e0e-a999-afa07f8b4832@gmx.at> <87lfeioh0v.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29464"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 34765@debbugs.gnu.org, alexanderm@web.de, Lars Ingebrigtsen , monnier@IRO.UMontreal.CA To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 30 20:03:55 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kjoSn-0007WK-SK for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 20:03:53 +0100 Original-Received: from localhost ([::1]:46198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjoSl-0005WQ-8P for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Nov 2020 14:03:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjoRy-0005Vr-CQ for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 14:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjoRy-00070m-58 for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 14:03:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjoRy-0008LT-18 for bug-gnu-emacs@gnu.org; Mon, 30 Nov 2020 14:03: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: Mon, 30 Nov 2020 19:03: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.160676292231980 (code B ref 34765); Mon, 30 Nov 2020 19:03:01 +0000 Original-Received: (at 34765) by debbugs.gnu.org; 30 Nov 2020 19:02:02 +0000 Original-Received: from localhost ([127.0.0.1]:56666 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjoR0-0008Jk-Ie for submit@debbugs.gnu.org; Mon, 30 Nov 2020 14:02:02 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:48615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjoQy-0008JE-7C for 34765@debbugs.gnu.org; Mon, 30 Nov 2020 14:02:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606762910; bh=duReucDFI/xRxrxfPhmhVeB5b1C5ERqCA4wrDA7DdPM=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=lClxIA98Q4xRmTm+tddsI5B3bOWcoa6X7tT6KTcQmbhRImn7C2xZaati/uzCQnGc9 8FjwTn1XjBgNW59JNZhXro9/DkLdHEMDBLdfjmHfjuZQ74EaTMjg/KTW2kK4viEZWV TZQLKCoN1SqXhfGGkkz9/eXY/tovrKb2NX7rjNQM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [192.168.1.101] ([46.125.249.88]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MOiHf-1kXx0T2Nw7-00QFMF; Mon, 30 Nov 2020 20:01:50 +0100 In-Reply-To: <87lfeioh0v.fsf@tcd.ie> Content-Language: en-US X-Provags-ID: V03:K1:jm/Sx6NDGwTR0kBpDMgR/zVC0NjKxby7qEOzx5Aal2OBA1xb76Q FZmNFZSOljGo+cdQUidGTMtcCZaBGdD0p3wbtpdIz1Ru1qJ2j1nvKOezih6GGoC7m82TfwO +4CfsyGccmcdxd9e7MCnGr5P882SFTLlyOkUxW4SXnZvvwLdD6bQOX0nTIhdSppmh94HsYi sR7axDPJpNQeg4CIYozFg== X-UI-Out-Filterresults: notjunk:1;V03:K0:sHgGe7k8YOk=:rNfEnXdbo3jWv5X2pxk3VI pYLaAVT6D6AHTS/1MVRoEYdHqk5UEnsgUM6tlUApgf54UpJfZvW+ytAwgUC7eABR9HB7O9kHb KEnPTHTauQZrKnFQ8mguGOR4S1rasazKd4AkxqURsPLuHQo+LxsecU6ZVDJjBLph0Gv982DXO iKRMvN5GJQnfVkAJzWTj7dDq6xIsnF0jNptcM/AaE730WKVJCialw5C3Tm29ZCEOUNKgmdG6D tqATk0NNHYSiCsSCfpU3GQJggz/6eUm3rWcSElfOtBNt5lr2mFqMae07P1BnueqeaZWKQw3lB SFhZcKcwGjwDsGG4BgTf6wCM90b+LbecxObbDyXJfphFJYGHK3857drRWrq4xuf+g4zGjXGan PrhgvMyfFuWc5+zGcmnAfBab2qkhVLVp3y9cOB0U5VFVhfw6yNbDv+nKd5j+yFP8BYjpAW+u2 uzhX9DR0jouoklzk1qu3cM9eu5TEICpEf3iLfpdws0QYqfv3cT+K75aFtJB0w0tZWQ2hmCmsY hWVkr6wJM1dxoceFUb+Rumj4j4COwaTJsVT1ps0759PwFxhc6bcdhKrgQSrIX2q+VhCEi0P5F kTqvT2627D8DyO0AMRtkCbbbyIpGqQh7i3OvyCYx4lrqrEF/2HyH1MNzzdgxXBm2gKTp9qpg2 68NX7KkOqr4yPnXfGn7B++Fr0Qtupel/q/eU9XkWs4JD9TTIwd9CVGsjSR+0pCDPGVPF65ix0 VMEicfTrFjde/T7I+cFtX/zGQWgzKefOvWC2MzUkISuOibvGd7KXAW4j7YszvnKwytyau974 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194674 Archived-At: > I'm slightly confused about the conclusion of this thread, though. > You and Eli said it was too radical to set inhibit_buffer_hooks based > on whether a buffer name starts with a space, as there may be legitimate > cases where those hooks should run in a temporary buffer. Yes. > I accept this, but I don't see how setting inhibit_buffer_hooks based on > a new optional argument to Fgenerate_new_buffer (and/or > Fget_buffer_create) solves the problem entirely. > > If I create a temporary buffer with the proposed > > (generate-new-buffer "foo" t) > > then how do I later tell Emacs that this buffer's hooks should run? > > In other words, can we be sure that the buffers we choose to create with > inhibit_buffer_hooks set will *never* need to later unset it? > > Should we expose a getter or setter for this buffer member, or is that > opening ourselves up to abuse? I'm not sure. But if we do that, we can get rid of the rest: We'd just generate the new buffer and set/reset its hook inhibitor afterwards. > I suppose if someone *really* wanted to un-temporarify a buffer with > inhibit_buffer_hooks set, they could create a new, non-temporary buffer > and swap buffer contents, or something to that effect? Admittedly clumsy. > Am I wildly misunderstanding something here? I don't think so. >> And also tell us why 'buffer-list-update-hook' would be still needed now >> that we have 'window-selection-change-functions'. > > I've yet to look into these hooks and their precise semantics, but are > you suggesting that one might obsolete the other, in which case we > should deprecate the old one? People usually don't care about the buffer lists, they always wanted to run a hook when a window got selected in a more permanent fashion. At the time of adding 'buffer-list-update-hook', I thought that it fulfilled some of the criteria wanted for a 'select-window-hook' and added text in that sense to the manual. So if you care about the buffer lists, 'buffer-list-update-hook' is the one to use. If you care about window selection, 'window-selection-change-functions' is the one. martin