From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#31314: 26.1; using % escapes in prompt for interactive Date: Sun, 29 Apr 2018 18:34:54 -0500 Message-ID: <22174.9715.409176.23270@gargle.gargle.HOWL> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1525044845 31829 195.159.176.226 (29 Apr 2018 23:34:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Apr 2018 23:34:05 +0000 (UTC) To: 31314@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 30 01:34:00 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fCvpP-00088b-KR for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Apr 2018 01:33:59 +0200 Original-Received: from localhost ([::1]:57243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvrW-0006q3-Dr for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Apr 2018 19:36:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCvrP-0006px-Ug for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:36:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCvrO-0004aW-TS for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:36:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35369) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCvrO-0004aN-Oy for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:36:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fCvrO-0004WV-G8 for bug-gnu-emacs@gnu.org; Sun, 29 Apr 2018 19:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Apr 2018 23:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.152504492417338 (code B ref -1); Sun, 29 Apr 2018 23:36:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Apr 2018 23:35:24 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:145847 Archived-At: 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