From unknown Sat Jun 21 10:46:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Reply-To: "Drew Adams" , 3984@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Thu, 30 Jul 2009 22:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124899348311760 (code B ref -1); Thu, 30 Jul 2009 22:45:04 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 30 Jul 2009 22:38:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,FOURLA autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6UMbwqi011738 for ; Thu, 30 Jul 2009 15:37:59 -0700 Received: from mx10.gnu.org ([199.232.76.166]:44014) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MWeG6-0007BK-2J for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 18:37:58 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MWeG3-0000LA-Hi for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 18:37:57 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:62178 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWeG2-0000Kh-Tb for emacs-pretest-bug@gnu.org; Thu, 30 Jul 2009 18:37:55 -0400 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6UMbph8012277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 30 Jul 2009 22:37:52 GMT Received: from abhmt008.oracle.com (abhmt008.oracle.com [141.146.116.17]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6UMbpRP002474 for ; Thu, 30 Jul 2009 22:37:51 GMT Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 30 Jul 2009 15:37:49 -0700 From: "Drew Adams" To: Date: Thu, 30 Jul 2009 15:37:50 -0700 Message-ID: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcoRZl7HPubUJvrqQI2E3BlLoTygVw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt008.oracle.com [141.146.116.17] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010208.4A7220BE.0059:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) emacs -Q Load (eval) this: (defun foo () (interactive) (if (interactive-p) (message "INT") (message "NOT"))) (global-set-key "\C-l" 'foo) (defadvice call-interactively (after foo-advice disable activate) (message "AFTER")) (ad-enable-advice 'call-interactively 'after 'foo-advice) (ad-activate 'call-interactively) Then hit `C-l'. In *Messages*, you will see this: NOT AFTER Even though `foo' is called interactively, `interactive-p' returns nil. Using `called-interactively-p' in place of `interactive-p' gives the same thing. Same thing no matter how `foo' is called interactively (e.g. M-x foo, M-: (call-interactively 'foo)). Seems like a bug, but I realize that advising primitives is iffy, and perhaps advising `call-interactively' is even more iffy. However, advising `call-interactively' seems to work fine otherwise - this is the only anomaly I've come across. Can someone please explain why this happens, or how to work around it? In GNU Emacs 23.0.96.1 (i386-mingw-nt5.1.2600) of 2009-07-09 on SOFT-MJASON Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4)' From unknown Sat Jun 21 10:46:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Reply-To: Stefan Monnier , 3984@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 02:25:20 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3984-submit@emacsbugs.donarmstrong.com id=B3984.124900667427855 (code B ref 3984); Fri, 31 Jul 2009 02:25:20 +0000 Received: (at 3984) by emacsbugs.donarmstrong.com; 31 Jul 2009 02:17:54 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.6 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6V2HkdK027842 for <3984@emacsbugs.donarmstrong.com>; Thu, 30 Jul 2009 19:17:51 -0700 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsFAErscUpFpZgv/2dsb2JhbACBUtElhBcFhxo X-IronPort-AV: E=Sophos;i="4.43,299,1246852800"; d="scan'208";a="42598403" Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 30 Jul 2009 21:58:52 -0400 Received: by pastel.home (Postfix, from userid 20848) id 05135800B; Thu, 30 Jul 2009 21:58:52 -0400 (EDT) From: Stefan Monnier To: Drew Adams Cc: 3984@debbugs.gnu.org, Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Date: Thu, 30 Jul 2009 21:58:51 -0400 In-Reply-To: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> (Drew Adams's message of "Thu, 30 Jul 2009 15:37:50 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > Can someone please explain why this happens, or how to work around it? Because the implementation of interactive-p (and called-interactively-p) is brittle: it looks at the latest stack frames to see the name of the caller, so if you add things between the call to `call-interactively' and the corresponding function call, it gets confused. To work around it, don't use `interactive-p' and instead add an optional argument (call it `interactive') to your function and pass it an explicit non-nil value from the interactive spec. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Reply-To: "Drew Adams" , 3984@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 14:25:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124904999117480 (code B ref -1); Fri, 31 Jul 2009 14:25:10 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 31 Jul 2009 14:19:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6VEJkP2017475 for ; Fri, 31 Jul 2009 07:19:48 -0700 Received: from mail.gnu.org ([199.232.76.166]:40751 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MWsxW-0002i1-9f for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 10:19:46 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MWsxU-00018l-Cq for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 10:19:45 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:26959 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWsxU-00017o-03 for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 10:19:44 -0400 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VEJLk0021737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 31 Jul 2009 14:19:23 GMT Received: from abhmt005.oracle.com (abhmt005.oracle.com [141.146.116.14]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VEJIRP018527; Fri, 31 Jul 2009 14:19:22 GMT Received: from dradamslap1 (/141.144.168.5) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Jul 2009 07:19:16 -0700 From: "Drew Adams" To: "'Stefan Monnier'" Cc: <3984@debbugs.gnu.org>, References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Date: Fri, 31 Jul 2009 07:19:13 -0700 Message-ID: <2707E3CF212E4D7B801D2F2EEAF54373@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcoRgp4jolXlfi9DRUGLPxFsZyYwqQAZs3iw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt005.oracle.com [141.146.116.14] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010208.4A72FD69.0035:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-CrossAssassin-Score: 2 > > Can someone please explain why this happens, or how to work > around it? > > Because the implementation of interactive-p (and > called-interactively-p) > is brittle: it looks at the latest stack frames to see the name of the > caller, so if you add things between the call to `call-interactively' > and the corresponding function call, it gets confused. > > To work around it, don't use `interactive-p' and instead add > an optional > argument (call it `interactive') to your function and pass it an > explicit non-nil value from the interactive spec. Unfortunately, the code with `interactive-p' is not mine. The defadvice is mine, but it needs to work for user functions, including those that call `interactive-p' or `called-interactively-p'. Is there no way the Emacs implementation could be fixed to handle this better? Couldn't it take into consideration the `ad-*' stuff that results from advising `call-interactively'? IOW, couldn't it look for `call-interactively' in its advised form also? From unknown Sat Jun 21 10:46:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Reply-To: Stefan Monnier , 3984@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 19:40:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124906872215704 (code B ref -1); Fri, 31 Jul 2009 19:40:08 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 31 Jul 2009 19:32:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.7 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6VJVwRU015698 for ; Fri, 31 Jul 2009 12:31:59 -0700 Received: from mx10.gnu.org ([199.232.76.166]:40652) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MWxpd-0000K8-Fs for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 15:31:57 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MWxpc-0000hp-EA for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 15:31:57 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:40325 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWxpc-0000hh-7U for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 15:31:56 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsEFAI/jckpFpZgv/2dsb2JhbACBUtJmhBgFhyI X-IronPort-AV: E=Sophos;i="4.43,304,1246852800"; d="scan'208";a="42645523" Received: from 69-165-152-47.dsl.teksavvy.com (HELO pastel.home) ([69.165.152.47]) by ironport2-out.teksavvy.com with ESMTP; 31 Jul 2009 15:31:55 -0400 Received: by pastel.home (Postfix, from userid 20848) id DD6F8800B; Fri, 31 Jul 2009 15:31:54 -0400 (EDT) From: Stefan Monnier To: "Drew Adams" Cc: <3984@debbugs.gnu.org>, Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <2707E3CF212E4D7B801D2F2EEAF54373@us.oracle.com> Date: Fri, 31 Jul 2009 15:31:54 -0400 In-Reply-To: <2707E3CF212E4D7B801D2F2EEAF54373@us.oracle.com> (Drew Adams's message of "Fri, 31 Jul 2009 07:19:13 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > Unfortunately, the code with `interactive-p' is not mine. > The defadvice is mine, but it needs to work for user functions, > including those that call `interactive-p' or `called-interactively-p'. > Is there no way the Emacs implementation could be fixed to handle this > better? Couldn't it take into consideration the `ad-*' stuff that > results from advising `call-interactively'? IOW, couldn't it look for > `call-interactively' in its advised form also? There's probably some way to make it work, of course. Note that the same problem is likely to appear with other redefinitions of call-interactively (e.g. profiling, tracing, ...). Of course, another way to break these things is also to advise (and/or profile/trace/...) interactive-p. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Reply-To: "Drew Adams" , 3984@debbugs.gnu.org Resent-From: "Drew Adams" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Fri, 31 Jul 2009 20:10:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3984 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124907066718065 (code B ref -1); Fri, 31 Jul 2009 20:10:06 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 31 Jul 2009 20:04:27 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.2 required=4.0 tests=AWL,HAS_BUG_NUMBER autolearn=unavailable version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6VK4MCB018052 for ; Fri, 31 Jul 2009 13:04:23 -0700 Received: from mail.gnu.org ([199.232.76.166]:43954 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MWyKz-0001bp-K8 for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 16:04:21 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MWyKx-00069J-Ma for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 16:04:21 -0400 Received: from rcsinet12.oracle.com ([148.87.113.124]:65205 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MWyKx-00069B-7E for emacs-pretest-bug@gnu.org; Fri, 31 Jul 2009 16:04:19 -0400 Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VK46tv002576 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 31 Jul 2009 20:04:07 GMT Received: from abhmt008.oracle.com (abhmt008.oracle.com [141.146.116.17]) by acsinet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VK4NQR021380; Fri, 31 Jul 2009 20:04:23 GMT Received: from dradamslap1 (/141.144.98.141) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Jul 2009 13:04:04 -0700 From: "Drew Adams" To: "'Stefan Monnier'" Cc: <3984@debbugs.gnu.org>, References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com><2707E3CF212E4D7B801D2F2EEAF54373@us.oracle.com> Date: Fri, 31 Jul 2009 13:04:04 -0700 Message-ID: <81D9B59304B04F3DBF3ADD2C3595A824@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcoSFalzf5O1HVwlSVCKBDKvow+4UwAA4qBA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt008.oracle.com [141.146.116.17] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010207.4A734E35.00B2:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) > > Is there no way the Emacs implementation could be fixed to > > handle this better? Couldn't it take into consideration > > the `ad-*' stuff that results from advising > > `call-interactively'? IOW, couldn't it look for > > `call-interactively' in its advised form also? > > There's probably some way to make it work, of course. Note that the > same problem is likely to appear with other redefinitions of > call-interactively (e.g. profiling, tracing, ...). Yes. > Of course, another way to break these things is also to advise (and/or > profile/trace/...) interactive-p. Yes. Seems like there could be a list of such functions to check wrt advised (and profiled, etc.) forms. The particular advice wouldn't matter, I believe; I imagine that all that happens is that the function is currently checked. Couldn't the check simply be membership in a list that includes the advised names? Perhaps even have that as the value of a variable, which could be configured (at least by Emacs dev, if not users). Realistically, what do you think is the chance of at least the bug as reported being fixed, that is, at least for advised `call-interactively'? I added a feature to Icicles that I will likely need to remove if `interactive-p' is not made to behave normally. Thx. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> In-Reply-To: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Resent-From: Kai Tetzlaff Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Oct 2011 07:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13182307173169 (code B ref 3984); Mon, 10 Oct 2011 07:12:01 +0000 Received: (at 3984) by debbugs.gnu.org; 10 Oct 2011 07:11:57 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDA1j-0000p2-2e for submit@debbugs.gnu.org; Mon, 10 Oct 2011 03:11:56 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RD8uv-0007bu-Up for 3984@debbugs.gnu.org; Mon, 10 Oct 2011 02:00:51 -0400 Received: from mail.tetzco.de (ppp-93-104-54-255.dynamic.mnet-online.de [93.104.54.255]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M0stL-1QyUmM2yj9-00uYIO; Mon, 10 Oct 2011 08:00:33 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.tetzco.de (Postfix) with ESMTP id E43AB1557B58 for <3984@debbugs.gnu.org>; Mon, 10 Oct 2011 08:00:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at tetzco.de Received: from mail.tetzco.de ([127.0.0.1]) by localhost (mini.tetzco.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l850d7duPkAF for <3984@debbugs.gnu.org>; Mon, 10 Oct 2011 08:00:31 +0200 (CEST) Received: from mack.tetzco.de (mack.tetzco.de [IPv6:2001:a60:f05d:1:226:bbff:fe03:b2e9]) by mail.tetzco.de (Postfix) with ESMTPS id 29A911557B4D for <3984@debbugs.gnu.org>; Mon, 10 Oct 2011 08:00:31 +0200 (CEST) From: Kai Tetzlaff Date: Mon, 10 Oct 2011 08:00:18 +0200 Message-ID: <7iaa99o07h.fsf@mack.tetzco.de> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:cIH6UnpOBhoueeSNgzwBYOOh8hw4O/mr4MsFu4xE4TU ndGmTgUO6+RDbOOJ2DtvGbabRq/PfD4N8O8NXPvUSpHCImUnCf 2LtS5hPguGM7yg8kIC+g9Myt2LgpS3zTDnh1jBHtpMyGgnDwV/ ZK+9ZsT19gjVUaoyypD/yacpuitFVj1YxSrsrRhC4081UwnD5o O7kUiy9sru870n7YctpcnLXLMUpXUTlyDMAiK75HXZ4apLuWMF L+KCUrnMGRdjBsIJxy3FjVzKOqOlq4jkzYSFTcxDRkojPfzHkZ U5FlAc+fj8zuUg3ey1ZJXwQr8LzhuQ0n9kj9EZs8/HEsBS5DTh PneuZH1F29Xz1422Wh+M= X-Spam-Score: -4.6 (----) X-Mailman-Approved-At: Mon, 10 Oct 2011 03:11:53 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) I'm using icicles and just ran into this bug with emacs compiled from bzr. The function count-words-region has been changed to use called-interactively-p to check for interactive use. As reported, the check fails when icicles is turned on. As there are >300 places under the emacs lisp/ directory alone which use called-interactively-p, it would really be great, if it could be made more robust. In GNU Emacs 24.0.90.6 (x86_64-apple-darwin10.8.0, NS apple-appkit-1038.36) of 2011-10-09 on mack.tetzco.de Windowing system distributor `Apple', version 10.3.1038 configured using `configure 'CC=clang' 'CFLAGS=-g -O0' 'LDFLAGS=-g' '--with-ns' '--with-gnutls'' From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2011 14:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Kai Tetzlaff'" , <3984@debbugs.gnu.org> Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.131834323729797 (code B ref 3984); Tue, 11 Oct 2011 14:28:01 +0000 Received: (at 3984) by debbugs.gnu.org; 11 Oct 2011 14:27:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDdIa-0007kX-Sf for submit@debbugs.gnu.org; Tue, 11 Oct 2011 10:27:17 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDdIZ-0007kJ-4u for 3984@debbugs.gnu.org; Tue, 11 Oct 2011 10:27:16 -0400 Received: from ucsinet24.oracle.com (ucsinet24.oracle.com [156.151.31.67]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9BEQoRf014941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 11 Oct 2011 14:26:52 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet24.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9BEKstN000502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Oct 2011 14:20:55 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9BEQiUd009636; Tue, 11 Oct 2011 09:26:44 -0500 Received: from dradamslap1 (/10.159.50.234) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 11 Oct 2011 07:26:44 -0700 From: "Drew Adams" References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <7iaa99o07h.fsf@mack.tetzco.de> Date: Tue, 11 Oct 2011 07:26:39 -0700 Message-ID: <843EB599BB3E431F8543D33410200715@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <7iaa99o07h.fsf@mack.tetzco.de> Thread-Index: AcyHG+ozyPc8RkJjQvuH7BtrpN4iPgBBQlFw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: ucsinet24.oracle.com [156.151.31.67] X-CT-RefId: str=0001.0A090208.4E94522C.00A1,ss=1,re=0.000,fgs=0 X-Spam-Score: -6.2 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) > From: Kai Tetzlaff Sent: Sunday, October 09, 2011 11:00 PM > > I'm using icicles and just ran into this bug with emacs compiled from > bzr. The function count-words-region has been changed to use > called-interactively-p to check for interactive use. As reported, the > check fails when icicles is turned on. As there are >300 places under > the emacs lisp/ directory alone which use called-interactively-p, it > would really be great, if it could be made more robust. For info, this is the defadvice that exposes the `called-interactively' bug (#3984): (defadvice call-interactively (after icicle-save-to-history disable activate) "Save command to `icicle-interactive-history'." ;; If command's input is not a parameterized (e.g. mouse) ;; event, record it. (let* ((fn (ad-get-arg 0)) (int (interactive-form fn))) (when (and (symbolp fn) (consp int) (or (not (stringp (cadr int))) (string= (cadr int) "") (not (eq ?e (aref (cadr int) 0))))) (pushnew (symbol-name fn) icicle-interactive-history)))) This behavior is optional, so Icicles users can turn it off (it is off by default) via option `icicle-populate-interactive-history-flag'. And the doc string of that option refers to Emacs bug #3948. Still, it would be good to get this Emacs bug fixed - especially, as Kai remarks, since the Emacs source code now uses `called-interactively-p' all over the place. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2011 15:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "Drew Adams" Cc: 3984@debbugs.gnu.org, 'Kai Tetzlaff' Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13183480124572 (code B ref 3984); Tue, 11 Oct 2011 15:47:02 +0000 Received: (at 3984) by debbugs.gnu.org; 11 Oct 2011 15:46:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDeXb-0001Bh-UV for submit@debbugs.gnu.org; Tue, 11 Oct 2011 11:46:52 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDeXZ-0001BZ-Rj for 3984@debbugs.gnu.org; Tue, 11 Oct 2011 11:46:50 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id p9BFkQLt015474; Tue, 11 Oct 2011 11:46:26 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 3BA0AB41EC; Tue, 11 Oct 2011 11:46:29 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <7iaa99o07h.fsf@mack.tetzco.de> <843EB599BB3E431F8543D33410200715@us.oracle.com> Date: Tue, 11 Oct 2011 11:46:29 -0400 In-Reply-To: <843EB599BB3E431F8543D33410200715@us.oracle.com> (Drew Adams's message of "Tue, 11 Oct 2011 07:26:39 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4007=0 X-NAI-Spam-Version: 2.2.0.9286 : core <4007> : streams <690417> : uri <981058> X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.1 (----) > string of that option refers to Emacs bug #3948. Still, it would be good to get > this Emacs bug fixed - especially, as Kai remarks, since the Emacs source code > now uses `called-interactively-p' all over the place. I don't understand the "now" in the above sentence. AFAIK these uses are not new (tho they used `interactive-p' in the past, but that should not make any difference). Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2011 16:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: "'Stefan Monnier'" Cc: 3984@debbugs.gnu.org, 'Kai Tetzlaff' Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13183491626291 (code B ref 3984); Tue, 11 Oct 2011 16:07:02 +0000 Received: (at 3984) by debbugs.gnu.org; 11 Oct 2011 16:06:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDeqA-0001dQ-6y for submit@debbugs.gnu.org; Tue, 11 Oct 2011 12:06:02 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDeq8-0001cx-Gk for 3984@debbugs.gnu.org; Tue, 11 Oct 2011 12:06:01 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id p9BG5YZg032015 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Oct 2011 16:05:36 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id p9BG5Vtd010646 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 11 Oct 2011 16:05:34 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p9BG5PLw001710; Tue, 11 Oct 2011 11:05:25 -0500 Received: from dradamslap1 (/10.159.50.234) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 11 Oct 2011 09:05:25 -0700 From: "Drew Adams" References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com><7iaa99o07h.fsf@mack.tetzco.de><843EB599BB3E431F8543D33410200715@us.oracle.com> Date: Tue, 11 Oct 2011 09:05:23 -0700 Message-ID: <0B69E9CD33C84EC6881DF0A28A5B111F@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcyILPgkKNKSW1HUQDqqQkltQVoViwAAkO3g X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090208.4E946951.003E:SCFMA922111,ss=1,re=-4.000,fgs=0 X-Spam-Score: -6.2 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.2 (------) > > string of that option refers to Emacs bug #3948. Still, it > > would be good to get this Emacs bug fixed - especially, as > > Kai remarks, since the Emacs source code now uses > > `called-interactively-p' all over the place. > > I don't understand the "now" in the above sentence. AFAIK these uses > are not new (tho they used `interactive-p' in the past, but > that should not make any difference). Whether it matters, for this bug, whether the Emacs code uses `called-interactively-p' or `interactive-p' I don't know. I trust your guess that it should not make any difference. Feel free to remove "now" from the sentence. The point is to please fix the bug. Thx. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Resent-From: Christopher Wellons Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Sep 2013 20:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 3984@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.137884499220829 (code B ref -1); Tue, 10 Sep 2013 20:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Sep 2013 20:29:52 +0000 Received: from localhost ([127.0.0.1]:53340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJUZL-0005Ps-NP for submit@debbugs.gnu.org; Tue, 10 Sep 2013 16:29:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46486) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJUZI-0005Pb-Hk for submit@debbugs.gnu.org; Tue, 10 Sep 2013 16:29:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJUZ7-00018m-W5 for submit@debbugs.gnu.org; Tue, 10 Sep 2013 16:29:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJUZ7-00018h-PT for submit@debbugs.gnu.org; Tue, 10 Sep 2013 16:29:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48170) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJUZ2-0005Zy-Me for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 16:29:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJUYx-00017h-V1 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 16:29:32 -0400 Received: from mail.nullprogram.com ([192.241.191.137]:50267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJUYx-00017d-Rh for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 16:29:27 -0400 Received: from localhost ([127.0.0.1] helo=wellocc1-ld1.jhuapl.edu) by mail.nullprogram.com with esmtp (Exim 4.80) (envelope-from ) id 1VJUYw-0003Ph-Ud; Tue, 10 Sep 2013 20:29:27 +0000 From: Christopher Wellons In-Reply-To: 7iaa99o07h.fsf%40mack.tetzco.de User-Agent: Notmuch/0.16 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Tue, 10 Sep 2013 16:29:26 -0400 Message-ID: <8738pcju8p.fsf@wellocc1-ld1.jhuapl.edu> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -5.0 (-----) Running into this bug with ido-ubiquitous and Emacs 24.3.1: https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/24 From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Sep 2013 00:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Christopher Wellons Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137885935312437 (code B ref 3984); Wed, 11 Sep 2013 00:30:03 +0000 Received: (at 3984) by debbugs.gnu.org; 11 Sep 2013 00:29:13 +0000 Received: from localhost ([127.0.0.1]:53746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJYIy-0003EW-U1 for submit@debbugs.gnu.org; Tue, 10 Sep 2013 20:29:13 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:29527) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJYIw-0003EF-QT for 3984@debbugs.gnu.org; Tue, 10 Sep 2013 20:29:11 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GDLETkAoEkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GDLETkAoEkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27204536" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 10 Sep 2013 20:25:40 -0400 Received: by pastel.home (Postfix, from userid 20848) id B581262DAE; Tue, 10 Sep 2013 20:29:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <8738pcju8p.fsf@wellocc1-ld1.jhuapl.edu> Date: Tue, 10 Sep 2013 20:29:04 -0400 In-Reply-To: <8738pcju8p.fsf@wellocc1-ld1.jhuapl.edu> (Christopher Wellons's message of "Tue, 10 Sep 2013 16:29:26 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > Running into this bug with ido-ubiquitous and Emacs 24.3.1: > https://github.com/DarwinAwardWinner/ido-ubiquitous/issues/24 It's unlikely to get fixed, as you can guess from the fact that it hasn't been fixed yet. You might get better results using alternative approaches, based on pre/post-command-hook or maybe advising some other function (command-execute, for example). Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> In-Reply-To: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 08:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137906259331066 (code B ref 3984); Fri, 13 Sep 2013 08:57:01 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 08:56:33 +0000 Received: from localhost ([127.0.0.1]:60789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKPB3-000850-0R for submit@debbugs.gnu.org; Fri, 13 Sep 2013 04:56:33 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:43513) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKPB1-00084k-DX for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 04:56:32 -0400 Received: by mail-pd0-f180.google.com with SMTP id y10so985323pdj.11 for <3984@debbugs.gnu.org>; Fri, 13 Sep 2013 01:56:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=Uxj7FkJwXW4p/teeIiXq0H6XZpExQQx1A6HzrYVFuMU=; b=OwL1FEWk8HiA0HYaYTdh155/vdVH+DK03I8CVLny0HB6p423B4fp+eKDTypw0FMnaE bo6Ort7FYy3RMUGiJHMXsz2WCdqY05fuMQdPIsguQFUoA4oUx0QWbaJhQ226+qyBq838 mofAuS0r8pW6BwjuLI4MRMhvnv4NnkxJYIgW12iJoOoMMIPikhrO4dRrRGFbtUdyPGPs 9dEHAv5xMtRW1eb1iN28FUemxO4bHlOWOHNeTtsbzKnt/MZyRwFxQ3XYouWwepbiRp64 sfqhE/kBXK6FdjbAhzSJiQh3g/FjNzhFu4k5Fdlnsl0pImqRVIhBHILuIe/9eyRvRfV3 M39A== X-Gm-Message-State: ALoCoQnk7n3/543UVAApFZNxFBjMaCwdfzjx/YDMKiNanw1BMRHdEgEtBQU6V88AZ/5+YocGDeu0 X-Received: by 10.67.1.228 with SMTP id bj4mr7498374pad.157.1379062584974; Fri, 13 Sep 2013 01:56:24 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id zq10sm16566314pab.6.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 01:56:23 -0700 (PDT) Message-ID: <5232D333.8030206@thompsonclan.org> Date: Fri, 13 Sep 2013 01:56:19 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Dear all, I "fixed" this in my ido-ubiquitous package by completely reimplementing "called-interactively-p" and "interactive-p" in pure elisp: https://github.com/DarwinAwardWinner/ido-ubiquitous/commit/f0c42e289a614071e22ad2c08297a7ebd60ba1cc Apart from simply translating the C code in elisp, I made two key adjustments to the logic: first, I filter out all evidence of advice from the call stack before checking if the caller is "call-interactively". Second, I relax the definition of "caller is call-interactively" to include any symbol with the same "symbol-function" as call-interactively, or any function that is the same as the symbol-function of call-interactively. Combined, these adjustments mean that defining advice on call-interactively no longer results in erroneous return values from these two interactivity-testing functions. I have implemented this in elisp because that is the only way to redefine functions in a running emacs session, but there's no reason that the C code couldn't be adapted to use the same logic. -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: bug#123: Potential fix References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> In-Reply-To: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 10:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13790678757361 (code B ref 3984); Fri, 13 Sep 2013 10:25:03 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 10:24:35 +0000 Received: from localhost ([127.0.0.1]:60911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKQYE-0001ue-7M for submit@debbugs.gnu.org; Fri, 13 Sep 2013 06:24:34 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:51448) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKQYA-0001uN-9G for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 06:24:31 -0400 Received: by mail-pd0-f170.google.com with SMTP id x10so1079597pdj.1 for <3984@debbugs.gnu.org>; Fri, 13 Sep 2013 03:24:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=Uxj7FkJwXW4p/teeIiXq0H6XZpExQQx1A6HzrYVFuMU=; b=UyutshlbqcBhursMFRMZDSYjhKVvRx1QHQVgrGZawVWP3SqV7aRKEJq3nR+qGyOCQv f1qUiB9biKxqRGy5k/iEfGpB5MTaAiDwEb0qQbXHmVVHRotGnBbZ6DM7rCxkzuTg/1BB KB+LtcXWuwfgP7FuxiHzTBzIixzQvG5V2rryuoaPYoIqpGcq40QNgo6JjtleFZbF8woh gEcEyUtozW/TTC33XMmMYAYFIimZYG5o4xxqUr/l66USZ+DADurUBq2GQXvBZHr7xc/3 V0cRDluls8KcJsRkyHuTLxVRtHS2pCM2w6jDJgWMQ2+eF5Qmp1DkHGCQ0r1cpNjnjKPU IeIA== X-Gm-Message-State: ALoCoQmBhn0Yf/+F9RANtweZ749blcuqas/QLLgdlva53VWraWOrDDLlK65b0cN4VZ9HthpKhtpy X-Received: by 10.68.9.3 with SMTP id v3mr12447651pba.84.1379067864196; Fri, 13 Sep 2013 03:24:24 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id os4sm10765583pbb.25.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 03:24:22 -0700 (PDT) Message-ID: <5232E7D3.4050603@thompsonclan.org> Date: Fri, 13 Sep 2013 03:24:19 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Dear all, I "fixed" this in my ido-ubiquitous package by completely reimplementing "called-interactively-p" and "interactive-p" in pure elisp: https://github.com/DarwinAwardWinner/ido-ubiquitous/commit/f0c42e289a614071e22ad2c08297a7ebd60ba1cc Apart from simply translating the C code in elisp, I made two key adjustments to the logic: first, I filter out all evidence of advice from the call stack before checking if the caller is "call-interactively". Second, I relax the definition of "caller is call-interactively" to include any symbol with the same "symbol-function" as call-interactively, or any function that is the same as the symbol-function of call-interactively. Combined, these adjustments mean that defining advice on call-interactively no longer results in erroneous return values from these two interactivity-testing functions. I have implemented this in elisp because that is the only way to redefine functions in a running emacs session, but there's no reason that the C code couldn't be adapted to use the same logic. -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137907833928357 (code B ref 3984); Fri, 13 Sep 2013 13:19:02 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 13:18:59 +0000 Received: from localhost ([127.0.0.1]:32993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKTH0-0007NH-8w for submit@debbugs.gnu.org; Fri, 13 Sep 2013 09:18:58 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:1935) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKTGy-0007N3-Tk for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 09:18:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27622696" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Sep 2013 09:15:18 -0400 Received: by pastel.home (Postfix, from userid 20848) id EFD6D62E33; Fri, 13 Sep 2013 09:18:50 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> Date: Fri, 13 Sep 2013 09:18:50 -0400 In-Reply-To: <5232D333.8030206@thompsonclan.org> (Ryan's message of "Fri, 13 Sep 2013 01:56:19 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > I "fixed" this in my ido-ubiquitous package by completely reimplementing > "called-interactively-p" and "interactive-p" in pure elisp: FWIW, called-interactively-p is already implemented in Elisp in Emacs's trunk. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137909705131073 (code B ref 3984); Fri, 13 Sep 2013 18:31:01 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 18:30:51 +0000 Received: from localhost ([127.0.0.1]:34385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKY8o-000854-GD for submit@debbugs.gnu.org; Fri, 13 Sep 2013 14:30:51 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:64140) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKY8m-00084o-61 for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 14:30:48 -0400 Received: by mail-pb0-f52.google.com with SMTP id wz12so1554402pbc.39 for <3984@debbugs.gnu.org>; Fri, 13 Sep 2013 11:30:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=asoD2iSg/pNhW3SkRlncl7IF/Um0pc4RYaaue5VBRXg=; b=XGIN3zGv/codp980AnkQTFk1ebqLLj+KQYluKPIvD5qo/7544YKx5rRBVssb8zoL7W SdvtfeFa3S7P/Zp3dcFAzfMKV9DGeS9acfEl66z6wCoFFwkZf8BiYz5cRsbpI1K+zb4P l2Usd8+SzcF/Rs5eboxtJWl0RnxuDdmtzwgAZZ61is4cKmObUN+6u/U3zH3YuSgTAD7G VlVFBjdVOo7JP3xNmj8xHgQ3qQPvWLmesC8jcko5hbCdecmXrcvaoqgA5HLrn0/Df6bi bH4ZdrhiJ1eDamZ45FZOHiwPMo75l8gzFGIpM6X7vcS89HyIvitBUxXZS3w49/eunH1f 8m0w== X-Gm-Message-State: ALoCoQkDyqJhhMR8GkZyqKDL9LS5+vMTNEV0lqMDF4htNpIr69mLXtwYjLutNRpZxlGUZWcHZDU7 X-Received: by 10.68.211.65 with SMTP id na1mr3149920pbc.191.1379097042289; Fri, 13 Sep 2013 11:30:42 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id b4sm13285410pbc.22.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 11:30:41 -0700 (PDT) Message-ID: <523359CD.2070904@thompsonclan.org> Date: Fri, 13 Sep 2013 11:30:37 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) Looking at the code in trunk, I see that there is a special hook for functions to decide which stack frames to skip over when looking for call-interactively. I still think they should relax the test for equality to "equal indirect-functions" instead of exactly the symbol call-interactively. On Fri Sep 13 06:18:50 2013, Stefan Monnier wrote: >> I "fixed" this in my ido-ubiquitous package by completely reimplementing >> "called-interactively-p" and "interactive-p" in pure elisp: > > FWIW, called-interactively-p is already implemented in Elisp in > Emacs's trunk. > > > Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 19:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13791004434237 (code B ref 3984); Fri, 13 Sep 2013 19:28:03 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 19:27:23 +0000 Received: from localhost ([127.0.0.1]:34497 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKZ1W-00016H-Rn for submit@debbugs.gnu.org; Fri, 13 Sep 2013 15:27:23 -0400 Received: from mail-pb0-f49.google.com ([209.85.160.49]:51596) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKZ1U-00015v-PY for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 15:27:21 -0400 Received: by mail-pb0-f49.google.com with SMTP id xb4so1610508pbc.8 for <3984@debbugs.gnu.org>; Fri, 13 Sep 2013 12:27:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=12vY34uazu8U81GDkdX2M0Apl3Lz6t5AsZQwZ+QD7/Q=; b=K31wHy1/+7KeECyJcVnd9/9e16SPanS2fUeAuhpTxThujK3JDlR6azgOp0bnaSxquj rgGVsq4wwrPlULcgKLIqWQ+04Iyw4o2b0bhSCKDIqg0Bne4Emnx9Boubpzl5MrWKdJBb ckfy7ZTqzbwggM08UJuqFyc48JjPIF62KM6I8H0eEphNEbf1A/RrWjsWrEobeAxyC+CZ 1iBwV0mKn/aiHXzh2Pn+a/X70m9w0ITwkTnnZ5XaTJ58YIprSfKtI2AntsCfxxetor2P 3gcLZopNu1sM2pTcwIol+vRQ2gRHxjP3OWEpNZ4+y8JsQGsMh2iv5BHVkh120y4W5pHa qxOQ== X-Gm-Message-State: ALoCoQkHImCJxpKrXa5pJHE/d+3eROwIa0GOnsg13mvwcHr2Jr+DrTwml1koA/UDizcD+GIptden X-Received: by 10.66.255.104 with SMTP id ap8mr17087513pad.53.1379100434488; Fri, 13 Sep 2013 12:27:14 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id gg10sm13471927pbc.46.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Sep 2013 12:27:13 -0700 (PDT) Message-ID: <5233670E.4030703@thompsonclan.org> Date: Fri, 13 Sep 2013 12:27:10 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> In-Reply-To: <523359CD.2070904@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) On Fri Sep 13 11:30:37 2013, Ryan wrote: > Looking at the code in trunk, I see that there is a special hook for > functions to decide which stack frames to skip over when looking for > call-interactively. I still think they should relax the test for > equality to "equal indirect-functions" instead of exactly the symbol > call-interactively. Actually, I just noticed that in trunk, nadvice.el adds a function to "called-interactively-p-functions" to skip advice-related stack frames, but this works only for advice on the interactive function, not advice defined on call-interactively itself. Furthermore, from my limited testing it appears that the structure of the call stack for advised functions has changes significantly in trunk, making my code obsolete. The whole thing looks like a work in progress right now. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Sep 2013 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137910616713754 (code B ref 3984); Fri, 13 Sep 2013 21:03:02 +0000 Received: (at 3984) by debbugs.gnu.org; 13 Sep 2013 21:02:47 +0000 Received: from localhost ([127.0.0.1]:34722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKaVr-0003Zl-41 for submit@debbugs.gnu.org; Fri, 13 Sep 2013 17:02:47 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:28102) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VKaVo-0003ZX-Dj for 3984@debbugs.gnu.org; Fri, 13 Sep 2013 17:02:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NGYNxA6R6gV6DE4FK X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2NGYNxA6R6gV6DE4FK X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="27686455" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 13 Sep 2013 16:59:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2810562CB9; Fri, 13 Sep 2013 17:02:38 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> Date: Fri, 13 Sep 2013 17:02:38 -0400 In-Reply-To: <5233670E.4030703@thompsonclan.org> (Ryan's message of "Fri, 13 Sep 2013 12:27:10 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) >> Looking at the code in trunk, I see that there is a special hook for >> functions to decide which stack frames to skip over when looking for >> call-interactively. I still think they should relax the test for >> equality to "equal indirect-functions" instead of exactly the symbol >> call-interactively. The code does check "equal modulo indirect-functions" in some cases, but indeed not all. I don't think that replacing the equality check against `call-interactively' with a check modulo indirect-functions would solve your problem, tho (that only helps when calling though an alias of call-interactively, but here the relevant stack frame will be a call to the # which is not equal-modulo-indirect-functions to call-interactively since call-interactively has been redefined to a different functions by the advice). You can probably use called-interactively-p-functions to detect the # and skip the frames between it and the corresponding call to `call-interactively'. But if you find a cute patch against the current code which makes it work for you in a cleanish way, do send it here, to see if it can be included. > Actually, I just noticed that in trunk, nadvice.el adds a function to > "called-interactively-p-functions" to skip advice-related stack frames, but > this works only for advice on the interactive function, not advice defined > on call-interactively itself. Indeed. It doesn't even work for all advices (more specifically it doesn't work for :around advices, which means it doesn't work for advices defined via `defadvice' since these all turn into one big :around "new advice"). > Furthermore, from my limited testing it appears that the structure of > the call stack for advised functions has changes significantly in > trunk, making my code obsolete. Indeed, the implementation of advices has been completely changed. > The whole thing looks like a work in progress right now. There's no planned change to it, so I consider it "ready modulo bug-reports". AFAIK it works "at least as well as before" (it works better than before in the sense that Edebugging a function with calls to called-interactively-p should now work correctly). `called-interactively-p' is a big ugly hack and only works sometimes. It can break in all kinds of cases (e.g. it currently won't work in byte-compiled lexical-binding code within a `catch', or a `condition-case', or the unwind part of an `unwind-protect'). Also, the functions called (non-interactively, obviously) by your `call-interactively' advice will probably think that they're called interactively (hopefully your advice doesn't call many functions, and hopefully none of them cares whether it's called interactively or not). Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2013 03:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137938792119162 (code B ref 3984); Tue, 17 Sep 2013 03:19:01 +0000 Received: (at 3984) by debbugs.gnu.org; 17 Sep 2013 03:18:41 +0000 Received: from localhost ([127.0.0.1]:42434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLloF-0004yz-W8 for submit@debbugs.gnu.org; Mon, 16 Sep 2013 23:18:40 -0400 Received: from mail-pb0-f42.google.com ([209.85.160.42]:62700) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLloC-0004yj-P7 for 3984@debbugs.gnu.org; Mon, 16 Sep 2013 23:18:37 -0400 Received: by mail-pb0-f42.google.com with SMTP id un15so4940775pbc.1 for <3984@debbugs.gnu.org>; Mon, 16 Sep 2013 20:18:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=LbusCyUyeOf/HRy5pTsG/4io2YZSoZi+gczG1gBEYAM=; b=eZQbhD3QDtz1FA2r2TR6G0+0qP2/mY3UlyhLohXHmZnViu5jXcJsBKtEyEt4J8Ky6Y lZ8gqd5z0k28IKgF8n/zzRgs7uGMi5GSmek2aZ+WhoKVvqOKostVH8yHi6OB5kj7f/o/ mLc93qyrXZmNEz62YTPUSA23AAhwum6Cu4DLlvSOBgqiqckV06hWOEn+o+kCUJ6uYxtS 3UOAcVbRm9c9x/40GkT9cvHLZVE5A/aorVl3L5n47AvYU2T0uFbVZg1PcGLRTIThFQhn URDg5QrMvI5Kkm43ZQEsrzqM/jnItIP/03Gmnuldk13oftcIzl3C+00CAX4DBEvmEANM /hKA== X-Gm-Message-State: ALoCoQndKWXaxgKMDSKmTC2S3NYENt3iyJynrG1jWh19RwosdkGD3x434jh9btpD/o8HumsGJNGS X-Received: by 10.66.140.40 with SMTP id rd8mr11075524pab.119.1379387910629; Mon, 16 Sep 2013 20:18:30 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id im2sm34744368pbd.31.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Sep 2013 20:18:29 -0700 (PDT) Message-ID: <5237C9FF.1000809@thompsonclan.org> Date: Mon, 16 Sep 2013 20:18:23 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) Ok, I think I figured out how to do it for all advice, but feel free to poke holes in my idea before I get to far implementing it. We have "ad-is-advised" which we can use to find which stack frames correspond to advised functions. We have "ad-get-orig-definition" which we can use to find the original definition of an advised function. We can tell if there is any active advice by testing if the advised function's definition is equal to the original definition. If the function has active advice, we can search down the stack for the original definition of that function and skip over all the stack frames in between. Unfortunately, this requires a search through the call stack frames in the wrong order, so the best strategy may be to make a single pass through the call stack, finding all pairs of advised/original function stack frames, and then cache the result in a dynamically bound variable for the duration of the call to "called-interactively-p". This still requires a complete pass through the entire call stack for each call to "called-interactively-p", which defeats the current "lazy-evaluation" strategy of inspecting the frames one by one, although I guess we can stop at the first occurrence of "call-interactively" on the stack. But I doubt that "called-interactively-p" is a performance hotspot anyway, so this may be acceptable. What do you think? -Ryan On 9/13/13 2:02 PM, Stefan Monnier wrote: >>> Looking at the code in trunk, I see that there is a special hook for >>> functions to decide which stack frames to skip over when looking for >>> call-interactively. I still think they should relax the test for >>> equality to "equal indirect-functions" instead of exactly the symbol >>> call-interactively. > The code does check "equal modulo indirect-functions" in some cases, but > indeed not all. I don't think that replacing the equality check against > `call-interactively' with a check modulo indirect-functions would solve > your problem, tho (that only helps when calling though an alias of > call-interactively, but here the relevant stack frame will be a call to > the # which is not > equal-modulo-indirect-functions to call-interactively since > call-interactively has been redefined to a different functions by the > advice). > > You can probably use called-interactively-p-functions to detect the > # and skip the frames between it and the > corresponding call to `call-interactively'. > > But if you find a cute patch against the current code which makes it > work for you in a cleanish way, do send it here, to see if it can > be included. > >> Actually, I just noticed that in trunk, nadvice.el adds a function to >> "called-interactively-p-functions" to skip advice-related stack frames, but >> this works only for advice on the interactive function, not advice defined >> on call-interactively itself. > Indeed. It doesn't even work for all advices (more specifically it > doesn't work for :around advices, which means it doesn't work for > advices defined via `defadvice' since these all turn into one > big :around "new advice"). > >> Furthermore, from my limited testing it appears that the structure of >> the call stack for advised functions has changes significantly in >> trunk, making my code obsolete. > Indeed, the implementation of advices has been completely changed. > >> The whole thing looks like a work in progress right now. > There's no planned change to it, so I consider it "ready modulo > bug-reports". AFAIK it works "at least as well as before" (it works > better than before in the sense that Edebugging a function with calls > to called-interactively-p should now work correctly). > > `called-interactively-p' is a big ugly hack and only works sometimes. > It can break in all kinds of cases (e.g. it currently won't work in > byte-compiled lexical-binding code within a `catch', or > a `condition-case', or the unwind part of an `unwind-protect'). Also, > the functions called (non-interactively, obviously) by your > `call-interactively' advice will probably think that they're called > interactively (hopefully your advice doesn't call many functions, and > hopefully none of them cares whether it's called interactively or not). > > > Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix for #3984 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2013 13:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137942345017677 (code B ref 3984); Tue, 17 Sep 2013 13:11:02 +0000 Received: (at 3984) by debbugs.gnu.org; 17 Sep 2013 13:10:50 +0000 Received: from localhost ([127.0.0.1]:43568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLv3J-0004b1-GP for submit@debbugs.gnu.org; Tue, 17 Sep 2013 09:10:50 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:10237) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLv3H-0004ao-Ac for 3984@debbugs.gnu.org; Tue, 17 Sep 2013 09:10:47 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFG4rxBo/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GsR+QDpEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28144233" Received: from 184-175-16-104.dsl.teksavvy.com (HELO pastel.home) ([184.175.16.104]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 17 Sep 2013 09:06:54 -0400 Received: by pastel.home (Postfix, from userid 20848) id E0DB061DC3; Tue, 17 Sep 2013 09:10:40 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> Date: Tue, 17 Sep 2013 09:10:40 -0400 In-Reply-To: <5237C9FF.1000809@thompsonclan.org> (Ryan's message of "Mon, 16 Sep 2013 20:18:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > We have "ad-is-advised" which we can use to find which stack frames > correspond to advised functions. We have "ad-get-orig-definition" which we > can use to find the original definition of an advised function. These are functions of advice.el, which is on the way out. We need to look at nadvice.el. Thinking about it once more, I realize that your "advised call-interactively" case might indeed be resolved by the current code, except that it bumps into the problematic case of "deepest advice is using :around". Could you check if it is the case simply be doing a dummy (advice-add 'call-interactively :before #'ignore) before your defadvice? If that works, then we can probably fix that problem in the following way: - keep track of every function value (e.g. # in our case) that is wrapped (at the deepest level) in an :around advice (e.g. in a hash-table). - when walking up the stack, if we find such a function, look up the stack searching for the matching function symbol (just like we already do when encountering an internal advice element on the stack). Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Sep 2013 17:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137943858415515 (code B ref 3984); Tue, 17 Sep 2013 17:24:01 +0000 Received: (at 3984) by debbugs.gnu.org; 17 Sep 2013 17:23:04 +0000 Received: from localhost ([127.0.0.1]:44431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLyzQ-00042B-7F for submit@debbugs.gnu.org; Tue, 17 Sep 2013 13:23:04 -0400 Received: from mail-pb0-f42.google.com ([209.85.160.42]:45671) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VLyzO-00041a-3O for 3984@debbugs.gnu.org; Tue, 17 Sep 2013 13:23:02 -0400 Received: by mail-pb0-f42.google.com with SMTP id un15so5859514pbc.29 for <3984@debbugs.gnu.org>; Tue, 17 Sep 2013 10:22:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=6E/BeMLhaYJDkvb3V81ZoDNZyfBQzogDEejSQnZWMOU=; b=PoyQcbveJQ9KqzZaV04XosmJwjMLVX2/6Ce07tfaEtx6IcfiNla3C4LwrAuAVtdmDP nqoyhXnwZBjQzJ6drDwpEOU7j7xdnUk9omyHsmwdKPGjEGCRp+hSgRm8Ae2QinUO4bxS i98KmKbYPPA5PFDUJ6cOxCAhiGK9kc5lnkYI2pDJQz5QC8NLyoGn9nNqD2Qh7NlHwnLa +FiCr7QAMVgAEBdDyqHCSNCro2DnEN2K8FTwPXZqy6Wu3cyPTgb2dCVj3sbb8+hqkG/t K1VL+Tddq5uXNN4iH075Xi2n8tPRTWrPYiDol/UV87+QNXDQMojD9MuO4kjYfzsBERcb ZuAw== X-Gm-Message-State: ALoCoQn3fQmNiemTHTgHDV6DkVD+c0NOFMylQWYdbsZSbi3pwOdvAU65zyiPEHIngHncjBxVBJk0 X-Received: by 10.66.227.194 with SMTP id sc2mr38486347pac.41.1379438576270; Tue, 17 Sep 2013 10:22:56 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id vz4sm47423607pab.11.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Sep 2013 10:22:53 -0700 (PDT) Message-ID: <52388FEB.6020007@thompsonclan.org> Date: Tue, 17 Sep 2013 10:22:51 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) On 9/17/13 6:10 AM, Stefan Monnier wrote: >> We have "ad-is-advised" which we can use to find which stack frames >> correspond to advised functions. We have "ad-get-orig-definition" which we >> can use to find the original definition of an advised function. > These are functions of advice.el, which is on the way out. We need to > look at nadvice.el. Wait, so defadvice and friends are going away entirely? Is everything in advice.el going away, or are some parts of it going to be converted to the new advice system? Is all this documented somewhere? > > Thinking about it once more, I realize that your "advised > call-interactively" case might indeed be resolved by the current code, > except that it bumps into the problematic case of "deepest advice is > using :around". > > Could you check if it is the case simply be doing a dummy (advice-add > 'call-interactively :before #'ignore) before your defadvice? > > If that works, then we can probably fix that problem in the following way: > - keep track of every function value (e.g. # in > our case) that is wrapped (at the deepest level) in an :around advice > (e.g. in a hash-table). > - when walking up the stack, if we find such a function, look up the > stack searching for the matching function symbol (just like we already > do when encountering an internal advice element on the stack). > > > Stefan I tried the before advice, and it doesn't seem to work. With the following code in emacs -Q: (advice-add 'call-interactively :before #'ignore) (defun myfun2 () (interactive) (or (called-interactively-p) (error "Must be interactive!"))) (call-interactively 'myfun2) I get the following stack trace: Debugger entered--Lisp error: (error "Must be interactive!") signal(error ("Must be interactive!")) error("Must be interactive!") (or (called-interactively-p) (error "Must be interactive!")) myfun2() #(myfun2) apply(# myfun2) call-interactively(myfun2) eval-region(345 373 t (lambda (ignore) (goto-char 373) (quote (call-interactively (quote myfun2))))) ; Reading at buffer position 345 apply(eval-region (345 373 t (lambda (ignore) (goto-char 373) (quote (call-interactively (quote myfun2)))))) eval-defun-2() eval-defun(nil) #(eval-defun nil nil) apply(# (eval-defun nil nil)) call-interactively(eval-defun nil nil) command-execute(eval-defun) Same thing happens when I do M-x myfun2. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2013 01:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137946881531965 (code B ref 3984); Wed, 18 Sep 2013 01:47:02 +0000 Received: (at 3984) by debbugs.gnu.org; 18 Sep 2013 01:46:55 +0000 Received: from localhost ([127.0.0.1]:45216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VM6r1-0008JU-9K for submit@debbugs.gnu.org; Tue, 17 Sep 2013 21:46:55 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:52596) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VM6qy-0008JF-Pp for 3984@debbugs.gnu.org; Tue, 17 Sep 2013 21:46:53 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjgFABK/CFFLd/2W/2dsb2JhbABEukWESRdzgh4BAQQBViMFCws0EhQYDSSIHgaxH5AOkQoDpHqBXoMT X-IPAS-Result: AjgFABK/CFFLd/2W/2dsb2JhbABEukWESRdzgh4BAQQBViMFCws0EhQYDSSIHgaxH5AOkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28229015" Received: from 75-119-253-150.dsl.teksavvy.com (HELO pastel.home) ([75.119.253.150]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 17 Sep 2013 21:42:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id 16F636324C; Tue, 17 Sep 2013 21:46:46 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> Date: Tue, 17 Sep 2013 21:46:46 -0400 In-Reply-To: <52388FEB.6020007@thompsonclan.org> (Ryan's message of "Tue, 17 Sep 2013 10:22:51 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) >>> We have "ad-is-advised" which we can use to find which stack frames >>> correspond to advised functions. We have "ad-get-orig-definition" which we >>> can use to find the original definition of an advised function. >> These are functions of advice.el, which is on the way out. We need to >> look at nadvice.el. > Wait, so defadvice and friends are going away entirely? It's very widely used, so it'll be around for a long while. It's not even marked obsolete officially yet. But it is functionally obsoleted by nadvice. > Is everything in advice.el going away, or are some parts of it going > to be converted to the new advice system? It's already been changed to work on top of nadvice.el. > Is all this documented somewhere? No, only the internals were changed, and they're usually not documented, other than in the form of actual code, and a few comments when you're lucky. > I tried the before advice, and it doesn't seem to work. With the following > code in emacs -Q: > (advice-add 'call-interactively :before #'ignore) > (defun myfun2 () > (interactive) > (or (called-interactively-p) > (error "Must be interactive!"))) > (call-interactively 'myfun2) > I get the following stack trace: Hmm, indeed, that fails already. It shouldn't be too hard to make it work, tho. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Sep 2013 23:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137954706013928 (code B ref 3984); Wed, 18 Sep 2013 23:31:02 +0000 Received: (at 3984) by debbugs.gnu.org; 18 Sep 2013 23:31:00 +0000 Received: from localhost ([127.0.0.1]:47644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMRD0-0003cZ-PX for submit@debbugs.gnu.org; Wed, 18 Sep 2013 19:30:59 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:35582) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMRCx-0003cH-LW for 3984@debbugs.gnu.org; Wed, 18 Sep 2013 19:30:56 -0400 Received: by mail-pd0-f182.google.com with SMTP id r10so7684000pdi.41 for <3984@debbugs.gnu.org>; Wed, 18 Sep 2013 16:30:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=pcqVL72aZnMUek/ccS3+uZHMz0RDE+Kk+0GYryjyL5k=; b=Q+NLfONXCPhtOwUv0gY89zNrGMATeAyU8dsVNU/AxMfMZYQbw+R9ckg6gEXmqaObKn 5Ay/cLTfCSngIdbZeBIuRFjlxUBgx/xASDTZuGdcJeh27JNl0M/KE5WjmCX7LGn5Hxnx xepN5jmkBX/eJRaBRUFXASRsb34wCUX9jUWRvBtGvX0wg/O8RKB3VlGdfbBVV++nwm1I ++MJ17Syf9qvDSGWhMrSwFNoXR7K22QbFe2dxkvsq6w4Cel1F3mRRJy2T3XP765j5brm RA82euLr7PGqAlypOqRcjwR9Yv3Js5DmA/NZSybT9tW176fH5zCmyNqA/8bbDpNXSQQi 0NpQ== X-Gm-Message-State: ALoCoQlLXBNaeCAWdDYoBbT/GLWwTgcXzuq1Lj76/r5imlXlrDoiRtyiElheEPQ2t40fk9kkp/e8 X-Received: by 10.67.23.199 with SMTP id ic7mr46059412pad.73.1379547049514; Wed, 18 Sep 2013 16:30:49 -0700 (PDT) Received: from wireless-121-195.scripps.edu (wireless-121-195.scripps.edu. [137.131.121.195]) by mx.google.com with ESMTPSA id ta10sm7844353pab.5.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 16:30:48 -0700 (PDT) Message-ID: <523A37A4.5060505@thompsonclan.org> Date: Wed, 18 Sep 2013 16:30:44 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Ok, I figured out how to walk down the stack, identify which frames are calls to advised functions, and for each call to an advised function, find the position in the stack of the call to the original function definition, using the functions in nadvice.el. First, we define: (defun unadvised-function (func) "Return the original function definition of FUNC before it was advised." (let ((func (indirect-function func))) (while (advice--p func) (setq func (advice--cdr func))) func)) Then we scan down the stack starting from the very earliest function call, looking for functions that are advised (via "advice--p"). Every time we find ad advised function, we use get the original definition via unadvised-function and then search down the stack for a call to that original definition. Then we know to skip all those frames when searching for called-interactively. Specifically, we skip everything but the call to the outermost advice, since that call will bear the original name of the function. Again, though, this requires a top-down non-lazy search of the stack, which is possible but seems to go against the intentions of the current implementation that checks frames one-by-one. What do you think? I'd be happy to work on an implementation of this in the next few days if you think it's worth pursuing. But if so, I could use your input on the isue of the top-down search. -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 00:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137955169221213 (code B ref 3984); Thu, 19 Sep 2013 00:49:01 +0000 Received: (at 3984) by debbugs.gnu.org; 19 Sep 2013 00:48:12 +0000 Received: from localhost ([127.0.0.1]:47734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMSPj-0005W4-IR for submit@debbugs.gnu.org; Wed, 18 Sep 2013 20:48:11 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:51804) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMSPg-0005Vr-Os for 3984@debbugs.gnu.org; Wed, 18 Sep 2013 20:48:09 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so7746419pdj.22 for <3984@debbugs.gnu.org>; Wed, 18 Sep 2013 17:48:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=CSsqVM4Q9+fqmK8+gj1I1h8QrUrf6Ikdd67IBPLQ2Cc=; b=nE+HZOgDDNPkUo4kOjIfO73LkiC/pxPD7aFPqRDHCmgpQae4r6m6hnY1RsxEC1lWdc HUF48h+tdvEgOnsdQBnLB9WUm1OWCwTxeZ1q5m+WaigWyIpW1jrnutnkNUBuOE1/vHuO XYlfZYLscwBS2emoozjJIPEL8TYz8PHTya8VCrgQ5FZSuTt84dVJcP5CbKImjVze6Zr1 /ezOc1YSFIidNqKR2jN84be6fV2HiPQFJ3s4aU7WH89/TAFykxxG9vTT92VhJ4b56lii e4c7iTBBFt//goAuT3tVAzz4UG9CdhX7eoLnJPdOvPmK3Qw7FMOmiuzZcXo2brOYdOeS 6U/g== X-Gm-Message-State: ALoCoQkDfF7JBfHhXexuXoPF1KHHQv9PhZYMmZGLnWGDFE5HYJIE8R8j/8BKK/P04eW2CFRU9eiR X-Received: by 10.66.121.131 with SMTP id lk3mr45924684pab.61.1379551682646; Wed, 18 Sep 2013 17:48:02 -0700 (PDT) Received: from wireless-121-195.scripps.edu (wireless-121-195.scripps.edu. [137.131.121.195]) by mx.google.com with ESMTPSA id dw3sm5427562pbc.17.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Sep 2013 17:48:01 -0700 (PDT) Message-ID: <523A49BE.3060109@thompsonclan.org> Date: Wed, 18 Sep 2013 17:47:58 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> In-Reply-To: <523A37A4.5060505@thompsonclan.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) After reading and finally comprehending the definition of "advice--called-interactively-skip", I think I have a possible solution that doesn't require a top-down search, but it would require some minor rearchitecting of nadvice. Basically, once we know that a particular stack frame is a call to the innermost unadvised form of an advised function, it is relatively easy to walk up the stack looking for the outermost advice. This is what "advice--called-interactively-skip" does. (Although reading through it I don't see where the bug is that prevents it recognizing the before advice in my example.) The problem, then, is knowing when a function is advised, given only the unadvised form and a position in the stack. If we always unconditionally wrap an unadvised function with a function that we can easily identify, then we can easily check whether it has been advised. To that end, I propose the following: ;; Generate a private symbol (defvar nadvice--indicator-symbol (make-symbol "nadvice--indicator-symbol")) (defun wrap-function-in-indicator-lambda (func) `(lambda (&rest args) ,nadvice--indicator-symbol (apply ,func args))) (defun indicator-lambda-p (func) (eq nadvice--indicator-symbol (nth 2 (wrap-function-in-indicator-lambda (indirect-function func))))) If all advised functions are wrapped by a call to the above function "wrap-function-in-indicator-lambda", then when they are called, the call to the "indicator lambda" would always be 2 frames up from the call to the original unadvised function. This allows us to easily recognize an advised function on the stack by testing the function 2 frames up with "indicator-lambda-p". Once we know the function is advised, we can then initiate the search for the outermost advice's stack position. In order to implement this, I think "advice-add" and "advice-remove" need to be modified to automatically wrap/unwrap the original function in/out of the indicator. What do you think of this? Obviously my "indicator-lambda" could be replaced by e.g. a no-op before/after advice or something similar, which would have the same effect of making it easy to recognize the innermost call of an advised function based on the contents of specific stack frame positions above it. What do you think of this? -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 03:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13795619434909 (code B ref 3984); Thu, 19 Sep 2013 03:40:02 +0000 Received: (at 3984) by debbugs.gnu.org; 19 Sep 2013 03:39:03 +0000 Received: from localhost ([127.0.0.1]:47982 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMV53-0001Go-PY for submit@debbugs.gnu.org; Wed, 18 Sep 2013 23:39:02 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:47998) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMV51-0001GY-Sw for 3984@debbugs.gnu.org; Wed, 18 Sep 2013 23:39:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoX0U/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFsoX0U/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28331202" Received: from 108-161-125-20.dsl.teksavvy.com (HELO pastel.home) ([108.161.125.20]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Sep 2013 23:35:00 -0400 Received: by pastel.home (Postfix, from userid 20848) id B2D46666B7; Wed, 18 Sep 2013 23:38:48 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> Date: Wed, 18 Sep 2013 23:38:48 -0400 In-Reply-To: <523A49BE.3060109@thompsonclan.org> (Ryan's message of "Wed, 18 Sep 2013 17:47:58 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > advice. This is what "advice--called-interactively-skip" does. (Although > reading through it I don't see where the bug is that prevents it recognizing > the before advice in my example.) Exactly. I think we need to fix this problem. It really should work. > If all advised functions are wrapped by a call to the above function > "wrap-function-in-indicator-lambda", All functions advised with a non-:around advice have such a "recognizable wrapper"; and that's indeed what advice--called-interactively-skip checks in (and (eq (nth 1 frame2) 'apply) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) IOW the nadvice.el machinery is itself the recognizable wrapper. Not sure why this fails in your test case, tho. For :around advices, the machinery does not provide a recognizable wrapper, so we might want to add an ad-hoc wrapper like you suggest for those cases, tho maybe we can avoid the cost of such a wrapper, by keeping the so-advised inner-functions in a hash-table (so we can still recognize them, even tho they're not tagged directly in the backtrace). So, I think the first thing is to figure out why your test case fails. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 08:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137957797530758 (code B ref 3984); Thu, 19 Sep 2013 08:07:02 +0000 Received: (at 3984) by debbugs.gnu.org; 19 Sep 2013 08:06:15 +0000 Received: from localhost ([127.0.0.1]:48255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMZFe-000801-KG for submit@debbugs.gnu.org; Thu, 19 Sep 2013 04:06:14 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:54619) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMZFc-0007zo-EY for 3984@debbugs.gnu.org; Thu, 19 Sep 2013 04:06:12 -0400 Received: by mail-pd0-f174.google.com with SMTP id y13so8067231pdi.5 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 01:06:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=YvLRqudnVGc6E8/qv6oYCgbf5Ws7/Hg2KWOXrzNJuDo=; b=QVA8G93CncaE8lio1r+qtj9LT82pqFbnUIhlqBbQIqKKOSSePAO0bacRKfJBhl46cE PZDc92Y/ekGqhdxwHzPeiMItkCStCVCXxTzJ6wFQiZs6zUAa747++Q5Ujk+D3huWq3Og uKDpz31X15vBWSDEB7TRZdVNRYueRiHHgFDvNsi48Y9jwg8fFEkvNXilSc6lkpi7jcWA 7d6GV97OvVSs5ZmM2gezxaEg9Vnj1OiUcVJBi8FFUYl42JQqLuoMVGpprIpaWuoBYczv n+ThOS+rzq3kxsVn4wj4EErGXokFJNFOnNROZtHrXlPEDHvdOmqw0Hwb/ymdAbZDCX7W Zs2g== X-Gm-Message-State: ALoCoQn/d0Vr9CUjGzbJ/UJk6hzCRqzz47QUNGK0aDk0ptB/mRRlrPqQZsGbpiG2gHwL4oV4to/v X-Received: by 10.66.122.40 with SMTP id lp8mr1212346pab.82.1379577966721; Thu, 19 Sep 2013 01:06:06 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id xe9sm10370932pab.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 01:06:05 -0700 (PDT) Message-ID: <523AB06B.9090606@thompsonclan.org> Date: Thu, 19 Sep 2013 01:06:03 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) Ok, I'll work on debugging my test case tomorrow. On Wed Sep 18 20:38:48 2013, Stefan Monnier wrote: >> advice. This is what "advice--called-interactively-skip" does. (Although >> reading through it I don't see where the bug is that prevents it recognizing >> the before advice in my example.) > > Exactly. I think we need to fix this problem. It really should work. > >> If all advised functions are wrapped by a call to the above function >> "wrap-function-in-indicator-lambda", > > All functions advised with a non-:around advice have such > a "recognizable wrapper"; and that's indeed what > advice--called-interactively-skip checks in > > (and (eq (nth 1 frame2) 'apply) > (progn > (funcall get-next-frame) > (advice--p (indirect-function (nth 1 frame2))))) > > IOW the nadvice.el machinery is itself the recognizable wrapper. > Not sure why this fails in your test case, tho. > > For :around advices, the machinery does not provide a recognizable > wrapper, so we might want to add an ad-hoc wrapper like you suggest for > those cases, tho maybe we can avoid the cost of such a wrapper, by > keeping the so-advised inner-functions in a hash-table (so we can still > recognize them, even tho they're not tagged directly in the backtrace). > > So, I think the first thing is to figure out why your test case fails. > > > Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 19:25:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13796186496570 (code B ref 3984); Thu, 19 Sep 2013 19:25:03 +0000 Received: (at 3984) by debbugs.gnu.org; 19 Sep 2013 19:24:09 +0000 Received: from localhost ([127.0.0.1]:49795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMjph-0001hu-9H for submit@debbugs.gnu.org; Thu, 19 Sep 2013 15:24:09 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:55669) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMjpe-0001hO-HQ for 3984@debbugs.gnu.org; Thu, 19 Sep 2013 15:24:07 -0400 Received: by mail-pd0-f177.google.com with SMTP id y10so8754711pdj.36 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 12:24:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8U0Sa8BBPSrqxRK7CTzY9K5Cq/m4V7G07ywLfwTsqI4=; b=f05ZTTvUYsgLw5KViLmtOc8ueWLkVwGbSpJ6ZNRbaDYYcyslaidNvft5vVwVwBXscr oa0xwaeqB97m2zfTHOwddazNAS8QF6MxKZzWvAokCDtmoa2EupEkFNgiL255CRfcb8Xf fDz9dYfx5gRIGddWh4xyuOQ0+T4SwQ2nf/X/Ed3ob7sLuOfTzwlhtxe2J0BxdA7tQNDu T2HourtaxGz8mLLoGZ8N8SLqPsnIdVvByIAuy9NvPLnw6T8rb3TBtRhp1coZAHDDDLpH wgh+wSAAQvZBoujGJ7vl1Ef6nRWrAtfm4tx7c+sK9DYvCJRkcuge0m5HCGjOky485g1m nurg== X-Gm-Message-State: ALoCoQk5xmYa/fBs/5j03JmAHLxKW/8Mgoxf+jyUFnm0+cMgYKdMaHec9m2x6lnulYdcxdD28URk X-Received: by 10.66.249.134 with SMTP id yu6mr4501101pac.37.1379618640744; Thu, 19 Sep 2013 12:24:00 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id sn4sm6385880pbc.37.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 12:23:59 -0700 (PDT) Message-ID: <523B4F4E.3060204@thompsonclan.org> Date: Thu, 19 Sep 2013 12:23:58 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> In-Reply-To: <523AB06B.9090606@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) On a related note, I just noticed that the "advice-test-called-interactively-p" test in test/automated/advice-tests.el happens to pass, but only because it doesn't use "called-interactively-p" inside the original function, but rather only inside the advice itself. Also, it doesn't test advising "call-interactively" itself. I think I will see about writing a proper test first, and then use that to start debugging. On Thu Sep 19 01:06:03 2013, Ryan wrote: > Ok, I'll work on debugging my test case tomorrow. > > On Wed Sep 18 20:38:48 2013, Stefan Monnier wrote: >>> advice. This is what "advice--called-interactively-skip" does. >>> (Although >>> reading through it I don't see where the bug is that prevents it >>> recognizing >>> the before advice in my example.) >> >> Exactly. I think we need to fix this problem. It really should work. >> >>> If all advised functions are wrapped by a call to the above function >>> "wrap-function-in-indicator-lambda", >> >> All functions advised with a non-:around advice have such >> a "recognizable wrapper"; and that's indeed what >> advice--called-interactively-skip checks in >> >> (and (eq (nth 1 frame2) 'apply) >> (progn >> (funcall get-next-frame) >> (advice--p (indirect-function (nth 1 frame2))))) >> >> IOW the nadvice.el machinery is itself the recognizable wrapper. >> Not sure why this fails in your test case, tho. >> >> For :around advices, the machinery does not provide a recognizable >> wrapper, so we might want to add an ad-hoc wrapper like you suggest for >> those cases, tho maybe we can avoid the cost of such a wrapper, by >> keeping the so-advised inner-functions in a hash-table (so we can still >> recognize them, even tho they're not tagged directly in the backtrace). >> >> So, I think the first thing is to figure out why your test case fails. >> >> >> Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2013 22:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137962799821205 (code B ref 3984); Thu, 19 Sep 2013 22:00:03 +0000 Received: (at 3984) by debbugs.gnu.org; 19 Sep 2013 21:59:58 +0000 Received: from localhost ([127.0.0.1]:50083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMmGS-0005Vw-CK for submit@debbugs.gnu.org; Thu, 19 Sep 2013 17:59:57 -0400 Received: from mail-pb0-f51.google.com ([209.85.160.51]:54505) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMmGP-0005Vi-Ft for 3984@debbugs.gnu.org; Thu, 19 Sep 2013 17:59:54 -0400 Received: by mail-pb0-f51.google.com with SMTP id jt11so8962819pbb.10 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 14:59:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=bfdfav5zjA+cUD4OVDuVtlmILB4DIRcw7Ig9J72xG3g=; b=akU0do8WAoYjYVjkrBT5vUVA4jjVroscrvme94CWZDyMjTk6cPj5Af7Pgb5H4AyOaM jYmvncpc02OfpJpf2RjJaSOr4K0MeBMg7gRKzXfsP30ISYv7fLMvd/8Uu1KrEbnIoRdb ZJN7bB4g+nxfZIkLV7FJqjnJXTR+SwaQ/hifF2itlywYTpx5HtJ9IaRfiMlTSfI8jNux Zw/rzEZfq51d5DStdzF4fbwPDPLljzjOqrWtxVHSyZr2a4PsV1GYvIhpuXWPylHxh5b2 uVO40Jdy9wiuLW+73YxYyrS8CkIgL9gbqsOWxd+iQN2I3AXeYSMBUJura/Es5HSJKYRI nD4A== X-Gm-Message-State: ALoCoQk2+moZbVII7OoKnBDs6Y0nPXvz4rKdfYQxECb8YiTpCZoctgvD3yggIVn4ZEgsHg4ccJuy X-Received: by 10.68.179.65 with SMTP id de1mr4208091pbc.73.1379627987500; Thu, 19 Sep 2013 14:59:47 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id nj9sm11459370pbc.13.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 14:59:46 -0700 (PDT) Message-ID: <523B73CF.4080105@thompsonclan.org> Date: Thu, 19 Sep 2013 14:59:43 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> In-Reply-To: <523B4F4E.3060204@thompsonclan.org> Content-Type: multipart/mixed; boundary="------------080203060909030805010104" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) This is a multi-part message in MIME format. --------------080203060909030805010104 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On Thu Sep 19 12:23:58 2013, Ryan wrote: > > On a related note, I just noticed that the > "advice-test-called-interactively-p" test in > test/automated/advice-tests.el happens to pass, but only because it > doesn't use "called-interactively-p" inside the original function, but > rather only inside the advice itself. Also, it doesn't test advising > "call-interactively" itself. I think I will see about writing a proper > test first, and then use that to start debugging. > Ok, I have written a couple of tests, two of which are currently failing (mine are the ones with numbered suffixes 2 through 5). I am attaching a patch that adds these tests. ERT output is below: $ open . techne:emacs-trunk ryan$ src/emacs -batch -Q -l ert -l test/automated/advice-tests.el -f ert-run-tests-batch-and-exit Running 10 tests (2013-09-19 14:56:00-0700) passed 1/10 advice-test-called-interactively-p failed 2/10 advice-test-called-interactively-p-2 passed 3/10 advice-test-called-interactively-p-3 failed 4/10 advice-test-called-interactively-p-4 passed 5/10 advice-test-called-interactively-p-5 passed 6/10 advice-test-interactive passed 7/10 advice-test-preactivate ad-handle-definition: `sm-test2' got redefined ad-handle-definition: `sm-test4' got redefined passed 8/10 advice-tests-advice ad-handle-definition: `sm-test5' got redefined passed 9/10 advice-tests-combination passed 10/10 advice-tests-nadvice Ran 10 tests, 10 results as expected (2013-09-19 14:56:00-0700) 2 expected failures --------------080203060909030805010104 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="more-advice-interactive-tests.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="more-advice-interactive-tests.diff" ZGlmZiAtLWdpdCBhL3Rlc3QvYXV0b21hdGVkL2FkdmljZS10ZXN0cy5lbCBiL3Rlc3QvYXV0 b21hdGVkL2FkdmljZS10ZXN0cy5lbAppbmRleCA2OWMxNWUzLi42NTU3N2FkIDEwMDY0NAot LS0gYS90ZXN0L2F1dG9tYXRlZC9hZHZpY2UtdGVzdHMuZWwKKysrIGIvdGVzdC9hdXRvbWF0 ZWQvYWR2aWNlLXRlc3RzLmVsCkBAIC0yMyw2ICsyMywyMSBAQAogCiAocmVxdWlyZSAnZXJ0 KQogCisoZGVmdW4gY2xlYXItYWR2aWNlIChzeW1ib2wpCisgICJSZXNldCBTWU1CT0wncyBm dW5jdGlvbiB0byBpdHMgb3JpZ2luYWwgdW5hZHZpc2VkIGRlZmluaXRpb24uIgorICAobGV0 ICgoZnVuYyAoc3ltYm9sLWZ1bmN0aW9uIHN5bWJvbCkpKQorICAgICh3aGlsZSAoYWR2aWNl LS1wIGZ1bmMpCisgICAgICAoc2V0cSBmdW5jIChhZHZpY2UtLWNkciBmdW5jKSkpCisgICAg KGZzZXQgc3ltYm9sIGZ1bmMpKSkKKworKGRlZm1hY3JvIHBvc3QtcmVzdG9yZS1mdW5jIChm dW5jICZyZXN0IGJvZHkpCisgIChsZXQgKChmZGVmIChzeW1ib2wtZnVuY3Rpb24gZnVuYykp KQorICAgIGAodW53aW5kLXByb3RlY3QKKwkgKHByb2duICxAYm9keSkKKyAgICAgICAoZnNl dCAnLGZ1bmMgLGZkZWYpKSkpCisocHV0ICdwb3N0LXJlc3RvcmUtZnVuYyAnbGlzcC1pbmRl bnQtZnVuY3Rpb24KKyAgICAgKGdldCAncHJvZzEgJ2xpc3AtaW5kZW50LWZ1bmN0aW9uKSkK KwogKGVydC1kZWZ0ZXN0IGFkdmljZS10ZXN0cy1uYWR2aWNlICgpCiAgICJUZXN0IG5hZHZp Y2UgY29kZS4iCiAgIChkZWZ1biBzbS10ZXN0MSAoeCkgKCsgeCA0KSkKQEAgLTExMyw2ICsx MjgsNjAgQEAKICAgICAgICAgICAgICAgICAoY29ucyAoY29ucyAyIChjYWxsZWQtaW50ZXJh Y3RpdmVseS1wKSkgKGFwcGx5IGYgYXJncykpKSkKICAgKHNob3VsZCAoZXF1YWwgKGNhbGwt aW50ZXJhY3RpdmVseSAnc20tdGVzdDcpICcoKDIgLiB0KSAoMSAuIHQpIDExKSkpKQogCiso ZXJ0LWRlZnRlc3QgYWR2aWNlLXRlc3QtY2FsbGVkLWludGVyYWN0aXZlbHktcC0yICgpCisg ICJDaGVjayBpbnRlcmFjdGlvbiBiZXR3ZWVuIGFyb3VuZCBhZHZpY2UgYW5kIGNhbGxlZC1p bnRlcmFjdGl2ZWx5LXAuCisKK1RoaXMgdGVzdHMgdGhlIGN1cnJlbnRseSBicm9rZW4gY2Fz ZSBvZiB0aGUgaW5uZXJtb3N0IGFkdmljZSB0byBhCitmdW5jdGlvbiBiZWluZyBhbiBhcm91 bmQgYWR2aWNlLiIKKyAgOmV4cGVjdGVkLXJlc3VsdCA6ZmFpbGVkCisgIChkZWZ1biBzbS10 ZXN0Ny4yICgpIChpbnRlcmFjdGl2ZSkgKGNvbnMgMSAoY2FsbGVkLWludGVyYWN0aXZlbHkt cCkpKQorICAoY2xlYXItYWR2aWNlICdzbS10ZXN0Ny4yKQorICAoYWR2aWNlLWFkZCAnc20t dGVzdDcuMiA6YXJvdW5kCisgICAgICAgICAgICAgIChsYW1iZGEgKGYgJnJlc3QgYXJncykK KyAgICAgICAgICAgICAgICAobGlzdCAoY29ucyAxIChjYWxsZWQtaW50ZXJhY3RpdmVseS1w KSkgKGFwcGx5IGYgYXJncykpKSkKKyAgKGFkdmljZS1hZGQgJ3NtLXRlc3Q3LjIgOmJlZm9y ZSAjJ2lnbm9yZSkKKyAgKGFkdmljZS1hZGQgJ3NtLXRlc3Q3LjIgOmFmdGVyICMnaWdub3Jl KQorICA7KGFkdmljZS1hZGQgJ3NtLXRlc3Q3LjIgOmZpbHRlci1hcmdzICMnbGlzdCkKKyAg OyhhZHZpY2UtYWRkICdzbS10ZXN0Ny4yIDpmaWx0ZXItcmV0dXJuICMnaWRlbnRpdHkpCisg IChzaG91bGQgKGVxdWFsIChzbS10ZXN0Ny4yKSAnKCgxIC4gbmlsKSAoMSAuIG5pbCkpKSkK KyAgKHNob3VsZCAoZXF1YWwgKGNhbGwtaW50ZXJhY3RpdmVseSAnc20tdGVzdDcuMikgJygo MSAuIHQpICgxIC4gdCkpKSkpCisKKyhlcnQtZGVmdGVzdCBhZHZpY2UtdGVzdC1jYWxsZWQt aW50ZXJhY3RpdmVseS1wLTMgKCkKKyAgIkNoZWNrIGludGVyYWN0aW9uIGJldHdlZW4gYmVm b3JlIGFkdmljZSBhbmQgY2FsbGVkLWludGVyYWN0aXZlbHktcC4KKworVGhpcyB0ZXN0cyB0 aGUgY2FzZSBvZiB0aGUgaW5uZXJtb3N0IGFkdmljZSBiZWluZyBiZWZvcmUiCisgIChkZWZ1 biBzbS10ZXN0Ny4zICgpIChpbnRlcmFjdGl2ZSkgKGNvbnMgMSAoY2FsbGVkLWludGVyYWN0 aXZlbHktcCkpKQorICAoYWR2aWNlLWFkZCAnc20tdGVzdDcuMyA6YmVmb3JlICMnaWdub3Jl KQorICA7KGFkdmljZS1hZGQgJ3NtLXRlc3Q3LjMgOmZpbHRlci1hcmdzICMnbGlzdCkKKyAg OyhhZHZpY2UtYWRkICdzbS10ZXN0Ny4zIDpmaWx0ZXItcmV0dXJuICMnaWRlbnRpdHkpCisg IChzaG91bGQgKGVxdWFsIChzbS10ZXN0Ny4zKSAnKDEgLiBuaWwpKSkKKyAgKHNob3VsZCAo ZXF1YWwgKGNhbGwtaW50ZXJhY3RpdmVseSAnc20tdGVzdDcuMykgJygxIC4gdCkpKSkKKwor KGVydC1kZWZ0ZXN0IGFkdmljZS10ZXN0LWNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAtNCAoKQor ICAiQ2hlY2sgaW50ZXJhY3Rpb24gYmV0d2VlbiBhZHZpY2Ugb24gY2FsbC1pbnRlcmFjdGl2 ZWx5IGFuZCBjYWxsZWQtaW50ZXJhY3RpdmVseS1wLgorCitUaGlzIHRlc3RzIHRoZSBjYXNl IHdoZXJlIGNhbGwtaW50ZXJhY3RpdmVseSBpdHNlbGYgaXMgYWR2aXNlZCwKK3doaWNoIGlz IGN1cnJlbnRseSBicm9rZW4uIgorICA6ZXhwZWN0ZWQtcmVzdWx0IDpmYWlsZWQKKyAgKGRl ZnVuIHNtLXRlc3Q3LjQgKCkgKGludGVyYWN0aXZlKSAoY29ucyAxIChjYWxsZWQtaW50ZXJh Y3RpdmVseS1wKSkpCisgIChwb3N0LXJlc3RvcmUtZnVuYyBjYWxsLWludGVyYWN0aXZlbHkK KyAgICAoYWR2aWNlLWFkZCAnY2FsbC1pbnRlcmFjdGl2ZWx5IDpiZWZvcmUgIydpZ25vcmUp CisgICAgKHNob3VsZCAoZXF1YWwgKHNtLXRlc3Q3LjQpICcoMSAuIG5pbCkpKQorICAgIChz aG91bGQgKGVxdWFsIChjYWxsLWludGVyYWN0aXZlbHkgJ3NtLXRlc3Q3LjQpICcoMSAuIHQp KSkpKQorCisoZXJ0LWRlZnRlc3QgYWR2aWNlLXRlc3QtY2FsbGVkLWludGVyYWN0aXZlbHkt cC01ICgpCisgICJDaGVjayBpbnRlcmFjdGlvbiBiZXR3ZWVuIG5vbi1pbm5lcm1vc3QgYXJv dW5kIGFkdmljZSBhbmQgY2FsbGVkLWludGVyYWN0aXZlbHktcC4KKworVGhpcyB0ZXN0cyB0 aGUgY2FzZSB3aGVyZSBhIGZ1bmN0aW9uIGhhcyBhcm91bmQgYWR2aWNlLCBidXQgaXQgaXMK K25vdCB0aGUgaW5uZXJtb3N0IGFkdmljZS4iCisgIChkZWZ1biBzbS10ZXN0Ny41ICgpIChp bnRlcmFjdGl2ZSkgKGNvbnMgMSAoY2FsbGVkLWludGVyYWN0aXZlbHktcCkpKQorICAoYWR2 aWNlLWFkZCAnc20tdGVzdDcuNSA6YmVmb3JlICMnaWdub3JlKQorICAoYWR2aWNlLWFkZCAn c20tdGVzdDcuNSA6YXJvdW5kICMnZnVuY2FsbCkKKyAgOyhhZHZpY2UtYWRkICdzbS10ZXN0 Ny41IDpmaWx0ZXItYXJncyAjJ2xpc3QpCisgIDsoYWR2aWNlLWFkZCAnc20tdGVzdDcuNSA6 ZmlsdGVyLXJldHVybiAjJ2lkZW50aXR5KQorICAoc2hvdWxkIChlcXVhbCAoc20tdGVzdDcu NSkgJygxIC4gbmlsKSkpCisgIChzaG91bGQgKGVxdWFsIChjYWxsLWludGVyYWN0aXZlbHkg J3NtLXRlc3Q3LjUpICcoMSAuIHQpKSkpCisKIChlcnQtZGVmdGVzdCBhZHZpY2UtdGVzdC1p bnRlcmFjdGl2ZSAoKQogICAiQ2hlY2sgaGFuZGxpbmcgb2YgaW50ZXJhY3RpdmUgc3BlYy4i CiAgIChkZWZ1biBzbS10ZXN0OCAoYSkgKGludGVyYWN0aXZlICJwIikgYSkK --------------080203060909030805010104-- From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 04:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137965101928652 (code B ref 3984); Fri, 20 Sep 2013 04:24:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 04:23:39 +0000 Received: from localhost ([127.0.0.1]:50494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMsFm-0007S3-AQ for submit@debbugs.gnu.org; Fri, 20 Sep 2013 00:23:38 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:34633) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMsFj-0007Rq-CI for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 00:23:35 -0400 Received: by mail-pd0-f171.google.com with SMTP id g10so9219561pdj.2 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 21:23:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8cMy5Sdsg+kR4EtJBenSCZagj1TuLGwhOZRO8t78ClA=; b=kzz5S1TVU/b1jFGKYwtIs/U+2aVboE4Q99HOpr5pu6HQPLfNALicGgxIPQnNLjeUn9 MGmUqHrYwrPYqPg3PhRa/LizMmhhgoR12mp3qg9YZlfFx0uZi4ewzm605bYtxR/ooB1r tYYidCAwi60AKUToMDttBxx7OeDhQaUJMIoV90+nNidIi9esv/IZQSU5NPLCaGA3d8ai HV2XpBogVgs8i2QZ4OD+i5pw76h2dQIZf3o9Jv/p2siNs4uirel+nrEYERxdkQhjMIh5 HaI1Uim/5zRZfJpIUX5kgAnE9p1r3CVTthudWZWu/8lCpPB4srX5UJPzmDnwTte0qukj YgFQ== X-Gm-Message-State: ALoCoQl+PFbOfDDkIfb5AUr5GnnCTT91l2UGulrD7QapBNr0RwtB6bdv2xBdNQK0UZb3TxNfuJLt X-Received: by 10.66.218.226 with SMTP id pj2mr6576006pac.62.1379651009537; Thu, 19 Sep 2013 21:23:29 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id bb1sm12895780pbc.10.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 21:23:27 -0700 (PDT) Message-ID: <523BCDBB.3000202@thompsonclan.org> Date: Thu, 19 Sep 2013 21:23:23 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> In-Reply-To: <523B73CF.4080105@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) After a little more consideration, I think I know what the bug is. The goal of "advice--called-interactively-skip" is to skip all the advice-related stack frames of the called function, not advice-related stack frames for advice on call-interactively. I also came up with an idea to address this issue: a second function added to called-interactively-p-functions that checks the current stack frame for equality to the unadvised form of call-interactively and if it finds it, skips past all the advice frames to the outermost call. This will make it so that advising call-interactively does not affect the return of called-interactively-p, but it will not fix the "innermost around advice" problem. I'm trying to code up a solution now. I'll eventually find my way through the twisty maze of fencepost errors. -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Fix case where call-interactively is advised Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 04:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137965312431905 (code B ref 3984); Fri, 20 Sep 2013 04:59:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 04:58:44 +0000 Received: from localhost ([127.0.0.1]:50515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMsnj-0008IW-Ol for submit@debbugs.gnu.org; Fri, 20 Sep 2013 00:58:44 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:58420) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMsnh-0008II-EV for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 00:58:42 -0400 Received: by mail-pa0-f45.google.com with SMTP id bg4so261744pad.32 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 21:58:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=bA8cTBCofViJ8ZO0oUaRxaRP3sHlrLlCFbcjYuCyqvg=; b=H9QtMS1p+1KCcSEtBHTgoY3Mr+F0eq0nOhKiGjmgQi530L2l9YlRjLHgEMq857Q9Qd 2j8Rpkyzv7Tu6YtafcBS5YqDo+iH9LhEo6wQmSWRGnruC4luDpvvmaKYsjoFk30ubTm1 vdo1x/L7OD2L1m1O1v6MlHesbCMISdtXpIeZCwFLosjr0pF6K9iusWGIaLgVRnjZIi1k 9FHue/j+AnTOVdFraxtW59qh5trmzCU3S05rw7EWZW27Q2mEeln7jyxNPex5kQ5lDfLb HY9VBejt2e2g4kNfm39LXdoL6mkTAbMLZoMxbdcWf4bEnhWAIqkZYe9Tzr0ZBGTe9ksj gwiw== X-Gm-Message-State: ALoCoQkr1DNnJCmuzDURwK4cCvDJz97qVeohvFn1YpHnRYm+91DX4cWsMRMgHKAAQV5xvsPCHERj X-Received: by 10.68.134.6 with SMTP id pg6mr5803897pbb.67.1379653115489; Thu, 19 Sep 2013 21:58:35 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id tg7sm13019475pbc.36.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 21:58:33 -0700 (PDT) Message-ID: <523BD5F5.1020600@thompsonclan.org> Date: Thu, 19 Sep 2013 21:58:29 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> In-Reply-To: <523BCDBB.3000202@thompsonclan.org> Content-Type: multipart/mixed; boundary="------------090007000309060904010905" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) This is a multi-part message in MIME format. --------------090007000309060904010905 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Here is a patch that applies over my previous patch and fixes "advice-test-called-interactively-p-4", which tests whether called-interactively-p returns the correct result when call-interactively is advised. On 9/19/13 9:23 PM, Ryan wrote: > After a little more consideration, I think I know what the bug is. The > goal of "advice--called-interactively-skip" is to skip all the > advice-related stack frames of the called function, not advice-related > stack frames for advice on call-interactively. > > I also came up with an idea to address this issue: a second function > added to called-interactively-p-functions that checks the current > stack frame for equality to the unadvised form of call-interactively > and if it finds it, skips past all the advice frames to the outermost > call. This will make it so that advising call-interactively does not > affect the return of called-interactively-p, but it will not fix the > "innermost around advice" problem. > > I'm trying to code up a solution now. I'll eventually find my way > through the twisty maze of fencepost errors. > > -Ryan --------------090007000309060904010905 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="fix-advised-call-interactively.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="fix-advised-call-interactively.diff" ZGlmZiAtLWdpdCBhL2xpc3AvZW1hY3MtbGlzcC9uYWR2aWNlLmVsIGIvbGlzcC9lbWFjcy1s aXNwL25hZHZpY2UuZWwKaW5kZXggOGIxNDlhYS4uMmRhYjg2NCAxMDA2NDQKLS0tIGEvbGlz cC9lbWFjcy1saXNwL25hZHZpY2UuZWwKKysrIGIvbGlzcC9lbWFjcy1saXNwL25hZHZpY2Uu ZWwKQEAgLTQ2MSw2ICs0NjEsMzYgQEAgb2YgdGhlIHBpZWNlIG9mIGFkdmljZS4iCiAgICAg ICAgICAgICAoZnVuY2FsbCBnZXQtbmV4dC1mcmFtZSkpKSkKICAgICAgICgtIGkgb3JpZ2kg MSkpKSkKIAorKGRlZnVuIGFkdmljZS11bmFkdmlzZWQtZm9ybSAoZnVuYykKKyAgIlJldHVy biB0aGUgZGVmaW5pdGlvbiBvZiBGVU5DIHdpdGggYWxsIGFkdmljZSBzdHJpcHBlZC4KKwor RlVOQyBtYXkgYmUgYSBmdW5jdGlvbiBkZWZpbml0aW9uIG9yIGEgc3ltYm9sIG5hbWluZyBh IGZ1bmN0aW9uLiIKKyAgKGxldCAoKGZ1bmMgKGluZGlyZWN0LWZ1bmN0aW9uIGZ1bmMpKSkK KyAgICAod2hpbGUgKGFkdmljZS0tcCBmdW5jKQorICAgICAgKHNldHEgZnVuYyAoYWR2aWNl LS1jZHIgZnVuYykpKQorICAgIGZ1bmMpKQorCis7OyBXaGVuIGBjYWxsLWludGVyYWN0aXZl bHknIGlzIGFkdmlzZWQsIGNhbGxlZC1pbnRlcmFjdGl2ZWx5LXAgbmVlZHMKKzs7IHRvIGJl IHRhdWdodCB0byBza2lwIHRoZSBhZHZpc2luZyBmcmFtZXMuCisoYWRkLWhvb2sgJ2NhbGxl ZC1pbnRlcmFjdGl2ZWx5LXAtZnVuY3Rpb25zCisgICAgICAgICAgIydhZHZpY2UtLWFkdmlz ZWQtY2FsbGVkLWludGVyYWN0aXZlbHktc2tpcCkKKyhkZWZ1biBhZHZpY2UtLWFkdmlzZWQt Y2FsbGVkLWludGVyYWN0aXZlbHktc2tpcCAob3JpZ2kgZnJhbWUxIGZyYW1lMikKKyAgKHdo ZW4gKGFuZCBmcmFtZTIKKyAgICAgICAgICAgICAobm90IChlcSAobnRoIDEgZnJhbWUyKSAn Y2FsbC1pbnRlcmFjdGl2ZWx5KSkKKyAgICAgICAgICAgICAoZXEgKGFkdmljZS11bmFkdmlz ZWQtZm9ybSAnY2FsbC1pbnRlcmFjdGl2ZWx5KQorICAgICAgICAgICAgICAgICAoaW5kaXJl Y3QtZnVuY3Rpb24gKG50aCAxIGZyYW1lMikpKSkKKyAgICA7OyBTa2lwIHVudGlsIGZyYW1l MiBpcyBhIGNhbGwgdG8gdGhlIHN5bWJvbCBjYWxsLWludGVyYWN0aXZlbHkuCisgICAgKGxl dCogKChpIG9yaWdpKQorICAgICAgICAgICAoZ2V0LW5leHQtZnJhbWUKKyAgICAgICAgICAg IChsYW1iZGEgKCkKKyAgICAgICAgICAgICAgKHNldHEgZnJhbWUxIGZyYW1lMikKKyAgICAg ICAgICAgICAgKHNldHEgZnJhbWUyIChpbnRlcm5hbC0tY2FsbGVkLWludGVyYWN0aXZlbHkt cC0tZ2V0LWZyYW1lIGkpKQorICAgICAgICAgICAgICAoc2V0cSBpICgxKyBpKSkpKSkKKyAg ICAgIChmdW5jYWxsIGdldC1uZXh0LWZyYW1lKQorICAgICAgKHdoaWxlIChhbmQgZnJhbWUy CisgICAgICAgICAgICAgICAgICAobm90IChlcSAobnRoIDEgZnJhbWUyKSAnY2FsbC1pbnRl cmFjdGl2ZWx5KSkpCisgICAgICAgIChmdW5jYWxsIGdldC1uZXh0LWZyYW1lKSkKKyAgICAg ICgtIGkgb3JpZ2kgMSkpKSkKIAogKHByb3ZpZGUgJ25hZHZpY2UpCiA7OzsgbmFkdmljZS5l bCBlbmRzIGhlcmUKZGlmZiAtLWdpdCBhL2xpc3Avc3Vici5lbCBiL2xpc3Avc3Vici5lbApp bmRleCA3NWM2YjNhLi5iNWY2ODJhIDEwMDY0NAotLS0gYS9saXNwL3N1YnIuZWwKKysrIGIv bGlzcC9zdWJyLmVsCkBAIC00MjcyLDggKzQyNzIsNiBAQCBjb21tYW5kIGlzIGNhbGxlZCBm cm9tIGEga2V5Ym9hcmQgbWFjcm8/IgogICAgICAgICAgICAgICAgICAoXyAoc2V0cSBpICgr IGkgc2tpcCAtMSkpIChmdW5jYWxsIGdldC1uZXh0LWZyYW1lKSkpKSkpKQogICAgICAgOzsg Tm93IGBmcmFtZScgc2hvdWxkIGJlICJ0aGUgZnVuY3Rpb24gZnJvbSB3aGljaCB3ZSB3ZXJl IGNhbGxlZCIuCiAgICAgICAocGNhc2UgKGNvbnMgZnJhbWUgbmV4dGZyYW1lKQotICAgICAg ICA7OyBObyBzdWJyIGNhbGxzIGBpbnRlcmFjdGl2ZS1wJywgc28gd2UgY2FuIHJ1bGUgdGhh dCBvdXQuCi0gICAgICAgIChgKCgsXyAsKHByZWQgKGxhbWJkYSAoZikgKHN1YnJwIChpbmRp cmVjdC1mdW5jdGlvbiBmKSkpKSAuICxfKSAuICxfKSBuaWwpCiAgICAgICAgIDs7IFNvbWVo b3csIEkgc29tZXRpbWVzIGdvdCBgY29tbWFuZC1leGVjdXRlJyByYXRoZXIgdGhhbgogICAg ICAgICA7OyBgY2FsbC1pbnRlcmFjdGl2ZWx5JyBvbiBteSBzdGFja3RyYWNlICE/CiAgICAg ICAgIDs7KGAoLF8gLiAodCBjb21tYW5kLWV4ZWN1dGUgLiAsXykpIHQpCmRpZmYgLS1naXQg YS90ZXN0L2F1dG9tYXRlZC9hZHZpY2UtdGVzdHMuZWwgYi90ZXN0L2F1dG9tYXRlZC9hZHZp Y2UtdGVzdHMuZWwKaW5kZXggYzhmMDZlNS4uMDFiZTNhYiAxMDA2NDQKLS0tIGEvdGVzdC9h dXRvbWF0ZWQvYWR2aWNlLXRlc3RzLmVsCisrKyBiL3Rlc3QvYXV0b21hdGVkL2FkdmljZS10 ZXN0cy5lbApAQCAtMTYzLDcgKzE2Myw2IEBAIFRoaXMgdGVzdHMgdGhlIGNhc2Ugb2YgdGhl IGlubmVybW9zdCBhZHZpY2UgYmVpbmcgYmVmb3JlIgogCiBUaGlzIHRlc3RzIHRoZSBjYXNl IHdoZXJlIGNhbGwtaW50ZXJhY3RpdmVseSBpdHNlbGYgaXMgYWR2aXNlZCwKIHdoaWNoIGlz IGN1cnJlbnRseSBicm9rZW4uIgotICA6ZXhwZWN0ZWQtcmVzdWx0IDpmYWlsZWQKICAgKGRl ZnVuIHNtLXRlc3Q3LjQgKCkgKGludGVyYWN0aXZlKSAoY29ucyAxIChjYWxsZWQtaW50ZXJh Y3RpdmVseS1wKSkpCiAgIChwb3N0LXJlc3RvcmUtZnVuYyBjYWxsLWludGVyYWN0aXZlbHkK ICAgICAoYWR2aWNlLWFkZCAnY2FsbC1pbnRlcmFjdGl2ZWx5IDpiZWZvcmUgIydpZ25vcmUp Cg== --------------090007000309060904010905-- From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 05:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137965343432441 (code B ref 3984); Fri, 20 Sep 2013 05:04:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 05:03:54 +0000 Received: from localhost ([127.0.0.1]:50520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMssj-0008RA-Qk for submit@debbugs.gnu.org; Fri, 20 Sep 2013 01:03:54 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:49733) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VMssh-0008Qu-75 for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 01:03:51 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so268645pad.14 for <3984@debbugs.gnu.org>; Thu, 19 Sep 2013 22:03:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=c2sWHpnUJnWnd336ikbk+m+ULfJux/C2h95nGFPF2sM=; b=B34QWNeFPIZEFbNo5VhWjVS43fc/7jKxWQ8jb0VmzCVtM3QqotuFh8zZhx3aHEMp6l ByMAe8trgMFJV+CUvei2r7kEMSg2LzgxFFizoeVa9RViK8g6bCb8MjwwsxgYW+FpjCEa EleNAmEQna4rAo0DjxAuGKStbfSZsRfwlt3oqwkEPPCbiMpuahKkg1+vCB9sy2y5k3rB V5IFy4BlsQDTUrv0ZHsaHdGyddhGC7MPdjJnAW31jVvpU1D8XQgHTjj5wBoIakAET1Vk tM6A0rwhuABWq0FxV+NpStLYD/LQ4DFgZOp4sl+SOH9RW1Doil4jgKpbhTvMamJpJkP/ Tqyw== X-Gm-Message-State: ALoCoQnJR7yzBddxYXG5MmkwoQpLUGf/y9PpfV4qnHl+jrqMEgSKzMgg9WfqVe5/4KkSZCqKalgV X-Received: by 10.66.141.144 with SMTP id ro16mr1136728pab.173.1379653425443; Thu, 19 Sep 2013 22:03:45 -0700 (PDT) Received: from [192.168.10.2] (user-0c9ha1q.cable.mindspring.com. [24.152.168.58]) by mx.google.com with ESMTPSA id fa4sm16204281pab.17.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 19 Sep 2013 22:03:44 -0700 (PDT) Message-ID: <523BD72B.9010404@thompsonclan.org> Date: Thu, 19 Sep 2013 22:03:39 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> <523BD5F5.1020600@thompsonclan.org> In-Reply-To: <523BD5F5.1020600@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) On a related note, what is the proper way to test for the new advice system? (featurep 'nadvice)? Anyway, now that we have a fix for when call-interactively is advised, what do you want to do about the case where the called function is advised with the innermost advice being around? The only problem we really need to solve is being absolutely whether or not a given stack frame is the innermost function in an advice stack. The two options that I can see are a complete top-down search or modifying around advice so that it gives a consistent signature (e.g. by wrapping the advised function in a special lambda. -Ryan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 14:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137968781025575 (code B ref 3984); Fri, 20 Sep 2013 14:37:01 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 14:36:50 +0000 Received: from localhost ([127.0.0.1]:51242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN1pB-0006eQ-Kz for submit@debbugs.gnu.org; Fri, 20 Sep 2013 10:36:50 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:36651) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN1p8-0006eF-TO for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 10:36:47 -0400 Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r8KEai6W026786; Fri, 20 Sep 2013 10:36:45 -0400 Received: by pastel.home (Postfix, from userid 20848) id F218D62D6C; Fri, 20 Sep 2013 10:35:01 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> Date: Fri, 20 Sep 2013 10:35:01 -0400 In-Reply-To: <523BCDBB.3000202@thompsonclan.org> (Ryan's message of "Thu, 19 Sep 2013 21:23:23 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4707=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4707> : inlines <96> : streams <1041465> : uri <1542515> X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -2.0 (--) > After a little more consideration, I think I know what the bug is. The goal > of "advice--called-interactively-skip" is to skip all the advice-related > stack frames of the called function, not advice-related stack frames for > advice on call-interactively. Oh, right. How 'bout the patch below? Stefan === modified file 'lisp/subr.el' --- lisp/subr.el 2013-09-18 03:50:18 +0000 +++ lisp/subr.el 2013-09-20 14:34:03 +0000 @@ -4246,6 +4246,8 @@ if those frames don't seem special and otherwise, it should return the number of frames to skip (minus 1).") +(defconst internal--call-interactively (symbol-function 'call-interactively)) + (defun called-interactively-p (&optional kind) "Return t if the containing function was called by `call-interactively'. If KIND is `interactive', then only return t if the call was made @@ -4321,7 +4323,9 @@ ;; Somehow, I sometimes got `command-execute' rather than ;; `call-interactively' on my stacktrace !? ;;(`(,_ . (t command-execute . ,_)) t) - (`(,_ . (t call-interactively . ,_)) t))))) + (`(,_ . (t ,(or `call-interactively + (pred (eq internal--call-interactively))) . ,_)) + t))))) (defun interactive-p () "Return t if the containing function was run directly by user input. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 14:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137968886327285 (code B ref 3984); Fri, 20 Sep 2013 14:55:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 14:54:23 +0000 Received: from localhost ([127.0.0.1]:51288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN26A-000760-LL for submit@debbugs.gnu.org; Fri, 20 Sep 2013 10:54:22 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:14842) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN260-00075a-13 for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 10:54:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28463870" Received: from 69-165-141-177.dsl.teksavvy.com (HELO pastel.home) ([69.165.141.177]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Sep 2013 10:50:08 -0400 Received: by pastel.home (Postfix, from userid 20848) id 69C1F63186; Fri, 20 Sep 2013 10:54:05 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> Date: Fri, 20 Sep 2013 10:54:05 -0400 In-Reply-To: <523B73CF.4080105@thompsonclan.org> (Ryan's message of "Thu, 19 Sep 2013 14:59:43 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > Ok, I have written a couple of tests, two of which are currently failing > (mine are the ones with numbered suffixes 2 through 5). I am > attaching a patch that adds these tests. ERT output is below: Thanks. Just a few questions, before installing the patch. > +(defun clear-advice (symbol) > + "Reset SYMBOL's function to its original unadvised definition." > + (let ((func (symbol-function symbol))) > + (while (advice--p func) > + (setq func (advice--cdr func))) > + (fset symbol func))) Why do you need that? AFAICT you only use it after defining sm-test7.2, and I don't see why that call is needed. > +(defmacro post-restore-func (func &rest body) > + (let ((fdef (symbol-function func))) > + `(unwind-protect > + (progn ,@body) > + (fset ',func ,fdef)))) > +(put 'post-restore-func 'lisp-indent-function > + (get 'prog1 'lisp-indent-function)) Since it's only used once, I don't think it's worth defining a macro for it. Stefan From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 16:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13796958489891 (code B ref 3984); Fri, 20 Sep 2013 16:51:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 16:50:48 +0000 Received: from localhost ([127.0.0.1]:51548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3up-0002ZQ-Lt for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:50:47 -0400 Received: from mail-pb0-f48.google.com ([209.85.160.48]:55555) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3un-0002Z8-71 for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 12:50:45 -0400 Received: by mail-pb0-f48.google.com with SMTP id ma3so597050pbc.7 for <3984@debbugs.gnu.org>; Fri, 20 Sep 2013 09:50:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ffmi6NMOSawFV0o3jLhnrCbzGVk74RPjc2VA34EQsR0=; b=GGnzbjuW47eOar2xdDI07ByEK7T/ifIgE7MvcZw8LZc1Z111aJTQQjfd/hw/qVRT5I TSl1a+y07KaKbyQyTyl2yilyg1naEUHug9dk+A7jP9OTddbPjq2NJwxX1ceRsfdv/R2Z 2xliJ1QGRXB29MJdg8Nk5jNP1BjUyadX3YffM3HY7n8xOs69ClQDHVwMpO8wWeptXZS8 F8p8yvlh4LyZVlx50dF7L0g02mENcAIV1aadSMCdMyvppe4JYQUV50NfymyCyaq6spbR sca70nqUM+Fg9DyW6RDF6clLuZV22sohKhKwLKaP8blOlNpuMI4JQi9hPKyPfS/jMY3P y8KQ== X-Gm-Message-State: ALoCoQlLIodHtXOqSGnsj81kQ0JCvcV96eJMB2IP4sgKWjK5PNoogfjbx7McmyEMugA+tMshqIkz X-Received: by 10.68.234.130 with SMTP id ue2mr9022526pbc.159.1379695839204; Fri, 20 Sep 2013 09:50:39 -0700 (PDT) Received: from wireless-121-195.scripps.edu (wireless-121-195.scripps.edu. [137.131.121.195]) by mx.google.com with ESMTPSA id va8sm16881752pbc.16.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 09:50:38 -0700 (PDT) Message-ID: <523C7CDA.6040308@thompsonclan.org> Date: Fri, 20 Sep 2013 09:50:34 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -0.7 (/) >> Ok, I have written a couple of tests, two of which are currently failing >> (mine are the ones with numbered suffixes 2 through 5). I am >> attaching a patch that adds these tests. ERT output is below: > Thanks. Just a few questions, before installing the patch. > >> +(defun clear-advice (symbol) >> + "Reset SYMBOL's function to its original unadvised definition." >> + (let ((func (symbol-function symbol))) >> + (while (advice--p func) >> + (setq func (advice--cdr func))) >> + (fset symbol func))) > Why do you need that? AFAICT you only use it after defining sm-test7.2, > and I don't see why that call is needed. Oh, that's actually not necessary. I put it in so I could re-run the test without restarting emacs or manually resetting the advice, and I forgot to remove it. >> +(defmacro post-restore-func (func &rest body) >> + (let ((fdef (symbol-function func))) >> + `(unwind-protect >> + (progn ,@body) >> + (fset ',func ,fdef)))) >> +(put 'post-restore-func 'lisp-indent-function >> + (get 'prog1 'lisp-indent-function)) > Since it's only used once, I don't think it's worth defining a macro for it. Probably true. I wasn't sure how much I would end up using it, and it seemed like a potentially useful macro to have lying around when testing advice that might break core functions of emacs. Anyway, I wasn't very creative with my test names or function names, and I'd be happy to submit a new patch with more informative names (as well as the above changes). Is there a naming convention for tests/functions that I should adhere to? From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 16:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137969607810235 (code B ref 3984); Fri, 20 Sep 2013 16:55:01 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 16:54:38 +0000 Received: from localhost ([127.0.0.1]:51553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3yX-0002f1-JE for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:54:37 -0400 Received: from mail-pd0-f181.google.com ([209.85.192.181]:41768) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN3yU-0002ei-Iy for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 12:54:35 -0400 Received: by mail-pd0-f181.google.com with SMTP id g10so600505pdj.40 for <3984@debbugs.gnu.org>; Fri, 20 Sep 2013 09:54:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=qENA+9EYu2l1CDAky0o9jnl+VB39FZi06sxs0/9ARSA=; b=Z+om06vzcUquOqHXBDKM4dSvKbGh91h5RreIuQb+1bSUbMk94AKMXR7fU2bs0xVtSp qxe3X8ho4Dz6MEkjaTX7WWToD1i3ChzyhtY1SHwbTlAFk7b8+/CdK8rdNNbaO72wupa2 EXwvIa/SQ5BlJMGgeWxa2t/9Jgk/RHpCfAfbLaasgw2IjOpPA//Q3k5wfFzsNGImVbl0 MZhNmH4Lu8eIaSIwvAtQuNOgfCUmEU61soYfSYtUNIDWuj7e0IE0tF+T4ORQdM1peM2E RAv2QmGoETz2rkWEx9vEmebHrBBeLH5NAXZZC1nPnHySZszT5pSKUZ1RxBOLGrCrVJQV sy+Q== X-Gm-Message-State: ALoCoQmhBEHjsYNp9xvJPa+PYQzldIIOn+13CFHpcWGU/wgVxrfeZ2m5VIUDAYKjPGyH3HFdMfV0 X-Received: by 10.66.136.167 with SMTP id qb7mr10109997pab.43.1379696068624; Fri, 20 Sep 2013 09:54:28 -0700 (PDT) Received: from wireless-121-195.scripps.edu (wireless-121-195.scripps.edu. [137.131.121.195]) by mx.google.com with ESMTPSA id xv2sm16840193pbb.39.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 09:54:27 -0700 (PDT) Message-ID: <523C7DC0.3000403@thompsonclan.org> Date: Fri, 20 Sep 2013 09:54:24 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) On 9/20/13 7:35 AM, Stefan Monnier wrote: >> After a little more consideration, I think I know what the bug is. The goal >> of "advice--called-interactively-skip" is to skip all the advice-related >> stack frames of the called function, not advice-related stack frames for >> advice on call-interactively. > Oh, right. How 'bout the patch below? > > > Stefan > > > === modified file 'lisp/subr.el' > --- lisp/subr.el 2013-09-18 03:50:18 +0000 > +++ lisp/subr.el 2013-09-20 14:34:03 +0000 > @@ -4246,6 +4246,8 @@ > if those frames don't seem special and otherwise, it should return > the number of frames to skip (minus 1).") > > +(defconst internal--call-interactively (symbol-function 'call-interactively)) > + > (defun called-interactively-p (&optional kind) > "Return t if the containing function was called by `call-interactively'. > If KIND is `interactive', then only return t if the call was made > @@ -4321,7 +4323,9 @@ > ;; Somehow, I sometimes got `command-execute' rather than > ;; `call-interactively' on my stacktrace !? > ;;(`(,_ . (t command-execute . ,_)) t) > - (`(,_ . (t call-interactively . ,_)) t))))) > + (`(,_ . (t ,(or `call-interactively > + (pred (eq internal--call-interactively))) . ,_)) > + t))))) > > (defun interactive-p () > "Return t if the containing function was run directly by user input. > That would certainly work, assuming that subr.el is always loaded before nadvice.el (so call-interactively could not possibly be advised yet), which seems likely to be true since subr.el contains so many core functions. Since this bug report is just about advising call-interactively, which we now have a fix for, should I open a separate bug about the around advice? From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Ryan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 16:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137969623110481 (code B ref 3984); Fri, 20 Sep 2013 16:58:01 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 16:57:11 +0000 Received: from localhost ([127.0.0.1]:51557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN40z-0002iy-QW for submit@debbugs.gnu.org; Fri, 20 Sep 2013 12:57:10 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:53193) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN40w-0002iS-W4 for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 12:57:08 -0400 Received: by mail-pd0-f173.google.com with SMTP id p10so610604pdj.4 for <3984@debbugs.gnu.org>; Fri, 20 Sep 2013 09:57:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=GhNt/Os0IQAy5F4BhPCR8TwJD8/4JyObJh2/MasNG6Y=; b=fyxF+2VB85kYCng6N47pO772O89uph57el9TEY7C0ZU4qHd8SWqAb1l2MnPpFCx8iE BtcuT+ZgMpFwBKizv8k7vp5epmvJ7jLoJpv2RiQWLAfNG7NaYHZ6UHXU1D+hLCF9/JEF faMCZfqw28Z8LKGEIv6YJzJCr9klIVCEjA1/NDeyDQAFMNgOs31K3AYJg1aiK3yaKkzO 3CX+jicCyTz2Q0QGQ32Z61yscUHoO22cakares+RUKhf3N711i0F8yOdnDO16yVpMiLE tA5ZlzmiKAuwt/Tg5O9y8iunSBLC2fMCNrmSU5vcuBfgxK9hzxB9cea5iHNq9Yu6Y5s5 hm/Q== X-Gm-Message-State: ALoCoQlJaBZTbE1QLkDAOUdyJ/UiQ4ujVi7Uec1dhVFDRO1G0n9/YUMBO8SsIxYQkoRBXtJbKg3o X-Received: by 10.66.118.129 with SMTP id km1mr9562433pab.127.1379696221135; Fri, 20 Sep 2013 09:57:01 -0700 (PDT) Received: from wireless-121-195.scripps.edu (wireless-121-195.scripps.edu. [137.131.121.195]) by mx.google.com with ESMTPSA id py4sm16870504pbb.33.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Sep 2013 09:57:00 -0700 (PDT) Message-ID: <523C7E59.5060504@thompsonclan.org> Date: Fri, 20 Sep 2013 09:56:57 -0700 From: Ryan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523BCDBB.3000202@thompsonclan.org> <523C7DC0.3000403@thompsonclan.org> In-Reply-To: <523C7DC0.3000403@thompsonclan.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.0 (/) I confirm that your simple patch to subr.el passes the test that I provided. From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 20:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137970719728459 (code B ref 3984); Fri, 20 Sep 2013 20:00:03 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 19:59:57 +0000 Received: from localhost ([127.0.0.1]:51843 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6rs-0007Ov-Jd for submit@debbugs.gnu.org; Fri, 20 Sep 2013 15:59:57 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:10877) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN6rp-0007Of-L1 for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 15:59:54 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28498062" Received: from 69-165-141-177.dsl.teksavvy.com (HELO pastel.home) ([69.165.141.177]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Sep 2013 15:55:49 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2278566A4A; Fri, 20 Sep 2013 15:59:47 -0400 (EDT) From: Stefan Monnier Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523C7CDA.6040308@thompsonclan.org> Date: Fri, 20 Sep 2013 15:59:47 -0400 In-Reply-To: <523C7CDA.6040308@thompsonclan.org> (Ryan's message of "Fri, 20 Sep 2013 09:50:34 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > Oh, that's actually not necessary. I put it in so I could re-run the test > without restarting emacs or manually resetting the advice, and I forgot to > remove it. OK, removed. >> Since it's only used once, I don't think it's worth defining a macro for it. > Probably true. I wasn't sure how much I would end up using it, and it seemed > like a potentially useful macro to have lying around when testing advice > that might break core functions of emacs. Makes sense as well, but let's postpone putting it in until we do end up using it repeatedly. I installed some tests based on your patch, as well as my quick fix in subr.el. > That would certainly work, assuming that subr.el is always loaded before > nadvice.el (so call-interactively could not possibly be advised yet), which > seems likely to be true since subr.el contains so many core functions. Since subr.el is both preloaded and loaded very early, that should be safe, yes. > Since this bug report is just about advising call-interactively, which we > now have a fix for, should I open a separate bug about the around advice? Sure. Note also that in the tests I installed, I added one that demonstrates a problem with :filter-args as well (because :filter-args uses `funcall' rather than `apply', so it doesn't match the pattern expected by advice--called-interactively-skip). By the way, I don't see your name in our copyright assignment database. I installed your tests under "tiny change", but if you intend to contribute more, we'd need you to sign some paperwork. Would you be willing to do that? Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 20 17:27:09 2013 Received: (at control) by debbugs.gnu.org; 20 Sep 2013 21:27:09 +0000 Received: from localhost ([127.0.0.1]:51964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN8EH-00014Y-5Q for submit@debbugs.gnu.org; Fri, 20 Sep 2013 17:27:09 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:2705) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN8EF-000146-Ru for control@debbugs.gnu.org; Fri, 20 Sep 2013 17:27:08 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IfAQUZPTMLNBIUGA2ISMEtjWGDKQOkeoFegxM X-IPAS-Result: Av4EABK/CFFFpY2x/2dsb2JhbABEvw4Xc4IfAQUZPTMLNBIUGA2ISMEtjWGDKQOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28506653" Received: from 69-165-141-177.dsl.teksavvy.com (HELO pastel.home) ([69.165.141.177]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Sep 2013 17:23:04 -0400 Received: by pastel.home (Postfix, from userid 20848) id 2CB5166A4A; Fri, 20 Sep 2013 17:27:02 -0400 (EDT) From: Stefan Monnier To: control@debbugs.gnu.org Subject: Re: bug#3984 Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> <523B73CF.4080105@thompsonclan.org> <523C7CDA.6040308@thompsonclan.org> Date: Fri, 20 Sep 2013 17:27:02 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 20 Sep 2013 15:59:47 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) close 3984 thanks From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: [debbugs-tracker] Processed: Re: bug#3984 Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 Sep 2013 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 3984@debbugs.gnu.org, Stefan Monnier Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.13797135299845 (code B ref 3984); Fri, 20 Sep 2013 21:46:02 +0000 Received: (at 3984) by debbugs.gnu.org; 20 Sep 2013 21:45:29 +0000 Received: from localhost ([127.0.0.1]:51986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN8W0-0002Yh-SO for submit@debbugs.gnu.org; Fri, 20 Sep 2013 17:45:29 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:35707) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VN8Vz-0002YV-1f for 3984@debbugs.gnu.org; Fri, 20 Sep 2013 17:45:27 -0400 Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r8KLjK6l003192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 20 Sep 2013 21:45:21 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8KLjId5008097 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 Sep 2013 21:45:19 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r8KLjIKq009879; Fri, 20 Sep 2013 21:45:18 GMT MIME-Version: 1.0 Message-ID: <120f7c80-3d3f-46cd-abf0-7d16799866e0@default> Date: Fri, 20 Sep 2013 14:45:17 -0700 (PDT) From: Drew Adams References: <> <> In-Reply-To: <> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Spam-Score: -3.0 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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.0 (---) I don't understand. I received this message (two copies, in fact, one from = help-debbugs@gnu.org, one from control@debbugs.gnu.org), which says only th= at the bug has been closed. Closed how/why? Has the bug been fixed? Not clear. (At least I don't see "wont-fix" or "notabug".) Thx. > -----Original Message----- > From: emacs-bug-tracker-bounces+drew.adams=3Doracle.com@gnu.org [mailto:e= macs- > bug-tracker-bounces+drew.adams=3Doracle.com@gnu.org] On Behalf Of GNU bug > tracker automated control server > Sent: Friday, September 20, 2013 2:28 PM > To: Stefan Monnier > Cc: tracker@debbugs.gnu.org > Subject: [debbugs-tracker] Processed: Re: bug#3984 >=20 > Processing commands for control@debbugs.gnu.org: >=20 > > close 3984 > bug#3984: 23.0.96; defadvice of call-interactively defeats interactive-p > bug closed, send any further explanations to > 3984@debbugs.gnu.org and "Drew Adams" >=20 > > thanks > Stopping processing here. >=20 > Please contact help-debbugs@gnu.org if you need assistance. >=20 > GNU bugs database, http://debbugs.gnu.org/ From unknown Sat Jun 21 10:46:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#3984: Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Sep 2013 01:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 3984 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ryan Cc: 3984@debbugs.gnu.org Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.138007320228294 (code B ref 3984); Wed, 25 Sep 2013 01:40:02 +0000 Received: (at 3984) by debbugs.gnu.org; 25 Sep 2013 01:40:02 +0000 Received: from localhost ([127.0.0.1]:33711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VOe5B-0007MC-38 for submit@debbugs.gnu.org; Tue, 24 Sep 2013 21:40:01 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:19997) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VOe57-0007M1-T4 for 3984@debbugs.gnu.org; Tue, 24 Sep 2013 21:39:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFG4rw0Z/2dsb2JhbABEvw4Xc4IfAQU6AgEZIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IPAS-Result: Av4EABK/CFG4rw0Z/2dsb2JhbABEvw4Xc4IfAQU6AgEZIxALNBIUGA0kiCTBLZEKA6R6gV6DEw X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="28975209" Received: from 184-175-13-25.dsl.teksavvy.com (HELO pastel.home) ([184.175.13.25]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Sep 2013 21:35:43 -0400 Received: by pastel.home (Postfix, from userid 20848) id B9E046327D; Tue, 24 Sep 2013 21:39:55 -0400 (EDT) Resent-Message-ID: Resent-To: 3984@debbugs.gnu.org Resent-From: Stefan Monnier Resent-Date: Tue, 24 Sep 2013 21:39:55 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D95C5662B9; Thu, 19 Sep 2013 16:59:38 -0400 (EDT) Date: Thu, 19 Sep 2013 16:59:38 -0400 From: Stefan Monnier In-reply-to: <523B4F4E.3060204@thompsonclan.org> Message-id: MIME-version: 1.0 Content-type: text/plain; CHARSET=US-ASCII Content-transfer-encoding: 7BIT References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> <52388FEB.6020007@thompsonclan.org> <523A37A4.5060505@thompsonclan.org> <523A49BE.3060109@thompsonclan.org> <523AB06B.9090606@thompsonclan.org> <523B4F4E.3060204@thompsonclan.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: 0.3 (/) > "advice-test-called-interactively-p" test in test/automated/advice-tests.el > happens to pass, but only because it doesn't use "called-interactively-p" > inside the original function, but rather only inside the advice > itself. Indeed. And it a very important case: the main definition of a function can be modified to not use called-interactively-p (add an argument which is set to a non-nil value in the interactive spec), but that's not really an option for an advice that requires to know if the function was called interactively (strictly speaking, it can be done, but it's a lot more trouble). Stefan