unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joseph Turner <joseph@breatheoutbreathe.in>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Unexpected behavior of format-number with format-prompt
Date: Wed, 06 Nov 2024 23:44:00 -0800	[thread overview]
Message-ID: <3CD02C22-984C-42F7-AAE8-ECD413168503@breatheoutbreathe.in> (raw)
In-Reply-To: <86h68jqyut.fsf@gnu.org>



On November 6, 2024 11:36:42 PM PST, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Joseph Turner <joseph@breatheoutbreathe.in>
>> Date: Wed, 06 Nov 2024 12:06:02 -0800
>> 
>> When used with `read-string' (and other read-* functions),
>> `format-prompt' DTRT:
>> 
>> (let ((default "foo"))
>>   (read-string (format-prompt "Read" default) default))
>> 
>> The prompt looks like: "Read (default foo): "
>> 
>> However, `read-number' adds its own default argument:
>> 
>> (let ((default 1))
>>   (read-number (format-prompt "Read" default) default))
>> 
>> Prompt looks like: "Read (default 1) (default 1): "
>> 
>> This patch makes the behavior of `read-number' consistent with other
>> read-* functions:
>
>Thanks.
>
>First, this should have been sent to our issue tracker, via
>report-emacs-bug or submit-emacs-patch.

Got it.  Shall I do this now?

>More to the point: we cannot possibly change the behavior of
>read-number in such a backward-incompatible way.  Especially since
>this behavior is old, and explicitly called out in the doc string.  It
>is perhaps unfortunate that read-number behaves differently in this
>manner, but I'm afraid we will have to live with this.

That makes sense.  Can we apply the info manual change?



  reply	other threads:[~2024-11-07  7:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 20:06 Unexpected behavior of format-number with format-prompt Joseph Turner
2024-11-07  7:36 ` Eli Zaretskii
2024-11-07  7:44   ` Joseph Turner [this message]
2024-11-07  7:57     ` Eli Zaretskii
2024-11-09 19:18       ` Joseph Turner
2024-11-14  8:29         ` Eli Zaretskii
2024-11-07 13:50   ` Stephen Berman
2024-11-07 14:47     ` Eli Zaretskii
2024-11-07 15:57       ` Stephen Berman
2024-11-09 19:02         ` Joseph Turner
2024-11-09 21:51           ` Stephen Berman
2024-11-10  3:55             ` Joseph Turner
2024-11-10 10:37               ` Stephen Berman
2024-11-10  5:46             ` Eli Zaretskii
2024-11-10 10:40               ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CD02C22-984C-42F7-AAE8-ECD413168503@breatheoutbreathe.in \
    --to=joseph@breatheoutbreathe.in \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).