From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#34765: 26.1; with-temp-buffer should not run buffer-list-update-hook Date: Sat, 19 Dec 2020 14:15:30 +0000 Message-ID: <878s9t6fwd.fsf@tcd.ie> References: <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> <83tut6iqbp.fsf@gnu.org> <87360qoa6o.fsf@tcd.ie> <878sa9cle0.fsf@tcd.ie> <87eejnaqzz.fsf@tcd.ie> <831rfmultr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12840"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 34765@debbugs.gnu.org, larsi@gnus.org, monnier@iro.umontreal.ca, alexanderm@web.de To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 15:16:28 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 1kqd24-0003Ey-Ij for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 15:16:28 +0100 Original-Received: from localhost ([::1]:46608 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqd23-0001aR-IK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 09:16:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqd1e-0001a0-TV for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 09:16:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqd1e-0006Jd-2Y for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 09:16:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqd1d-00011O-TP for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 09:16:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 14:16: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.16083873423900 (code B ref 34765); Sat, 19 Dec 2020 14:16:01 +0000 Original-Received: (at 34765) by debbugs.gnu.org; 19 Dec 2020 14:15:42 +0000 Original-Received: from localhost ([127.0.0.1]:41082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqd1K-00010p-5p for submit@debbugs.gnu.org; Sat, 19 Dec 2020 09:15:42 -0500 Original-Received: from mail-wm1-f51.google.com ([209.85.128.51]:50230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqd1G-00010a-NG for 34765@debbugs.gnu.org; Sat, 19 Dec 2020 09:15:40 -0500 Original-Received: by mail-wm1-f51.google.com with SMTP id 190so5508700wmz.0 for <34765@debbugs.gnu.org>; Sat, 19 Dec 2020 06:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=WopIZ+WUKH9ojptc2h4Du5B3T6+n/w8RYynKnR0ztBg=; b=bOFEq6rkwiq54picJSaM5TccW770YsB3WWoaoxTlsdRtc90ilKLTwXjKemEdI0tKiL D5+9q7Bcx7fhr1B2jaYdMJNQfJe/FJ6+kVHEemQ6rt+g0xOC7WN6Mer8/C5QJKrM3ulw PWEjkSvYzVpblb5Wan9H6xyvQJQtiR73pL4RHYo/SSPB5CLYJblb3dyPqJu7H3bg4dFI QwnyeZUBSkvql/Zpr2nTF6Fhw29q2S94cSno8lh1tOmkVYbhpBjy6aFENl5BdhJJAg5J 8caunf6E18jkUhzM+qJP7xaTs3C5LxheCFjfJdu5OxL22DxdKqwsDh6q4uvlpguGb4pJ eYXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=WopIZ+WUKH9ojptc2h4Du5B3T6+n/w8RYynKnR0ztBg=; b=Kg1WKyji4wwZqN8/XKsgv/yY0C+4OJCxaf20YyJktrsBIE9lCQsng3CXYZWOKUUfAn 3XvAi5YhNba3XHn/mkxbRb6ICqSc312IdSGLeBLq0ZEuA3KfNZcP8QSQnSmPl8NlF+fS BSOZb7qdgsiqG2CF7d6qk+EDV5GXPtM/qWzTtFnhV37zxP9/AmLh/Hl6ES4GAjzbGCGz gG0+8bVTa4vvXB5Hme0A/3Wc00pig3e13FKp4RKb3eAUDu/vxA8MuKxILt/APY785ZZz RG02DlzjwxrUASm+vSf6HIlPqnmRNDhMi3T/Cufw6QI4Zpa+d+QIAT9aIntHU+7ujxTW B/1w== X-Gm-Message-State: AOAM532/OsmIgCmwwe3KVdX4vH71h/JK6TibRVSvUtvJbq00puX7HYD/ 9QKvjHTSaMMGnpNik4q/vqff8w== X-Google-Smtp-Source: ABdhPJyIFmw3Bn+qYA18cCFBhhwHGeEbGa2V7LxmW5xWNT7qPGbNqMCO4E1Fhym3YhjKtYP8wNLVug== X-Received: by 2002:a7b:c091:: with SMTP id r17mr8532633wmh.129.1608387332649; Sat, 19 Dec 2020 06:15:32 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:877b:77af:3b46:790d]) by smtp.gmail.com with ESMTPSA id i18sm18636120wrp.74.2020.12.19.06.15.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Dec 2020 06:15:31 -0800 (PST) In-Reply-To: <831rfmultr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Dec 2020 12:33:36 +0200") 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:196387 Archived-At: Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Cc: Eli Zaretskii , rudalics@gmx.at, larsi@gnus.org, >> 34765@debbugs.gnu.org, alexanderm@web.de >> Date: Fri, 18 Dec 2020 18:49:52 +0000 >> >> * .dir-locals.el (c-mode): Enforce existing indent-tabs-mode policy. > > This should be in a separate commit, IMO. Okay, I pushed it separately. >> +By default, undo information (@pxref{Undo}) is not recorded in the >> +buffer created by this macro (but @var{body} can enable that, if >> +needed). The temporary buffer also does not run the hooks >> +@code{kill-buffer-hook}, @code{kill-buffer-query-functions} >> +(@pxref{Killing Buffers}), and @code{buffer-list-update-hook} >> +(@pxref{Buffer List}). > > It would be good to have here index entries about undo and those hooks > not being used by default in temporary buffers. Something like this? @cindex undo in temporary buffers @cindex @code{kill-buffer-hook} in temporary buffers @cindex @code{kill-buffer-query-functions} in temporary buffers @cindex @code{buffer-list-update-hook} in temporary buffers >> +Like @code{with-temp-buffer} (@pxref{Definition of with-temp-buffer,, > ^^^^^^^^^^ > I think this word will look better if not capitalized. The printed label "see Current Buffer" should be displayed instead of this word, which is part of the anchor. Is that okay? >> +static void >> +run_buffer_list_update_hook (struct buffer *buf) >> +{ >> + if (! (NILP (Vrun_hooks) || (buf && buf->inhibit_buffer_hooks))) > ^^^ > Why this test? is it possible for this function to be called with buf > a NULL pointer? Yes, in Fmake_indirect_buffer, which doesn't check inhibit_buffer_hooks. The alternatives would be for Fmake_indirect_buffer to not call run_buffer_list_update_hook, or to not bother adding run_buffer_list_update_hook at all. Do you have a preference? Thanks, -- Basil