From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#19066: 25.0.50; nadvice and interactive-form Date: Fri, 28 May 2021 04:11:13 +0200 Message-ID: <87r1hry5dq.fsf@gnus.org> References: <87y4rbtqh6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="426"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 19066@debbugs.gnu.org, Stefan Monnier To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 28 04:12:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmRyr-000AWQ-Qx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 May 2021 04:12:09 +0200 Original-Received: from localhost ([::1]:36222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmRyq-0002U7-Tm for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 May 2021 22:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39430) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmRyk-0002Tv-BB for bug-gnu-emacs@gnu.org; Thu, 27 May 2021 22:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmRyk-0002Xf-3V for bug-gnu-emacs@gnu.org; Thu, 27 May 2021 22:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lmRyj-000351-Vh for bug-gnu-emacs@gnu.org; Thu, 27 May 2021 22:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 May 2021 02:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19066 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 19066-submit@debbugs.gnu.org id=B19066.162216788411793 (code B ref 19066); Fri, 28 May 2021 02:12:01 +0000 Original-Received: (at 19066) by debbugs.gnu.org; 28 May 2021 02:11:24 +0000 Original-Received: from localhost ([127.0.0.1]:53322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmRy8-000349-Dz for submit@debbugs.gnu.org; Thu, 27 May 2021 22:11:24 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:49936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lmRy7-00033w-1y for 19066@debbugs.gnu.org; Thu, 27 May 2021 22:11:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bO6YBW2pAANmvIrYH1nOTNKixj/0WWkZtq+IdZfSmT0=; b=akp1rDF5bm1tw1hC/2eLmXcs20 xpFJ2PKSpr69IyMihM0wcFgTUlX+aZaOpw8DJVwMvFLygB16k5lx6h9FBWBxlyrMjA+1m5+qbUCMk RBbErrEJcaSTtHr9gfOXIgUY+mhhkJMGtgSpLQ6Ie3X/OUs6P1qVFebekTmbn8HH+Pss=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmRxx-0003XC-RX; Fri, 28 May 2021 04:11:16 +0200 X-Now-Playing: The Residents's _The King & Eye: RMX_: "A Fool such as I" In-Reply-To: <87y4rbtqh6.fsf@gmail.com> (Leo Liu's message of "Sun, 16 Nov 2014 18:00:21 +0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207431 Archived-At: Leo Liu writes: > 1. Start emacs and load a file with these lines: > > (advice-add 'just-one-space :before #'change-interactive-form) > (defun change-interactive-form (&optional x y) > (interactive (list 1 1)) > (princ (list x y))) > > M-x just-one-space prints (1 nil) > > 2. Start emacs and load a file with these lines: > > (defun change-interactive-form (&optional x y) > (interactive (list 1 1)) > (princ (list x y))) > (advice-add 'just-one-space :before #'change-interactive-form) > > M-x just-one-space errs: apply: Wrong number of arguments: (0 . 1), 2 So whether this works depends on whether `change-interactive-form' is defined or not when `advice-add' is run? (The only difference here is the order.) Perhaps Stefan has some insights here; added to the CCs. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no