GNU bug report logs - #71429
Inconsistent y-or-n-p prompt behavior in Emacs Lisp

Previous Next

Package: emacs;

Reported by: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>

Date: Sat, 8 Jun 2024 07:20:04 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
Subject: bug#71429: closed (Re: bug#71429: Inconsistent y-or-n-p prompt
 behavior in Emacs Lisp)
Date: Sun, 09 Jun 2024 11:05:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#71429: Inconsistent y-or-n-p prompt behavior in Emacs Lisp

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 71429 <at> debbugs.gnu.org.

-- 
71429: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71429
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: gabriele <at> medialab.sissa.it, 71429-done <at> debbugs.gnu.org,
 stephen.berman <at> gmx.net
Subject: Re: bug#71429: Inconsistent y-or-n-p prompt behavior in Emacs Lisp
Date: Sun, 9 Jun 2024 07:02:55 -0400
Eli Zaretskii <eliz <at> gnu.org> writes:

> OK, thanks.  So I now added the above caveat to the ELisp manual, and
> I'm closing this bug.

Actually closing.

[Message part 3 (message/rfc822, inline)]
From: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
To: bug-gnu-emacs <at> gnu.org
Subject: Inconsistent y-or-n-p prompt behavior in Emacs Lisp
Date: Sat, 8 Jun 2024 09:03:37 +0200
[Message part 4 (text/plain, inline)]
Hi,
I have the following Emacs Lisp code:

|(progn (y-or-n-p "Test: ") (let ((search-spaces-regexp 
"\\(?:\\n?[\s\t]+\\|\n\\)?")) (y-or-n-p "Test: "))) |

The first prompt from the |y-or-n-p| function appears as expected:

|Test: (y or n) |

However, the second prompt appears differently:

|Test: (‘y’ or ‘n’) |

I’m trying to understand why the second prompt format changes. What 
causes this inconsistency in the |y-or-n-p| prompt?

I suspect it might be related to the |search-spaces-regexp| variable or 
how Emacs handles interactive prompts, but I’m not sure. Any insights or 
explanations would be greatly appreciated!

Best regards,

Gabriele Nicolardi

​
[Message part 5 (text/html, inline)]

This bug report was last modified 1 year and 44 days ago.

Previous Next


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