GNU bug report logs - #77497
30.1.50; "]" in the prompt in minibuffer-regexp-mode causes warning

Previous Next

Package: emacs;

Reported by: Spencer Baugh <sbaugh <at> janestreet.com>

Date: Thu, 3 Apr 2025 16:54:02 UTC

Severity: normal

Found in version 30.1.50

Fixed in version 31.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Spencer Baugh <sbaugh <at> janestreet.com>
Cc: 77497 <at> debbugs.gnu.org
Subject: Re: bug#77497: 30.1.50; "]" in the prompt in minibuffer-regexp-mode
 causes warning
Date: Thu, 03 Apr 2025 20:35:48 +0300
> 2. C-M-% ]
>
> 3. "]" is now in the prompt; type "foo" and see a minibuffer-message "Not in character
> alternative".
>
> 4. RET
>
> 5. C-M-%
>
> 6. "] -> foo" is in the prompt (as a default); type "bar" and also see a
> minibuffer-message "Not in character alternative".
>
> This also happens for longer strings e.g. "foobar]".
>
> This is especially annoying because C-M-% uses the previous M-%
> replacement as a default; so if M-% was used explicitly to replace a
> string containing ], it will confuse a subsequent C-M-%.

I can reproduce this with

  (read-regexp "Query replace regexp (default ]foo → ): ") bar

but not with

  (read-regexp "Replace regexp (default ]foo → ): ") bar




This bug report was last modified 45 days ago.

Previous Next


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