From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 09 18:52:28 2021 Received: (at submit) by debbugs.gnu.org; 9 Feb 2021 23:52:28 +0000 Received: from localhost ([127.0.0.1]:55073 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9co0-0000rn-3K for submit@debbugs.gnu.org; Tue, 09 Feb 2021 18:52:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:44116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l9cnx-0000rf-Q3 for submit@debbugs.gnu.org; Tue, 09 Feb 2021 18:52:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9cnx-0002Ab-Ie for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 18:52:25 -0500 Received: from chiru.no ([142.4.209.132]:56124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1l9cnv-0003vI-HV for bug-gnu-emacs@gnu.org; Tue, 09 Feb 2021 18:52:25 -0500 Received: from localhost (BSN-77-156-43.static.siol.net [193.77.156.43]) by chiru.no (Postfix) with ESMTPSA id AD715128001B for ; Tue, 9 Feb 2021 23:52:21 +0000 (UTC) From: jakanakaevangeli To: bug-gnu-emacs@gnu.org Subject: 27.1; remove-hook doesn't remove entries from hook--depth-alist Date: Wed, 10 Feb 2021 00:56:14 +0100 Message-ID: <878s7w94o1.fsf@miha-pc> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=142.4.209.132; envelope-from=jakanakaevangeli@chiru.no; helo=chiru.no X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) add-hook can add an entry to the hook symbol's hook--depth-alist property and remove-hook doesn't remove it. This means that for each call to eval-after-load, after-load-functions' hook--depth-alist gets a new element when the feature is loaded, which can hinder performance. This can also cause problems if your completing-read-function uses (minibuffer-with-setup-hook (:append generated-function-symbol) (read-from-minibuffer ...)) This will add a new element to minibuffer-setup-hook's the depth alist for each completing-read session (such is the case when using selectrum.el [1] completion function). [1] https://github.com/raxod502/selectrum/ From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 09:41:10 2022 Received: (at 46414) by debbugs.gnu.org; 16 Jun 2022 13:41:10 +0000 Received: from localhost ([127.0.0.1]:41110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1pkE-0007Ci-7Q for submit@debbugs.gnu.org; Thu, 16 Jun 2022 09:41:10 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1pk9-0007Bc-Dg for 46414@debbugs.gnu.org; Thu, 16 Jun 2022 09:41:09 -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=Hh7xn1dKrApZ47FSrSCSuKpOmo/2+JEMAB6/awrQ7Jg=; b=Q4XFvLRdhaegMW6awgTuead+Hf aTLKDLiEhQMpdzhdcZyZBbXbPfgTiHYjUV8rG9hq1+v8BdmUOCMWaf1T4hwLS3Qwq8tSZu8cg+juK tcdseudsQMCEn8d5540+P2kuADnw8MtKF91W4FAXuR8BxpNPuG0n4p7kHA5d74DLk/yI=; Received: from [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 1o1pk0-0008BE-IK; Thu, 16 Jun 2022 15:40:59 +0200 From: Lars Ingebrigtsen To: jakanakaevangeli Subject: Re: bug#46414: 27.1; remove-hook doesn't remove entries from hook--depth-alist References: <878s7w94o1.fsf@miha-pc> X-Now-Playing: AR Kane's _Single Collection (1)_: "Baby Milk Snatcher" Date: Thu, 16 Jun 2022 15:40:56 +0200 In-Reply-To: <878s7w94o1.fsf@miha-pc> (jakanakaevangeli@chiru.no's message of "Wed, 10 Feb 2021 00:56:14 +0100") Message-ID: <87y1xwbuaf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: jakanakaevangeli writes: > add-hook can add an entry to the hook symbol's hook--depth-alist > property and remove-hook doesn't remove it. This means that for each > call to eval-after-load, after-load-functions' hook--depth-a [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 46414 Cc: 46414@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) jakanakaevangeli writes: > add-hook can add an entry to the hook symbol's hook--depth-alist > property and remove-hook doesn't remove it. This means that for each > call to eval-after-load, after-load-functions' hook--depth-alist gets a > new element when the feature is loaded, which can hinder performance. > > This can also cause problems if your completing-read-function uses > > (minibuffer-with-setup-hook (:append generated-function-symbol) > (read-from-minibuffer ...)) > > This will add a new element to minibuffer-setup-hook's the depth alist > for each completing-read session (such is the case when using > selectrum.el [1] completion function). (I'm going through old bug reports that unfortunately weren't resolved at the time.) The test case here isn't complete, so I can't test whether the problem is still present. I think it might have been fixed by: commit 4bd7963e2e244ace94afa59124f2637543d74ba2 Author: Stefan Monnier AuthorDate: Tue Feb 22 10:18:43 2022 -0500 (add-hook, remove-hook): Fix leaks (bug#48666) * lisp/subr.el (add-hook, remove-hook): Rewrite the hook depth management so we only keep the info relevant to functions present on the hook. Do you still see this problem in Emacs 29? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 09:41:13 2022 Received: (at control) by debbugs.gnu.org; 16 Jun 2022 13:41:13 +0000 Received: from localhost ([127.0.0.1]:41113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1pkH-0007Cz-Ge for submit@debbugs.gnu.org; Thu, 16 Jun 2022 09:41:13 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1pkE-0007CX-DD for control@debbugs.gnu.org; Thu, 16 Jun 2022 09:41:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FlPwi1Pond3CS5XDGyNrs2MhabAmnFpmU9Se/gy8mSk=; b=AeNPC/L9SUCizk9L3k+pMT9Plh 3C5WnhM9hAd+GawnXghuXfWq25TrWi61n4GudyRDDE/sKUY0YganZ3bOfFpOKsZ+bveb2UvGJRC+V HKPSXlmRb42iiqgxWpwcE2B4qO8sZqjZme1u05cWlndQMW+K/NvMwIkRjrOAPRvIaLdo=; Received: from [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 1o1pk6-0008BR-Ey for control@debbugs.gnu.org; Thu, 16 Jun 2022 15:41:04 +0200 Date: Thu, 16 Jun 2022 15:41:01 +0200 Message-Id: <87wndgbuaa.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #46414 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 46414 + moreinfo quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 46414 + moreinfo quit From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 16 10:08:09 2022 Received: (at 46414-done) by debbugs.gnu.org; 16 Jun 2022 14:08:09 +0000 Received: from localhost ([127.0.0.1]:42724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1qAL-0001z4-Ch for submit@debbugs.gnu.org; Thu, 16 Jun 2022 10:08:09 -0400 Received: from kamnitnik.top ([209.250.245.214]:59746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o1qAI-0001yu-N4 for 46414-done@debbugs.gnu.org; Thu, 16 Jun 2022 10:08:08 -0400 From: To: Lars Ingebrigtsen Subject: Re: bug#46414: 27.1; remove-hook doesn't remove entries from hook--depth-alist In-Reply-To: <87y1xwbuaf.fsf@gnus.org> References: <878s7w94o1.fsf@miha-pc> <87y1xwbuaf.fsf@gnus.org> Date: Thu, 16 Jun 2022 16:18:55 +0200 Message-ID: <877d5g4row.fsf@miha-pc> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46414-done Cc: 46414-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > jakanakaevangeli writes: > >> add-hook can add an entry to the hook symbol's hook--depth-alist >> property and remove-hook doesn't remove it. This means that for each >> call to eval-after-load, after-load-functions' hook--depth-alist gets a >> new element when the feature is loaded, which can hinder performance. >> >> This can also cause problems if your completing-read-function uses >> >> (minibuffer-with-setup-hook (:append generated-function-symbol) >> (read-from-minibuffer ...)) >> >> This will add a new element to minibuffer-setup-hook's the depth alist >> for each completing-read session (such is the case when using >> selectrum.el [1] completion function). > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > The test case here isn't complete, so I can't test whether the problem > is still present. I think it might have been fixed by: > > commit 4bd7963e2e244ace94afa59124f2637543d74ba2 > Author: Stefan Monnier > AuthorDate: Tue Feb 22 10:18:43 2022 -0500 > > (add-hook, remove-hook): Fix leaks (bug#48666) > > * lisp/subr.el (add-hook, remove-hook): Rewrite the hook depth > management so we only keep the info relevant to functions present on > the hook. > > Do you still see this problem in Emacs 29? > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no Yep it was fixed by this commit and also the related commit db92e83797bf2f1af4e0b0383283a49968746b51 Author: Stefan Monnier Date: Fri Apr 23 16:50:12 2021 -0400 * lisp/subr.el (add-hook): Try and fix bug#46326 Use `eq` indexing on `hook--depth-alist`. (remove-hook): Remove old entries from `hook--depth-alist`. Thanks. From unknown Sat Jun 14 00:09:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 15 Jul 2022 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator