GNU bug report logs - #36989
26.2; Doc string of `y-or-n-p': say it returns nil if answer is not `y' or `DEL'

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 9 Aug 2019 16:45:02 UTC

Severity: minor

Tags: fixed

Found in version 24.5

Fixed in version 25.1

Done: Noam Postavsky <npostavs <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 36989 in the body.
You can then email your comments to 36989 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#36989; Package emacs. (Fri, 09 Aug 2019 16:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 09 Aug 2019 16:45:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.2; Doc string of `y-or-n-p': say it returns nil if answer is not
 `y' or `DEL'
Date: Fri, 9 Aug 2019 09:44:48 -0700 (PDT)
Subject line says it all.  The doc says only that it returns `t' if the
answer is `y'.  It should also say what it returns if the answer is no
(not `y' or `DEL').

(The Elisp manual is OK for this.)

In GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
 of 2019-04-13
Repository revision: fd1b34bfba8f3f6298df47c8e10b61530426f749
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36989; Package emacs. (Fri, 09 Aug 2019 17:04:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 36989 <at> debbugs.gnu.org
Subject: Re: bug#36989: 26.2;
 Doc string of `y-or-n-p': say it returns nil if answer is not `y' or
 `DEL'
Date: Fri, 09 Aug 2019 13:02:55 -0400
Drew Adams <drew.adams <at> oracle.com> writes:

> Subject line says it all.  The doc says only that it returns `t' if the
> answer is `y'.  It should also say what it returns if the answer is no
> (not `y' or `DEL').

Did you miss where it says:

    Return t if answer is "y" and nil if it is "n".
                                  ^^^^^^^^^^^^^^^^




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36989; Package emacs. (Fri, 09 Aug 2019 17:21:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36989 <at> debbugs.gnu.org
Subject: RE: bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if
 answer is not `y' or `DEL'
Date: Fri, 9 Aug 2019 10:20:37 -0700 (PDT)
> > Subject line says it all.  The doc says only that it returns `t' if
> > the answer is `y'.  It should also say what it returns if the answer
> > is no (not `y' or `DEL').
> 
> Did you miss where it says:
>     Return t if answer is "y" and nil if it is "n".
>                                   ^^^^^^^^^^^^^^^^

No, I didn't miss it, because it's not in the Emacs release
I reported on (the latest release, AFAIK): Emacs 26.2.

This is the full doc string (`C-h f'):

y-or-n-p is a compiled Lisp function in 'subr.el'.

(y-or-n-p PROMPT)

Ask user a "y or n" question.  Return t if answer is "y".
Takes one argument, which is the string to display to ask the question.
It should end in a space; 'y-or-n-p' adds '(y or n) ' to it.
No confirmation of answer is requested; a single character is enough.
Also accepts SPC to mean yes, or DEL to mean no.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36989; Package emacs. (Fri, 09 Aug 2019 17:27:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 36989 <at> debbugs.gnu.org
Subject: Re: bug#36989: 26.2;
 Doc string of `y-or-n-p': say it returns nil if answer is not `y' or
 `DEL'
Date: Fri, 09 Aug 2019 13:26:20 -0400
notfound 36989 26.2
found 36989 24.5
tags 36989 fixed
close 36989 25.1
quit

Drew Adams <drew.adams <at> oracle.com> writes:

>> Did you miss where it says:
>>     Return t if answer is "y" and nil if it is "n".
>>                                   ^^^^^^^^^^^^^^^^
>
> No, I didn't miss it, because it's not in the Emacs release
> I reported on (the latest release, AFAIK): Emacs 26.2.

I don't think you are looking at the docstring from Emacs 26.2.

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/subr.el?h=emacs-26.2#n2507

> Ask user a "y or n" question.  Return t if answer is "y".

That seems to be the docstring from 24.5.

https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/subr.el?h=emacs-24.5#n2212




bug No longer marked as found in versions 26.2. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 09 Aug 2019 17:27:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 24.5. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 09 Aug 2019 17:27:02 GMT) Full text and rfc822 format available.

Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 09 Aug 2019 17:27:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 36989 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 09 Aug 2019 17:27:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#36989; Package emacs. (Fri, 09 Aug 2019 17:33:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 36989 <at> debbugs.gnu.org
Subject: RE: bug#36989: 26.2; Doc string of `y-or-n-p': say it returns nil if
 answer is not `y' or `DEL'
Date: Fri, 9 Aug 2019 10:32:33 -0700 (PDT)
> I don't think you are looking at the docstring from Emacs 26.2.
> 
> > Ask user a "y or n" question.  Return t if answer is "y".
> 
> That seems to be the docstring from 24.5.

Very sorry.  My bad.  I am in 26.2, but that doc
string is from a redefinition I had of the function.

I'll close the bug, if you haven't already.
Sorry for wasting your time.  And thanks for
identifying the problem so quickly.




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

This bug report was last modified 5 years and 345 days ago.

Previous Next


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