From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 29 19:35:24 2018 Received: (at submit) by debbugs.gnu.org; 29 Apr 2018 23:35:24 +0000 Received: from localhost ([127.0.0.1]:43266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCvqm-0004Va-5k for submit@debbugs.gnu.org; Sun, 29 Apr 2018 19:35:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCvqj-0004VM-W0 for submit@debbugs.gnu.org; Sun, 29 Apr 2018 19:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCvqd-0004P9-Qz for submit@debbugs.gnu.org; Sun, 29 Apr 2018 19:35:16 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fCvqd-0004P1-No for submit@debbugs.gnu.org; Sun, 29 Apr 2018 19:35:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvqc-0006h5-OY for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:35:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCvqb-0004Oc-SF for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:35:14 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvqb-0004OY-Oe for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:35:13 -0400 Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=33022 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1fCvqb-0004TD-7Y for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:35:13 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <22174.9715.409176.23270@gargle.gargle.HOWL> Date: Sun, 29 Apr 2018 18:34:54 -0500 From: "Roland Winkler" To: bug-gnu-emacs@gnu.org Subject: 26.1; using % escapes in prompt for interactive X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Running the following command interactively in emacs -Q (defun foo-num (n1 n2) "Display numbers N1 and N2." (interactive "nNumber 1: \nnNumber 1: %e, Number 2: ") (message "Number 1: %9.2e, Number 2: %e" n1 n2)) yields the error message Format specifier doesn=3FFFE2=3FFF80=3FFF99t match argument type The problem is the `%e' apearing in the prompt for `interactive'. If this is replaced by a generic `%s' everything works fine. The docstring of `interactive' says that the % escapes can be used as in calls of `format', which sugests to me that these escapes should match the data types of the arguments that have already been read. Yet it seems that in this context the previously read arguments are interpreted as strings. So either the docstring of `interactive' should say that one may use %s escapes for all types of arguments or something else should be fixed to make this work with any type of arguments. In principle, one could match in the docstring for `interactive' the code letters used by `interactive' with "legal" % escapes that may refer to the respective argument letters later on. For example, a number read using the code letter n could be printed using the %d, %e and / or %f escapes. In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-04-11 built on regnitz Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Ubuntu 16.04.4 LTS From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 13 11:19:45 2019 Received: (at 31314) by debbugs.gnu.org; 13 Jul 2019 15:19:45 +0000 Received: from localhost ([127.0.0.1]:43135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmJoP-0008HC-IJ for submit@debbugs.gnu.org; Sat, 13 Jul 2019 11:19:45 -0400 Received: from quimby.gnus.org ([80.91.231.51]:35692) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmJoO-0008H3-Dp for 31314@debbugs.gnu.org; Sat, 13 Jul 2019 11:19:44 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmJoK-0001kx-Mt; Sat, 13 Jul 2019 17:19:43 +0200 From: Lars Ingebrigtsen To: "Roland Winkler" Subject: Re: bug#31314: 26.1; using % escapes in prompt for interactive References: <22174.9715.409176.23270@gargle.gargle.HOWL> Date: Sat, 13 Jul 2019 17:19:40 +0200 In-Reply-To: <22174.9715.409176.23270@gargle.gargle.HOWL> (Roland Winkler's message of "Sun, 29 Apr 2018 18:34:54 -0500") Message-ID: <875zo6uflf.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.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: "Roland Winkler" writes: > Running the following command interactively in emacs -Q > > (defun foo-num (n1 n2) > "Display numbers N1 and N2." > (interactive "nNumber 1: \nnNumber 1: %e, Number 2: ") > (message "Number 1: %9.2e [...] 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: 31314 Cc: 31314@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Roland Winkler" writes: > Running the following command interactively in emacs -Q > > (defun foo-num (n1 n2) > "Display numbers N1 and N2." > (interactive "nNumber 1: \nnNumber 1: %e, Number 2: ") > (message "Number 1: %9.2e, Number 2: %e" n1 n2)) > > yields the error message > > Format specifier doesn?FFE2?FF80?FF99t match argument type > > The problem is the `%e' apearing in the prompt for `interactive'. > If this is replaced by a generic `%s' everything works fine. > > The docstring of `interactive' says that the % escapes can be used > as in calls of `format', which sugests to me that these escapes > should match the data types of the arguments that have already been > read. Yet it seems that in this context the previously read > arguments are interpreted as strings. So either the docstring of > `interactive' should say that one may use %s escapes for all types > of arguments or something else should be fixed to make this work > with any type of arguments. I changed the doc string to say "%s", since that's apparently the only thing allowed currently. Extending `interactive' to allow other types may be nice, though. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 13 11:19:51 2019 Received: (at control) by debbugs.gnu.org; 13 Jul 2019 15:19:51 +0000 Received: from localhost ([127.0.0.1]:43138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmJoU-0008HV-RW for submit@debbugs.gnu.org; Sat, 13 Jul 2019 11:19:51 -0400 Received: from quimby.gnus.org ([80.91.231.51]:35706) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmJoT-0008HM-53 for control@debbugs.gnu.org; Sat, 13 Jul 2019 11:19:49 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmJoQ-0001l4-KM for control@debbugs.gnu.org; Sat, 13 Jul 2019 17:19:48 +0200 Date: Sat, 13 Jul 2019 17:19:46 +0200 Message-Id: <874l3qufl9.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #31314 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: tags 31314 fixed close 31314 27.1 quit 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: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 31314 fixed close 31314 27.1 quit From unknown Sat Aug 16 12:43:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 11 Aug 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator