X-Loop: help-debbugs@HIDDEN Subject: bug#11747: 24.1.50; called-interactively-p vs. advice Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 19 Jun 2012 18:23:01 +0000 Resent-Message-ID: <handler.11747.B.134013015522062 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11747 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Reply-To: michael_heerdegen@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.134013015522062 (code B ref -1); Tue, 19 Jun 2012 18:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2012 18:22:35 +0000 Received: from localhost ([127.0.0.1]:48894 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Sh34V-0005jn-1Q for submit <at> debbugs.gnu.org; Tue, 19 Jun 2012 14:22:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55816) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh34T-0005jg-0V for submit <at> debbugs.gnu.org; Tue, 19 Jun 2012 14:22:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh316-0004Ba-BF for submit <at> debbugs.gnu.org; Tue, 19 Jun 2012 14:19:10 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh316-0004BV-86 for submit <at> debbugs.gnu.org; Tue, 19 Jun 2012 14:19:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41669) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh314-0000SJ-G6 for bug-gnu-emacs@HIDDEN; Tue, 19 Jun 2012 14:19:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh312-0004Az-A0 for bug-gnu-emacs@HIDDEN; Tue, 19 Jun 2012 14:19:01 -0400 Received: from mout.web.de ([212.227.17.12]:59163) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <michael_heerdegen@HIDDEN>) id 1Sh312-0004As-09 for bug-gnu-emacs@HIDDEN; Tue, 19 Jun 2012 14:19:00 -0400 Received: from snow.dragon ([82.113.99.105]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0Lpezi-1SDmT91Z4Q-00fYEa for <bug-gnu-emacs@HIDDEN>; Tue, 19 Jun 2012 20:18:58 +0200 Date: Tue, 19 Jun 2012 20:21:06 +0200 Message-Id: <87lijj9n8t.fsf@HIDDEN> From: Michael Heerdegen <michael_heerdegen@HIDDEN> X-Provags-ID: V02:K0:uT8s2Po6ULppcku91mAE4KEVlFefLtQgs4MuaCXe5EU xxnoPwASYZ6yUHFkmE4dLIrknfrfCjQnWGuL4eG3+9NyKFg4yx ncOg9/IpZ09C+pXVNSdJieUWrKJCR4/GlLSrZbWgaNbzy7FVHH c3y67qnyXcg/Ah+M1ncqsRG1Cj5GcsR3TeseP4nGnYuinDqD38 Mp6INY+CAz8aE+ybNQoavqBrB1mtMaxjS2fddPWH8A= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi, `called-interactively-p' returns wrong values when called inside commands that are adviced. Example: (defun interactive-test () (interactive) (message "Called %sinteractively" (if (called-interactively-p 'any) "" "non-"))) M-x interactive-test ==> Called interactively M-: (interactive-test) ==> Called non-interactively Now eval e.g. this: (defadvice interactive-test (before foo activate) (sleep-for 1)) Then: M-x interactive-test ==> Called non-interactively This is quite surprising, and may cause surprising effects if the user decides to advice such a command. I found nothing in the doc about his behavior. If this is not a bug, maybe explain this behavior somewhere. This last paragraph in the docstring of `called-interactively-p' seems somewhat (but not directly) related: | 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? Thanks, Michael. In GNU Emacs 24.1.50.1 (i486-pc-linux-gnu, GTK+ Version 3.4.2) of 2012-06-15 on zelenka, modified by Debian (emacs-snapshot package, version 2:20120615-1) Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--build' 'i486-linux-gnu' '--host' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.1.50/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.1.50/site-lisp:/usr/share/emacs/site-lisp' '--without-compress-info' '--with-crt-dir=/usr/lib/i386-linux-gnu/' '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2' 'LDFLAGS=-g -Wl,--as-needed -znocombreloc' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'' Important settings: value of $LC_ALL: de_DE.utf8 value of $LC_TIME: C value of $LANG: de_DE.utf8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: michael_heerdegen@HIDDEN Subject: bug#11747: Acknowledgement (24.1.50; called-interactively-p vs. advice) Message-ID: <handler.11747.B.134013015522062.ack <at> debbugs.gnu.org> References: <87lijj9n8t.fsf@HIDDEN> X-Gnu-PR-Message: ack 11747 X-Gnu-PR-Package: emacs Reply-To: 11747 <at> debbugs.gnu.org Date: Tue, 19 Jun 2012 18:23:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 11747 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 11747: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11747 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#11747: 24.1.50; called-interactively-p vs. advice Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 25 Jun 2012 01:19:02 +0000 Resent-Message-ID: <handler.11747.B11747.13405871321628 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: michael_heerdegen@HIDDEN Cc: 11747 <at> debbugs.gnu.org Received: via spool by 11747-submit <at> debbugs.gnu.org id=B11747.13405871321628 (code B ref 11747); Mon, 25 Jun 2012 01:19:02 +0000 Received: (at 11747) by debbugs.gnu.org; 25 Jun 2012 01:18:52 +0000 Received: from localhost ([127.0.0.1]:55724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1Sixx5-0000QD-KU for submit <at> debbugs.gnu.org; Sun, 24 Jun 2012 21:18:52 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:53285) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1Sixx3-0000Q4-FO for 11747 <at> debbugs.gnu.org; Sun, 24 Jun 2012 21:18:50 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SixtI-0001gQ-2E; Sun, 24 Jun 2012 21:14:56 -0400 From: Glenn Morris <rgm@HIDDEN> References: <87lijj9n8t.fsf@HIDDEN> X-Spook: 2600 Magazine Janet Reno brigand Consul 9/11 Mossad X-Ran: jSd%2E>~7[]Mq#f"%@gWD2Rj$v>m5$FNX44:g;\#LB?y#O#rkzqWasx~p0Rc)}2ex|vEHw X-Hue: blue X-Attribution: GM Date: Sun, 24 Jun 2012 21:14:55 -0400 In-Reply-To: <87lijj9n8t.fsf@HIDDEN> (Michael Heerdegen's message of "Tue, 19 Jun 2012 20:21:06 +0200") Message-ID: <bi395kp4z4.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Michael Heerdegen wrote: > `called-interactively-p' returns wrong values when called inside > commands that are adviced. Old "interactive-p" had the same issue, though maybe that mattered less. It's to do with the way advice is implemented. It actually goes out of its way to avoid using call-interactively unless it has to (subrs). See comments in advice.el header.
X-Loop: help-debbugs@HIDDEN Subject: bug#11747: 24.1.50; called-interactively-p vs. advice Resent-From: Michael Heerdegen <michael_heerdegen@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 25 Jun 2012 17:57:01 +0000 Resent-Message-ID: <handler.11747.B11747.13406469745203 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris <rgm@HIDDEN> Cc: 11747 <at> debbugs.gnu.org Received: via spool by 11747-submit <at> debbugs.gnu.org id=B11747.13406469745203 (code B ref 11747); Mon, 25 Jun 2012 17:57:01 +0000 Received: (at 11747) by debbugs.gnu.org; 25 Jun 2012 17:56:14 +0000 Received: from localhost ([127.0.0.1]:57530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SjDWH-0001Ls-TC for submit <at> debbugs.gnu.org; Mon, 25 Jun 2012 13:56:14 -0400 Received: from mout.web.de ([212.227.17.12]:59893) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <michael_heerdegen@HIDDEN>) id 1SjDWF-0001Lk-Vu for 11747 <at> debbugs.gnu.org; Mon, 25 Jun 2012 13:56:12 -0400 Received: from snow.dragon ([89.204.138.131]) by smtp.web.de (mrweb003) with ESMTPSA (Nemesis) id 0MC1ho-1SaNli2rI0-009cJi; Mon, 25 Jun 2012 19:52:11 +0200 From: Michael Heerdegen <michael_heerdegen@HIDDEN> References: <87lijj9n8t.fsf@HIDDEN> <bi395kp4z4.fsf@HIDDEN> Date: Mon, 25 Jun 2012 19:54:21 +0200 In-Reply-To: <bi395kp4z4.fsf@HIDDEN> (Glenn Morris's message of "Sun, 24 Jun 2012 21:14:55 -0400") Message-ID: <87zk7r5lbm.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V02:K0:nGcEMKWcd2sOLzQOJds9kpnIuSeiwNF3oIYlUPwEadc FSefCwvlhQzEgl56XuHcqDGyMSISF2YAyE9TQMb+D0VxXRlfux vWfnqFWHjTUJVlNY7Tt4Fb/J7AMOdKYrwmwAaLKbeghLp17W6Q ttsErEA3xU0tcqrYJ3q5KPUHwbM5zJ8dNo+BDTW4kiC2FZrzrr HxZQlM94eJTargNbiw7+w7+fsYOoBw51AT9HsSieCI= X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -1.1 (-) Glenn Morris <rgm@HIDDEN> writes: > > `called-interactively-p' returns wrong values when called inside > > commands that are adviced. > > Old "interactive-p" had the same issue, though maybe that mattered less. > It's to do with the way advice is implemented. It actually goes out of > its way to avoid using call-interactively unless it has to (subrs). > See comments in advice.el header. So, do you mean this can't be fixed? Too bad, but ok, that's what I thought. But then, we IMHO should improve the docstring of `called-interactively': 1. This sentence: This function is meant for implementing advice and other function-modifying features. Is there a "not" missing? 2. Explicitly say that `called-interactively' will not work when used in an adviced function. This is something completely different than 1. 1. is about implementing advice via `called-interactively'. 2. says that if you advice any function that already uses it, it will stop working. So, my wish is to improve the docstring of `called-interactively' a bit. Then, this report can be closed. Michael.
X-Loop: help-debbugs@HIDDEN Subject: bug#11747: 24.1.50; called-interactively-p vs. advice Resent-From: Glenn Morris <rgm@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 25 Jun 2012 23:45:01 +0000 Resent-Message-ID: <handler.11747.B11747.13406678652393 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Michael Heerdegen <michael_heerdegen@HIDDEN> Cc: 11747 <at> debbugs.gnu.org Received: via spool by 11747-submit <at> debbugs.gnu.org id=B11747.13406678652393 (code B ref 11747); Mon, 25 Jun 2012 23:45:01 +0000 Received: (at 11747) by debbugs.gnu.org; 25 Jun 2012 23:44:25 +0000 Received: from localhost ([127.0.0.1]:57815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1SjIxE-0000cX-VM for submit <at> debbugs.gnu.org; Mon, 25 Jun 2012 19:44:25 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:45946) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1SjIx1-0000cF-7F for 11747 <at> debbugs.gnu.org; Mon, 25 Jun 2012 19:44:23 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1SjItA-00019j-9h; Mon, 25 Jun 2012 19:40:12 -0400 From: Glenn Morris <rgm@HIDDEN> References: <87lijj9n8t.fsf@HIDDEN> <bi395kp4z4.fsf@HIDDEN> <87zk7r5lbm.fsf@HIDDEN> X-Spook: North Korea bank smuggle SAFE Noriega ASIO STARLAN AMEMB X-Ran: x,t<1-q;%=oq<2aD*Uwg*JYfap1Whtw(g!Oh\Uxs@-H|L\,FBT0LQ#>&[0u5!fW!SkqO:n X-Hue: white X-Attribution: GM Date: Mon, 25 Jun 2012 19:40:12 -0400 In-Reply-To: <87zk7r5lbm.fsf@HIDDEN> (Michael Heerdegen's message of "Mon, 25 Jun 2012 19:54:21 +0200") Message-ID: <o51ul3c65f.fsf@HIDDEN> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -6.9 (------) Michael Heerdegen wrote: > So, do you mean this can't be fixed? No, just that I personally don't see how to fix it. Hopefully someone else does. > This function is meant for implementing advice and other > function-modifying features. > > Is there a "not" missing? I'm not sure. I cannot tell what the sentence is supposed to mean under either reading. I think it could just as well be removed. > 2. Explicitly say that `called-interactively' will not work when used > in an adviced function. Sure, if no-one fixes it.
Received: (at control) by debbugs.gnu.org; 8 Feb 2013 20:48:53 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 08 15:48:53 2013 Received: from localhost ([127.0.0.1]:44763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1U3usO-0001qq-VZ for submit <at> debbugs.gnu.org; Fri, 08 Feb 2013 15:48:53 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55709) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <rgm@HIDDEN>) id 1U3usN-0001qk-EE for control <at> debbugs.gnu.org; Fri, 08 Feb 2013 15:48:51 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from <rgm@HIDDEN>) id 1U3usI-00084r-H6 for control <at> debbugs.gnu.org; Fri, 08 Feb 2013 15:48:46 -0500 Date: Fri, 08 Feb 2013 15:48:46 -0500 Message-Id: <E1U3usI-00084r-H6@HIDDEN> Subject: control message for bug 13656 To: <control <at> debbugs.gnu.org> X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris <rgm@HIDDEN> X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -4.2 (----) merge 11747 13656
X-Loop: help-debbugs@HIDDEN Subject: bug#11747: 24.1.50; called-interactively-p vs. advice Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Fri, 08 Feb 2013 22:42:01 +0000 Resent-Message-ID: <handler.11747.B11747.136036332025365 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 11747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Michael Heerdegen <michael_heerdegen@HIDDEN> Cc: 11747 <at> debbugs.gnu.org Received: via spool by 11747-submit <at> debbugs.gnu.org id=B11747.136036332025365 (code B ref 11747); Fri, 08 Feb 2013 22:42:01 +0000 Received: (at 11747) by debbugs.gnu.org; 8 Feb 2013 22:42:00 +0000 Received: from localhost ([127.0.0.1]:44880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1U3wds-0006b4-4R for submit <at> debbugs.gnu.org; Fri, 08 Feb 2013 17:42:00 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:35858) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from <monnier@HIDDEN>) id 1U3wdq-0006ax-Gy for 11747 <at> 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" 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 Received: by pastel.home (Postfix, from userid 20848) id 2DCBE5919F; Fri, 8 Feb 2013 17:41:51 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> Message-ID: <jwvsj565t2k.fsf-monnier+bug#11747@HIDDEN> References: <87lijj9n8t.fsf@HIDDEN> Date: Fri, 08 Feb 2013 17:41:50 -0500 In-Reply-To: <87lijj9n8t.fsf@HIDDEN> (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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Sender: debbugs-submit-bounces <at> debbugs.gnu.org Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org X-Spam-Score: -0.0 (/) > | 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
Received: (at control) by debbugs.gnu.org; 21 Apr 2017 20:47:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 21 16:47:08 2017 Received: from localhost ([127.0.0.1]:32974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1d1fSO-0007Ms-Pf for submit <at> debbugs.gnu.org; Fri, 21 Apr 2017 16:47:08 -0400 Received: from mail-oi0-f42.google.com ([209.85.218.42]:36309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <npostavs@HIDDEN>) id 1d1fSN-0007MQ-55 for control <at> debbugs.gnu.org; Fri, 21 Apr 2017 16:47:07 -0400 Received: by mail-oi0-f42.google.com with SMTP id s131so25279873oia.3 for <control <at> debbugs.gnu.org>; Fri, 21 Apr 2017 13:47:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=jEYPT0OSNnVWs6EOQegRr8cLCjncXys8FbC5GB9I+wA=; b=hf2IprOIlF6DR6oT+jCy1nDUDeF3HJ1oW21d3r1wP4YBwlsYUic5y8CEBkqK+8Eb+O LmujMkTdKwObznUT6+udQToaXXokub+dICxb13326IcLqbrWMgnU2vnXjW4tXx0xdSZc 8LigKm1f1An45e6WgxsxTqrstbgMSV4lguK/rkE2NKaTOFAkBUDNocf69pYYMF8jMomz bJVR7aPG/gHJHhFNE0hN1WuYwB7NNdZHcvrv4h71hLPkCf+/byUv0L8iCOBimUhq/Kl7 yavmdBKJPu8RT4TLdjAamImAHG/cIcc0WrIZHc1eIE5t0GO8nAXDMGtzfr4dREaDBtoR AGfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=jEYPT0OSNnVWs6EOQegRr8cLCjncXys8FbC5GB9I+wA=; b=lVZDuIyvuqPD69BmNFFP9gFdbyTQShuYpFXkIyArPEb9x5IFt3PI1lhNARTjuqxkvn ZvDfDMsSoW0uzFjZBj8TGbpA25caGb8R6Y0Gl+JOvTzLKpsuovgwNigoFdPdDDgknw/H 6I4h2glDmD+87/7hqeUGYTtID82fYP+g5knnmqr2ZgUrz5ash8rn24bmH1S1WI5FxehN c/QbL463JN1emZxA/dGuujS08zOUIVCwNF1A/9bo/vE7bAzKLf3PxyOZn3oRZmGS/jIi x5CUw4/Z52qyykS0LYEcg2ILpIWVsqaJ/txmrWfUVD5Z45f3YNfEEunSXnW/qR/gULCs dc3A== X-Gm-Message-State: AN3rC/5ghX8zIqTzyUTF1fDldRXAO4qor1YFIvNYuQWp+9AHmvFiba+0 foBPkPbg3vq/83uPOHS/erPPkSJCKg== X-Received: by 10.157.36.4 with SMTP id p4mr9821772ota.267.1492807620118; Fri, 21 Apr 2017 13:47:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.9.178 with HTTP; Fri, 21 Apr 2017 13:46:59 -0700 (PDT) From: Noam Postavsky <npostavs@HIDDEN> Date: Fri, 21 Apr 2017 16:46:59 -0400 X-Google-Sender-Auth: pJMS3ccfaVHcmuuNEC3vBU8SCAA Message-ID: <CAM-tV--zWoSzpD4QTM9d=GKs20mHv_ga5dLnZmACAQXo2m9fkQ@HIDDEN> Subject: #15476 24.3; called-interactively-p fails when innermost advice is around advice To: GNU bug tracker automated control server <control <at> debbugs.gnu.org> Content-Type: text/plain; charset=UTF-8 X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.7 (/) # defadvice uses nadvice.el's :around advice internally merge 15476 11747 quit
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.