From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#3984: Fix for #3984 Date: Tue, 17 Sep 2013 09:10:40 -0400 Message-ID: References: <20E00C7675E64356BF2F0B2A7E0ABDB1@us.oracle.com> <5232D333.8030206@thompsonclan.org> <523359CD.2070904@thompsonclan.org> <5233670E.4030703@thompsonclan.org> <5237C9FF.1000809@thompsonclan.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1379423482 18306 80.91.229.3 (17 Sep 2013 13:11:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Sep 2013 13:11:22 +0000 (UTC) Cc: 3984@debbugs.gnu.org To: Ryan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 17 15:11:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VLv3r-0003rf-8m for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Sep 2013 15:11:23 +0200 Original-Received: from localhost ([::1]:41038 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLv3q-0008F9-Nn for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Sep 2013 09:11:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLv3f-0008Co-So for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 09:11:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VLv3X-00059R-PN for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 09:11:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VLv3X-00059H-Ln for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 09:11:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VLv3W-0004bV-TP for bug-gnu-emacs@gnu.org; Tue, 17 Sep 2013 09:11:03 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 3984-submit@debbugs.gnu.org id=B3984.137942345017677 (code B ref 3984); Tue, 17 Sep 2013 13:11:02 +0000 Original-Received: (at 3984) by debbugs.gnu.org; 17 Sep 2013 13:10:50 +0000 Original-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 Original-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" Original-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 Original-Received: by pastel.home (Postfix, from userid 20848) id E0DB061DC3; Tue, 17 Sep 2013 09:10:40 -0400 (EDT) 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) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78484 Archived-At: > 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