GNU bug report logs - #76797
29.1; read-string docstring doesn't mention return value

Previous Next

Package: emacs;

Reported by: Howard Melman <hmelman <at> gmail.com>

Date: Fri, 7 Mar 2025 02:39:02 UTC

Severity: normal

Found in version 29.1

Fixed in version 30.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76797 in the body.
You can then email your comments to 76797 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76797; Package emacs. (Fri, 07 Mar 2025 02:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Howard Melman <hmelman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 07 Mar 2025 02:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: GNU Emacs <bug-gnu-emacs <at> gnu.org>
Subject: 29.1; read-string docstring doesn't mention return value
Date: Thu, 6 Mar 2025 21:37:55 -0500
The docstring for read-string in emacs 29.1 doesn't mention
its return value (though the 4th arg describes what it
returns if the user enters the empty string).

I agree it's kind of obvious that it returns the read string
but not seeing it explicitly made me scan for something I
might have been missing.

I suggest the first line instead of:

    Read a string from the minibuffer, prompting with string PROMPT.

be:

    Return a string read from the minibuffer, prompting with string PROMPT.

or if 71 characters is too long, one of:

    Return a string read from the minibuffer, prompting with PROMPT.
    Return a string read from the minibuffer, using PROMPT string.
    Return a string read from the minibuffer, using string PROMPT.

Or just mention the return value in the one of the other lines.

-- 

Howard




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Fri, 07 Mar 2025 17:16:01 GMT) Full text and rfc822 format available.

Notification sent to Howard Melman <hmelman <at> gmail.com>:
bug acknowledged by developer. (Fri, 07 Mar 2025 17:16:02 GMT) Full text and rfc822 format available.

Message #10 received at 76797-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Howard Melman <hmelman <at> gmail.com>, 76797-done <at> debbugs.gnu.org
Subject: Re: bug#76797: 29.1;
 read-string docstring doesn't mention return value
Date: Fri, 7 Mar 2025 17:15:00 +0000
Version: 30.2

Howard Melman <hmelman <at> gmail.com> writes:

> The docstring for read-string in emacs 29.1 doesn't mention
> its return value (though the 4th arg describes what it
> returns if the user enters the empty string).
>
> I agree it's kind of obvious that it returns the read string
> but not seeing it explicitly made me scan for something I
> might have been missing.
>
> I suggest the first line instead of:
>
>     Read a string from the minibuffer, prompting with string PROMPT.
>
> be:
>
>     Return a string read from the minibuffer, prompting with string PROMPT.
>
> or if 71 characters is too long, one of:
>
>     Return a string read from the minibuffer, prompting with PROMPT.
>     Return a string read from the minibuffer, using PROMPT string.
>     Return a string read from the minibuffer, using string PROMPT.
>
> Or just mention the return value in the one of the other lines.

Thanks, fixed on emacs-30.  Closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Apr 2025 11:24:26 GMT) Full text and rfc822 format available.

This bug report was last modified 72 days ago.

Previous Next


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