GNU bug report logs - #19066
25.0.50; nadvice and interactive-form

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Leo Liu <sdl.web@HIDDEN>; Keywords: confirmed; dated Sun, 16 Nov 2014 10:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 19066 <at> debbugs.gnu.org:


Received: (at 19066) by debbugs.gnu.org; 28 May 2021 02:11:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 27 22:11:24 2021
Received: from localhost ([127.0.0.1]:53322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lmRy8-000349-Dz
	for submit <at> debbugs.gnu.org; Thu, 27 May 2021 22:11:24 -0400
Received: from quimby.gnus.org ([95.216.78.240]:49936)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1lmRy7-00033w-1y
 for 19066 <at> 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=;
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 <larsi@HIDDEN>)
 id 1lmRxx-0003XC-RX; Fri, 28 May 2021 04:11:16 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Leo Liu <sdl.web@HIDDEN>
Subject: Re: bug#19066: 25.0.50; nadvice and interactive-form
References: <87y4rbtqh6.fsf@HIDDEN>
X-Now-Playing: The Residents's _The King & Eye: RMX_: "A Fool such as I"
Date: Fri, 28 May 2021 04:11:13 +0200
In-Reply-To: <87y4rbtqh6.fsf@HIDDEN> (Leo Liu's message of "Sun, 16 Nov
 2014 18:00:21 +0800")
Message-ID: <87r1hry5dq.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Leo Liu <sdl.web@HIDDEN> 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))
 > (pri [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 19066
Cc: 19066 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
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: -1.0 (-)

Leo Liu <sdl.web@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#19066; Package emacs. Full text available.
Added tag(s) confirmed. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.
bug Marked as found in versions 25.2. Request was from npostavs@HIDDEN to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Nov 2014 10:01:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Nov 16 05:01:05 2014
Received: from localhost ([127.0.0.1]:34314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Xpwdk-0001dk-Cs
	for submit <at> debbugs.gnu.org; Sun, 16 Nov 2014 05:01:04 -0500
Received: from eggs.gnu.org ([208.118.235.92]:56922)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <sdl.web@HIDDEN>) id 1Xpwdh-0001cz-Gl
 for submit <at> debbugs.gnu.org; Sun, 16 Nov 2014 05:01:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XpwdT-00010r-68
 for submit <at> debbugs.gnu.org; Sun, 16 Nov 2014 05:00:56 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:32927)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XpwdT-00010m-3q
 for submit <at> debbugs.gnu.org; Sun, 16 Nov 2014 05:00:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58626)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XpwdK-00048e-0d
 for bug-gnu-emacs@HIDDEN; Sun, 16 Nov 2014 05:00:46 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XpwdA-000102-Vk
 for bug-gnu-emacs@HIDDEN; Sun, 16 Nov 2014 05:00:37 -0500
Received: from mail-pd0-x231.google.com ([2607:f8b0:400e:c02::231]:46677)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sdl.web@HIDDEN>) id 1XpwdA-0000zt-Nm
 for bug-gnu-emacs@HIDDEN; Sun, 16 Nov 2014 05:00:28 -0500
Received: by mail-pd0-f177.google.com with SMTP id v10so19089502pde.8
 for <bug-gnu-emacs@HIDDEN>; Sun, 16 Nov 2014 02:00:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:date:message-id:mime-version:content-type;
 bh=M8ZKZzUEUHVLU2XzXglKY85WOMI5ugeCboFE3KdLscg=;
 b=rfLZ3pdfiiYMMl+usdFw8ESn3sbFSU4gPHfvM4SsdB+wTk1DXcOp6rty9fscDBbe0a
 AviNx/HmAUOzg2vq8wcJCvQNvXGbDLYUU6lip054ts7fxVT7NpxsOSQAd83Rk+VLJ/VY
 rQuEefEPePYnJkviVHULi8pWgLz6DDIOJXsA5kOZIlBnh6rQ9tbIK9TTkXlL0zf5inT4
 LsQuRbRZqfdlTqJ4+5lHO131yaYXTnL7IcrJQ24/ncTXEFhid3h7OMRWTR8ipK+T9i+3
 UH7SH31iab6hRicstOvcidVPuzMZCHxsphpMTD8dG/N2CGlBx6ngXbdiLQ/misNtCRR/
 2wcA==
X-Received: by 10.66.244.105 with SMTP id xf9mr9287396pac.20.1416132027268;
 Sun, 16 Nov 2014 02:00:27 -0800 (PST)
Received: from fortuna ([221.222.150.252])
 by mx.google.com with ESMTPSA id w5sm32187056pds.25.2014.11.16.02.00.25
 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 16 Nov 2014 02:00:26 -0800 (PST)
From: Leo Liu <sdl.web@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.0.50; nadvice and interactive-form
X-Debbugs-CC: Stefan Monnier <monnier@HIDDEN>
Date: Sun, 16 Nov 2014 18:00:21 +0800
Message-ID: <87y4rbtqh6.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
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>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)


1. Start emacs and load a file with these lines:

--8<---------------cut here---------------start------------->8---
   (advice-add 'just-one-space :before #'change-interactive-form)
   (defun change-interactive-form (&optional x y)
     (interactive (list 1 1))
     (princ (list x y)))
--8<---------------cut here---------------end--------------->8---

M-x just-one-space prints (1 nil)

2. Start emacs and load a file with these lines:

--8<---------------cut here---------------start------------->8---
   (defun change-interactive-form (&optional x y)
     (interactive (list 1 1))
     (princ (list x y)))
   (advice-add 'just-one-space :before #'change-interactive-form)
--8<---------------cut here---------------end--------------->8---

M-x just-one-space errs: apply: Wrong number of arguments: (0 . 1), 2

Leo




Acknowledgement sent to Leo Liu <sdl.web@HIDDEN>:
New bug report received and forwarded. Copy sent to monnier@HIDDEN, bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to monnier@HIDDEN, bug-gnu-emacs@HIDDEN:
bug#19066; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 28 May 2021 02:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.