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#11747: 24.1.50; called-interactively-p vs. advice Date: Fri, 08 Feb 2013 17:41:50 -0500 Message-ID: References: <87lijj9n8t.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1360363319 17176 80.91.229.3 (8 Feb 2013 22:41:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 22:41:59 +0000 (UTC) Cc: 11747@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 08 23:42:19 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 1U3weB-0005Cd-KK for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Feb 2013 23:42:19 +0100 Original-Received: from localhost ([::1]:38037 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3wds-0005lW-O0 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Feb 2013 17:42:00 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3wdq-0005kq-2v for bug-gnu-emacs@gnu.org; Fri, 08 Feb 2013 17:41:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U3wdp-0007dT-3T for bug-gnu-emacs@gnu.org; Fri, 08 Feb 2013 17:41:58 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U3wdp-0007dH-0F for bug-gnu-emacs@gnu.org; Fri, 08 Feb 2013 17:41:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U3wdt-0006bI-Qh for bug-gnu-emacs@gnu.org; Fri, 08 Feb 2013 17:42:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Feb 2013 22:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 11747-submit@debbugs.gnu.org id=B11747.136036332025365 (code B ref 11747); Fri, 08 Feb 2013 22:42:01 +0000 Original-Received: (at 11747) by debbugs.gnu.org; 8 Feb 2013 22:42:00 +0000 Original-Received: from localhost ([127.0.0.1]:44880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3wds-0006b4-4R for submit@debbugs.gnu.org; Fri, 08 Feb 2013 17:42:00 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35858) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U3wdq-0006ax-Gy for 11747@debbugs.gnu.org; Fri, 08 Feb 2013 17:41:59 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFpZnt/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDiGGcGYFegxU X-IPAS-Result: Av8EABK/CFFFpZnt/2dsb2JhbABEuzWDWRdzgh8BBVYjEAs0EhQYDSSIJMEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="827958" Original-Received: from 69-165-153-237.dsl.teksavvy.com (HELO pastel.home) ([69.165.153.237]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 08 Feb 2013 17:41:52 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 2DCBE5919F; Fri, 8 Feb 2013 17:41:51 -0500 (EST) In-Reply-To: <87lijj9n8t.fsf@web.de> (Michael Heerdegen's message of "Tue, 19 Jun 2012 20:21:06 +0200") 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.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:70915 Archived-At: > | This function is meant for implementing advice and other > | function-modifying features. Instead of using this, it is sometimes > | cleaner to give your function an extra optional argument whose > | `interactive' spec specifies non-nil unconditionally ("p" is a good > | way to do this), or via (not (or executing-kbd-macro noninteractive)). > It seems a bit confusing - is there a "not" missing in the first > sentence? No, called-interactively-p is indeed specifically useful when writing advice (i.e. for use in the advice itself, not in the function that is advised). For normal functions, it is usually better (and always more reliable) to provide an appropriate argument from the `interactive' spec, but doing that in an advice is a lot more difficult, since it requires modifying the `interactive' spec, which defadvice does not really let you do (it lets you override it with another spec, but not modify the existing spec). Stefan