From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#46407: 27.1; Hooks with permanent-local-hook are not cleared of lambdas Date: Tue, 25 May 2021 21:10:04 +0200 Message-ID: <87o8cypr3n.fsf@gnus.org> References: <87im7182fn.fsf@miha-pc> <87eedvajan.fsf@gnus.org> <87r1hv2sr0.fsf@miha-pc> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27134"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46407@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 25 21:11:13 2021 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 1llcSP-0006x3-Pd for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 21:11:13 +0200 Original-Received: from localhost ([::1]:51958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llcSO-0008TE-Sw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 25 May 2021 15:11:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llcSE-0008Ii-25 for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llcSD-0002fL-Qj for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:11:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llcSD-00011n-LL for bug-gnu-emacs@gnu.org; Tue, 25 May 2021 15:11:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 May 2021 19:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46407 X-GNU-PR-Package: emacs Original-Received: via spool by 46407-submit@debbugs.gnu.org id=B46407.16219698163876 (code B ref 46407); Tue, 25 May 2021 19:11:01 +0000 Original-Received: (at 46407) by debbugs.gnu.org; 25 May 2021 19:10:16 +0000 Original-Received: from localhost ([127.0.0.1]:46787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llcRT-00010Q-LM for submit@debbugs.gnu.org; Tue, 25 May 2021 15:10:15 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:48540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llcRS-000108-2b for 46407@debbugs.gnu.org; Tue, 25 May 2021 15:10:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vU53vgvXIYUbD/co1UjVRAxluTcAe355b5e0qvkVGQo=; b=FwQoPhK0Qm51VPh+CxQC8gFfZG 225y66cwKhwVkVe7zQ1riIhiKpudfAA17SQ5tBYgd834Wbnb833KgphX0lnxoYjMmlnNpk/xfcc31 pcoEsECd8d/q59o6lzTb4uAPSIWWBqP+YDohhfb4+QHlrmGsy74FjBePanYy44Xir6mM=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1llcRI-00042w-QM; Tue, 25 May 2021 21:10:07 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEWhloxiWlaLf3c3 MTDaybT///+9ycUnAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UFGRMDE95fuMAAAAGpSURBVDjLbZTb leQgDEQFZwNwoQSEnMBiNv/YthDGdnebjzkeLnqXWmQdIMMkj0/twHWfei/YMrY3UC3xxl0b+gVc +2ZSASPoN8ionV5ycbesvekNiha3Cs/uvfcrRmpFDwJljErQFtBWpwW8KkHEMBE+omO3VJ6AEeK7 FxeUkdQJ6CHuW8lei+MEFjUEMHEpFberSEP7YaNT0E9AF+7DPKNfgLFZwwhGE3sAlmdO3ofRNFkF Mh+TnZ1ggY7bIqrMew/CtPAAcvaIpMD0ASyS4xhLxHlYzIYhwMcZDYsQr6B2JvgNio7Qm5h9gjpz +rpdoOLnfigLjhfA4IXJ/gLZG6dXpnw/LY6M0O73UVq8JCU5tfoWgtsB6DYGI1QLu0qxUoBAlHcd ib9DF9pYR7+O6PXJbcFJhsV81sZ/7lnOKXIm52tdK0F5WR45Lzc/zRiBG2ZCRVZOdZvyisxq4mIC x0b5IE3h0YBLlsT+AH//yR5gekPd+Y61H8O61TRHpDM8fwC8hOLWvEIgzk3goq2WrA5GBjokN2s/ ZWs52nh3p0moKzpcFgg5/gfvWFgFvoa84AAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNS0yNVQx OTowMzoxOSswMDowMCPE14kAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDUtMjVUMTk6MDM6MTkr MDA6MDBSmW81AAAAAElFTkSuQmCC X-Now-Playing: Ultra Milkmaids's _Mort Aux Vaches_: "Vor-juble 2" In-Reply-To: <87r1hv2sr0.fsf@miha-pc> (jakanakaevangeli@chiru.no's message of "Tue, 25 May 2021 09:10:43 +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:207233 Archived-At: writes: > On the other hand, this side effect is so undocumented and > undiscoverable (and most probably not really of any use as well), that I > highly doubt there is even a single instance of anyone relying in it > deliberately. I may be wrong though. Yeah, that's the problem -- it's hard to say whether anybody relies on this weird behaviour. There are no in-tree usages of permanent-local-hook at all as far as I can see, so I wondered whether is was used at all: https://github.com/search?q=permanent-local-hook+extension%3A.el&type=Code&ref=advsearch&l=&l= And the answer is yes. (But that doesn't tell us if anybody relies on the non-symbol behaviour, though.) > I'm personally in favour of fixing the `kill-all-local-variables' > inconsistency (patch follows). > > If not, then yes, we should document it in add-hook and fix the info > node I mentioned. Though that would leave virtually every local addition > of a lambda to a hook invalid and a possible bug (a quick grep reveals > that there are at least three such usages in Emacs itself). I'm leaning towards applying your patch (i.e., changing the behaviour as you suggest), because it's somewhat difficult to imagine anybody relying on the current, odd behaviour. Does anybody object? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no