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: Gabriele Nicolardi <gabriele <at> medialab.sissa.it>
To: 71429 <at> debbugs.gnu.org
Subject: bug#71429: Inconsistent y-or-n-p prompt behavior in Emacs Lisp
Date: Sat, 8 Jun 2024 09:03:37 +0200
[Message part 1 (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 2 (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.