From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Simple defadvice's stopped working (commit daa84a03, Thu Nov 8 23:10:16 2012 -0500) Date: Fri, 16 Nov 2012 09:16:13 -0500 Message-ID: References: <87haoyl4on.fsf@topper.koldfront.dk> <87625bw1jx.fsf@visionobjects.com> <87pq3fxmta.fsf@googlemail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1353075385 3516 80.91.229.3 (16 Nov 2012 14:16:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Nov 2012 14:16:25 +0000 (UTC) Cc: lekktu@gmail.com, asjo@koldfront.dk, ivan.kanis@googlemail.com, emacs-devel@gnu.org To: Katsumi Yamaoka Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 16 15:16:35 2012 Return-path: Envelope-to: ged-emacs-devel@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 1TZMif-0002nw-K0 for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2012 15:16:33 +0100 Original-Received: from localhost ([::1]:46957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZMiV-0000TY-IX for ged-emacs-devel@m.gmane.org; Fri, 16 Nov 2012 09:16:23 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZMiQ-0000RV-GR for emacs-devel@gnu.org; Fri, 16 Nov 2012 09:16:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZMiN-0001rY-BO for emacs-devel@gnu.org; Fri, 16 Nov 2012 09:16:18 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:1679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZMiN-0001rS-7Z for emacs-devel@gnu.org; Fri, 16 Nov 2012 09:16:15 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09sr+ZY/2dsb2JhbABEsEiDSYEIghUBAQQBViMQCzQSFBgNJIgcBboJiwiFPAOIQppxgViDBw X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="207766467" Original-Received: from 108-175-230-88.dsl.teksavvy.com (HELO pastel.home) ([108.175.230.88]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 16 Nov 2012 09:16:14 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id F301158BDA; Fri, 16 Nov 2012 09:16:13 -0500 (EST) In-Reply-To: (Katsumi Yamaoka's message of "Fri, 16 Nov 2012 08:01:29 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:154880 Archived-At: >>> Unfortunately called-interactively-p never returns non-nil while >>> performing an advised command interactively. >> Yes, called-interactively-p (and interactivep, of course) are pretty >> sensitive beasts. The problem you mention was already present before, >> tho it probably got a bit worse (it used to "only" affect uses of >> called-interactively-p in the advised command, whereas it now also >> affects uses in the advice themselves). > Ok. It seems hard to me to fix, so I will live with this way > (for a while?). I have some preliminary code to try and fix it, but it only works in some cases. `called-interactively-p' is also broken in some lexical-binding cases (e.g. using called-interactively-p within a `condition-case' or a `catch'). It is a functionality that is fundamentally problematic. E.g. (to revisit a recent claim that funcall+lambda should be identical to let) if called-interactively-p returns t in (let ((foo bar)) (called-interactively-p)), should it also return t in (funcall (lambda (foo) (called-interactively-p)) bar) ? But if you can point me to concrete examples that need to work (and/or that used to work), it would be very helpful. Stefan