X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Alan Mackenzie <acm@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Nov 2023 16:40:01 +0000 Resent-Message-ID: <handler.66991.B.169937519425594 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 66991 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.169937519425594 (code B ref -1); Tue, 07 Nov 2023 16:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Nov 2023 16:39:54 +0000 Received: from localhost ([127.0.0.1]:43173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0P7K-0006ek-8G for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 11:39:54 -0500 Received: from lists.gnu.org ([2001:470:142::17]:57658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1r0P7I-0006eU-GQ for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 11:39:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <acm@HIDDEN>) id 1r0P6b-0000K6-6P for bug-gnu-emacs@HIDDEN; Tue, 07 Nov 2023 11:39:09 -0500 Received: from mail.muc.de ([193.149.48.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <acm@HIDDEN>) id 1r0P6Z-0001dL-A1 for bug-gnu-emacs@HIDDEN; Tue, 07 Nov 2023 11:39:08 -0500 Received: (qmail 75293 invoked by uid 3782); 7 Nov 2023 17:38:52 +0100 Received: from acm.muc.de (p4fe15714.dip0.t-ipconnect.de [79.225.87.20]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Nov 2023 17:38:51 +0100 Received: (qmail 29294 invoked by uid 1000); 7 Nov 2023 16:38:51 -0000 Date: Tue, 7 Nov 2023 16:38:51 +0000 Message-ID: <ZUpoGwHli-EqtLk8@ACM> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie <acm@HIDDEN> X-Primary-Address: acm@HIDDEN Received-SPF: pass client-ip=193.149.48.3; envelope-from=acm@HIDDEN; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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.1 (/) Hello, Emacs Consider commands with no arguments, and do interactive-form on them: (interactive-form 'x-print-frames-dialog) => (interactive "") # a primitive (interactive-form 'universal-argument) => (interactive nil) # a native compiled command. The result is the same from a byte compiled command. Write (defun foo () (interactive)) in *scratch*, and C-M-x to evaluate it: (interactive-form 'foo) => (interactive). That's three different inconsistent ways of expressing "(interactive". This is a bug. For consistency's sake, two of them must be incorrect. I believe the correct one is the last of these, "(interactive)" which is after all, what appears in the Lisp sources. The fix should be relatively simple, in Finteractive_form in src/data.c -- Alan Mackenzie (Nuremberg, Germany).
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Alan Mackenzie <acm@HIDDEN> Subject: bug#66991: Acknowledgement (Confusion in interactive-form with commands with bare interactive forms.) Message-ID: <handler.66991.B.169937519425594.ack <at> debbugs.gnu.org> References: <ZUpoGwHli-EqtLk8@ACM> X-Gnu-PR-Message: ack 66991 X-Gnu-PR-Package: emacs Reply-To: 66991 <at> debbugs.gnu.org Date: Tue, 07 Nov 2023 16:40:01 +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 66991 <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 66991: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D66991 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Nov 2023 16:51:01 +0000 Resent-Message-ID: <handler.66991.B66991.169937584626655 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie <acm@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 66991 <at> debbugs.gnu.org Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.169937584626655 (code B ref 66991); Tue, 07 Nov 2023 16:51:01 +0000 Received: (at 66991) by debbugs.gnu.org; 7 Nov 2023 16:50:46 +0000 Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0PHq-0006vq-FB for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 11:50:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1r0PHo-0006ve-VJ for 66991 <at> debbugs.gnu.org; Tue, 07 Nov 2023 11:50:45 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1r0PH5-0003kC-Ud; Tue, 07 Nov 2023 11:49:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=LiYBFVLkUxwid8kqiyP1z35Hiq9MlV33ddS8yS1c3s0=; b=mURNWN7YkMy0 xHpaKpjGQr2ZzRO7CQb7NJqM+1aV3tC+hdDdS6Uc77wRwQUiq/s+3/n4VT0dFZoGKgLvJ6E6ZqJgG BwJKOzeWCnyBAhoozi2MVAo0AlsqHfeopl2JnzBxugOY+XcYVFPBPQH/iv2GDZESBnVfUN52Uv8o8 WesKN45WmA/K9fEdr5er8oGequ28X7UCdDv7mYAQa9OwReRopK7MFAzkVzb5RBuR35i3P2nME0dLJ Vl+6ba9UcagcSWFprQHY5btL1Qs3HiUEKTQCybOz6vVOb8u/ZanNN2mcrYEUV+wvHCu1nHZEvYum3 Qm6Yw2JKJGykONnYcCuTpQ==; Date: Tue, 07 Nov 2023 18:49:38 +0200 Message-Id: <83wmut1pb1.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <ZUpoGwHli-EqtLk8@ACM> (message from Alan Mackenzie on Tue, 7 Nov 2023 16:38:51 +0000) References: <ZUpoGwHli-EqtLk8@ACM> X-Spam-Score: -2.3 (--) 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: -3.3 (---) > Date: Tue, 7 Nov 2023 16:38:51 +0000 > From: Alan Mackenzie <acm@HIDDEN> > > Consider commands with no arguments, and do interactive-form on them: > > (interactive-form 'x-print-frames-dialog) => (interactive "") # a primitive > > (interactive-form 'universal-argument) => (interactive nil) # a native > compiled command. > The result is the same from a byte compiled command. > > Write (defun foo () (interactive)) in *scratch*, and C-M-x to evaluate > it: > (interactive-form 'foo) => (interactive). > > That's three different inconsistent ways of expressing "(interactive". > This is a bug. For consistency's sake, two of them must be incorrect. Why? Please explain in more positive terms why two out of three must be bugs, not just in some abstract philosophical terms. > I believe the correct one is the last of these, "(interactive)" which is > after all, what appears in the Lisp sources. The fix should be > relatively simple, in Finteractive_form in src/data.c Please wait with implementing a fix until we discuss the issue and decide whether and how it should be fixed. Adding Stefan to the discussion.
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Alan Mackenzie <acm@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Nov 2023 17:11:02 +0000 Resent-Message-ID: <handler.66991.B66991.169937704928539 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: acm@HIDDEN, 66991 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.169937704928539 (code B ref 66991); Tue, 07 Nov 2023 17:11:02 +0000 Received: (at 66991) by debbugs.gnu.org; 7 Nov 2023 17:10:49 +0000 Received: from localhost ([127.0.0.1]:43207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0PbF-0007QF-36 for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:10:49 -0500 Received: from mail.muc.de ([193.149.48.3]:33553) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1r0PbD-0007Pv-5Q for 66991 <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:10:47 -0500 Received: (qmail 11173 invoked by uid 3782); 7 Nov 2023 18:10:02 +0100 Received: from acm.muc.de (p4fe15714.dip0.t-ipconnect.de [79.225.87.20]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Nov 2023 18:10:02 +0100 Received: (qmail 17219 invoked by uid 1000); 7 Nov 2023 17:10:02 -0000 Date: Tue, 7 Nov 2023 17:10:02 +0000 Message-ID: <ZUpvapul64hc0svD@ACM> References: <ZUpoGwHli-EqtLk8@ACM> <83wmut1pb1.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83wmut1pb1.fsf@HIDDEN> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie <acm@HIDDEN> X-Primary-Address: acm@HIDDEN X-Spam-Score: -0.0 (/) 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 (-) Hello, Eli. On Tue, Nov 07, 2023 at 18:49:38 +0200, Eli Zaretskii wrote: > > Date: Tue, 7 Nov 2023 16:38:51 +0000 > > From: Alan Mackenzie <acm@HIDDEN> > > Consider commands with no arguments, and do interactive-form on them: > > (interactive-form 'x-print-frames-dialog) => (interactive "") # a primitive > > (interactive-form 'universal-argument) => (interactive nil) # a native > > compiled command. > > The result is the same from a byte compiled command. > > Write (defun foo () (interactive)) in *scratch*, and C-M-x to evaluate > > it: > > (interactive-form 'foo) => (interactive). > > That's three different inconsistent ways of expressing "(interactive". > > This is a bug. For consistency's sake, two of them must be incorrect. > Why? Please explain in more positive terms why two out of three must > be bugs, not just in some abstract philosophical terms. I get a failure in /test/src/comp-tests.log in test comp-tests-interactive-form, where the test is expecting (interactive) but the result of running the test innards is (interactive nil) .. I don't understand why I'm only seeing this test failure now. Maybe it's a new test. Also, I think consistency in this sort of thing is a Good Thing. > > I believe the correct one is the last of these, "(interactive)" which is > > after all, what appears in the Lisp sources. The fix should be > > relatively simple, in Finteractive_form in src/data.c > Please wait with implementing a fix until we discuss the issue and > decide whether and how it should be fixed. OK. :-) But I think fixing data.c will be easier and cleaner than fixing all the tests which might test it. > Adding Stefan to the discussion. -- Alan Mackenzie (Nuremberg, Germany).
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Nov 2023 17:33:01 +0000 Resent-Message-ID: <handler.66991.B66991.169937838030763 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN> Cc: Alan Mackenzie <acm@HIDDEN>, 66991 <at> debbugs.gnu.org Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.169937838030763 (code B ref 66991); Tue, 07 Nov 2023 17:33:01 +0000 Received: (at 66991) by debbugs.gnu.org; 7 Nov 2023 17:33:00 +0000 Received: from localhost ([127.0.0.1]:43241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0Pwi-000806-2C for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:33:00 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33883) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1r0Pwg-0007zs-1s for 66991 <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:32:58 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 94150807BC; Tue, 7 Nov 2023 12:32:14 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699378333; bh=SJmHpl8vlTmOGmkgbCDs3kIVwPqDMt5+ZeK+70c/pOc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=KUETtGKrKClGKJK2Uwf6OZdreK/4fcxd20E/BGq3e0n8EZQmqAkyAkdSUd7rw+UCZ PwdBK3dgxQE6vZg8+cqmnkMPxdZPJTNS8+0MY/cqJuV1d9H027S0g0IfO8CUvaa8fc PogDtjMEIu/BWsyw8upbuyyLSubCrmJ0FCxgA1Z3K0iZcHYVnSYIzsloYneBZNxZuL 0Bp7YAQav3fPS2Ig65wDkI8SAt2eyepn4DGC/quhPnjCOc47IPAvk+V+CsDHCTgD49 MxQhsvnz4KKgh4YSQj553kbHufaEHT+oRG8Bc0LlrleAOGJPjYhf1lXv0n76dysIeU nMnGxSr/GOb/A== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C104B80506; Tue, 7 Nov 2023 12:32:13 -0500 (EST) Received: from pastel (unknown [45.72.212.125]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97B491203D6; Tue, 7 Nov 2023 12:32:13 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <83wmut1pb1.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 07 Nov 2023 18:49:38 +0200") Message-ID: <jwvbkc532wm.fsf-monnier+emacs@HIDDEN> References: <ZUpoGwHli-EqtLk8@ACM> <83wmut1pb1.fsf@HIDDEN> Date: Tue, 07 Nov 2023 12:32:12 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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: -3.3 (---) >> (interactive-form 'x-print-frames-dialog) => (interactive "") # a primitive >> >> (interactive-form 'universal-argument) => (interactive nil) # a native >> compiled command. Both seem acceptable: the form can be either a string interpreted internally by `call-interactively` or an expression whose value will be the list of arguments. It so happens that the interpretation of "" results in an empty list of args, just like nil. There might be commands out there which use alternative ways to express such an empty list, such as (interactive 'nil) [ Presumably as a result of macro expansion of something like ...(interactive ',args)... ] or (interactive (< 4 3)) [ Presumably the result of a prank or some such :-) ] Where/why do you need the representation to be more ... canonical? >> The result is the same from a byte compiled command. >> >> Write (defun foo () (interactive)) in *scratch*, and C-M-x to evaluate >> it: >> (interactive-form 'foo) => (interactive). For non-compiled functions, we just use `assq` on the body. It's arguably not 100% correct, but it gets the job done cheaply. It usually doesn't matter because `cadr` on this result is still nil. >> That's three different inconsistent ways of expressing "(interactive". Different, yes, but I don't see what's inconsistent about it, except maybe for the fact that `interactive-form` can change from `(interactive)` for an interpreted function to `(interactive nil)` for the same function once it's byte-compiled, but note that `(interactive EXP)` will generally change once byte-compiled because EXP gets byte-compiled as well, so you generally can't presume that `interactive-form` returns the exact same data-structure before and after byte-compilation: the two should be "equivalent" but not necessarily identical. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 07 Nov 2023 17:40:02 +0000 Resent-Message-ID: <handler.66991.B66991.169937876131310 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie <acm@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 66991 <at> debbugs.gnu.org Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.169937876131310 (code B ref 66991); Tue, 07 Nov 2023 17:40:02 +0000 Received: (at 66991) by debbugs.gnu.org; 7 Nov 2023 17:39:21 +0000 Received: from localhost ([127.0.0.1]:43246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0Q2q-00088v-U7 for submit <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:39:21 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:60362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1r0Q2p-00088j-UB for 66991 <at> debbugs.gnu.org; Tue, 07 Nov 2023 12:39:20 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 73B41100068; Tue, 7 Nov 2023 12:38:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699378715; bh=I9YeG85aDn4vEv95ushI+2NLDCHaFXJ3ZkrybzBae0w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=OewiGbdvn/s2SJHtMguLa3dyOBrsh9RtnU6j0oJH3pEMkUIoKD80VqA0YcNkC7Cmt qBeacIdUafAiG3jwuZqO7r/a9EPf+dT+3ykd2GdYddohKOzV/zpFdC5VdFnuRrNLJL T4FB3PhSmJZEJYEyOKf40tp+CMijP2cLw8Qao/O8JEpqPlmc+cPR9gH6r2pQzWSv3Z ST+nKsGwIjuAV70KlkU++QWsfvca/EeOJtpLh/AFdSfEdmNYOTKbDM6uWLvvzvbmTO 6uWB8VMOV60a9/NjX3rNPfwbkJscEmy+kETaijQyhV0l3pFeCCJhqNbR11ukZbKtOB BZdt3k17tY7Hg== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BD0CC100033; Tue, 7 Nov 2023 12:38:35 -0500 (EST) Received: from pastel (unknown [45.72.212.125]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 91E76120313; Tue, 7 Nov 2023 12:38:35 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <ZUpvapul64hc0svD@ACM> (Alan Mackenzie's message of "Tue, 7 Nov 2023 17:10:02 +0000") Message-ID: <jwv5y2d31u6.fsf-monnier+emacs@HIDDEN> References: <ZUpoGwHli-EqtLk8@ACM> <83wmut1pb1.fsf@HIDDEN> <ZUpvapul64hc0svD@ACM> Date: Tue, 07 Nov 2023 12:38:34 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.138 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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: -3.3 (---) > I get a failure in /test/src/comp-tests.log in test > comp-tests-interactive-form, where the test is expecting > > (interactive) > > but the result of running the test innards is > > (interactive nil) I'd argue the test should accept either form. > .. I don't understand why I'm only seeing this test failure now. Indeed, it's odd. > Maybe it's a new test. `git log test/lisp/emacs-lisp/comp-tests.el` suggests there's been no activity there of late. > OK. :-) But I think fixing data.c will be easier and cleaner than > fixing all the tests which might test it. I wouldn't call it a fix because I don't think the current behavior is broken, but I see no problem with `interactive-form` replacing `(interactive)` for `(interactive nil)` when it can do so cheaply. It may break other (broken) tests, of course. Stefan
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Alan Mackenzie <acm@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 08 Nov 2023 08:58:02 +0000 Resent-Message-ID: <handler.66991.B66991.16994338518743 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier <monnier@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 66991 <at> debbugs.gnu.org Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.16994338518743 (code B ref 66991); Wed, 08 Nov 2023 08:58:02 +0000 Received: (at 66991) by debbugs.gnu.org; 8 Nov 2023 08:57:31 +0000 Received: from localhost ([127.0.0.1]:43986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0eNO-0002Gw-P8 for submit <at> debbugs.gnu.org; Wed, 08 Nov 2023 03:57:31 -0500 Received: from mail.muc.de ([193.149.48.3]:60935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <acm@HIDDEN>) id 1r0eNM-0002Ge-6Y for 66991 <at> debbugs.gnu.org; Wed, 08 Nov 2023 03:57:28 -0500 Received: (qmail 91342 invoked by uid 3782); 8 Nov 2023 09:56:43 +0100 Received: from acm.muc.de (p4fe1584b.dip0.t-ipconnect.de [79.225.88.75]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 08 Nov 2023 09:56:42 +0100 Received: (qmail 21734 invoked by uid 1000); 8 Nov 2023 08:56:42 -0000 Date: Wed, 8 Nov 2023 08:56:42 +0000 Message-ID: <ZUtNSpB2H4pGcArQ@ACM> References: <ZUpoGwHli-EqtLk8@ACM> <83wmut1pb1.fsf@HIDDEN> <ZUpvapul64hc0svD@ACM> <jwv5y2d31u6.fsf-monnier+emacs@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <jwv5y2d31u6.fsf-monnier+emacs@HIDDEN> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie <acm@HIDDEN> X-Primary-Address: acm@HIDDEN X-Spam-Score: -0.0 (/) 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 (-) Hello, Stefan. On Tue, Nov 07, 2023 at 12:38:34 -0500, Stefan Monnier wrote: > > I get a failure in /test/src/comp-tests.log in test > > comp-tests-interactive-form, where the test is expecting > > (interactive) > > but the result of running the test innards is > > (interactive nil) > I'd argue the test should accept either form. > > .. I don't understand why I'm only seeing this test failure now. > Indeed, it's odd. > > Maybe it's a new test. > `git log test/lisp/emacs-lisp/comp-tests.el` suggests there's been no > activity there of late. > > OK. :-) But I think fixing data.c will be easier and cleaner than > > fixing all the tests which might test it. > I wouldn't call it a fix because I don't think the current behavior is > broken, but I see no problem with `interactive-form` replacing > `(interactive)` for `(interactive nil)` when it can do so cheaply. > It may break other (broken) tests, of course. What about replacing (interactive "") with (interactive) too, and documenting this? The doc string says that "Return the interactive form of CMD, or nil ....". But you seem to be arguing that there is no unique _THE_ interactive form. Just three possibilities for _AN_ interactive form. The doc string doesn't make this clear, and needs amending anyway. To fix only the doc string rather than the code too, would double the doc string's size. > Stefan -- Alan Mackenzie (Nuremberg, Germany).
X-Loop: help-debbugs@HIDDEN Subject: bug#66991: Confusion in interactive-form with commands with bare interactive forms. Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Wed, 08 Nov 2023 12:30:02 +0000 Resent-Message-ID: <handler.66991.B66991.16994466008830 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 66991 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Mackenzie <acm@HIDDEN> Cc: Eli Zaretskii <eliz@HIDDEN>, 66991 <at> debbugs.gnu.org Received: via spool by 66991-submit <at> debbugs.gnu.org id=B66991.16994466008830 (code B ref 66991); Wed, 08 Nov 2023 12:30:02 +0000 Received: (at 66991) by debbugs.gnu.org; 8 Nov 2023 12:30:00 +0000 Received: from localhost ([127.0.0.1]:44156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1r0hh2-0002IM-GX for submit <at> debbugs.gnu.org; Wed, 08 Nov 2023 07:30:00 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1r0hgy-0002I5-Ms for 66991 <at> debbugs.gnu.org; Wed, 08 Nov 2023 07:29:59 -0500 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 70CF4806F7; Wed, 8 Nov 2023 07:29:12 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699446551; bh=ViZhMwYk9V01vw+Au0xPU5WFpDurkxUY73HaCLBfKS8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=TkAllSzwcEDzFoXwJtuEqEkmM76tSbE9IpiNbOLy1QNoCFVQ/3yd7ezcgizuNhJ+r tPNuESU0HXapxC9LGSti9C4bwowjsGOX+qruXiUTeWhP8jKNWe8jAGgv3Swoy47yJ4 xLLa4pdHMxYMKKFZ27dHFrSUHnWnbO8AYEIu5OgHaBF7AeU551CkRq91S124Df6cjZ W8Sp+Q0mIrILkHFYLV6tZvX4ps9jvYBJ86alDyOQT9wjysgCmWJ4J2Wq+7Kx5WMioP TeH67HnskQHaoWnWKCggtiroozv+YlJpBnRgxmqP1KgPgy17LYWRrB7deUrNUPlUDe MLZORy0nxcJ3Q== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id A602B8025F; Wed, 8 Nov 2023 07:29:11 -0500 (EST) Received: from pastel (unknown [45.72.227.120]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7D59C12031F; Wed, 8 Nov 2023 07:29:11 -0500 (EST) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <ZUtNSpB2H4pGcArQ@ACM> (Alan Mackenzie's message of "Wed, 8 Nov 2023 08:56:42 +0000") Message-ID: <jwv1qd01lmy.fsf-monnier+emacs@HIDDEN> References: <ZUpoGwHli-EqtLk8@ACM> <83wmut1pb1.fsf@HIDDEN> <ZUpvapul64hc0svD@ACM> <jwv5y2d31u6.fsf-monnier+emacs@HIDDEN> <ZUtNSpB2H4pGcArQ@ACM> Date: Wed, 08 Nov 2023 07:29:10 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) 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: -3.3 (---) > What about replacing (interactive "") with (interactive) too, and > documenting this? Why? > The doc string says that "Return the interactive form of CMD, or nil > ....". But you seem to be arguing that there is no unique _THE_ > interactive form. The interactive form is either a string or code. When it's a string, I expect you get the one and only `(interactive THE-STRING)`, but when it's not a string ... well ... by definition the compiler changes the representation of code so it's completely expected that you won't get necessarily quite the same code (as long as its execution is equivalent). > The doc string doesn't make this clear, and needs amending anyway. Maybe, but I don't understand why you think it's necessary. > To fix only the doc string rather than the code too, would double the > doc string's size. And this suggests we should also document `symbol-function` to say that it may not return something identical to what you wrote in the source code. Stefan
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.