GNU bug report logs -
#76461
31.0.50; CRM tries to insert candidate in prompt read-only zone
Previous Next
Reported by: Thierry Volpiatto <thievol <at> posteo.net>
Date: Fri, 21 Feb 2025 08:08:02 UTC
Severity: normal
Tags: patch
Found in version 31.0.50
Fixed in version 30.2
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 27/02/2025 20:33, Juri Linkov wrote:
> Maybe Dmitry could confirm if this is the right fix
> for completing-read-multiple recently fixed in
> bug#48356 and bug#76010.
It seems okay, thanks. Though it depends on the prompt always being a
field, and the only field in the minibuffer. I don't know if that will
hold for ever, but it seems to be the case currently.
Here's a slightly different fix which seems to behave the same in the
test scenario. I'm happy with whichever of the two you prefer.
diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el
index 676252ae126..a75ccd46f50 100644
--- a/lisp/emacs-lisp/crm.el
+++ b/lisp/emacs-lisp/crm.el
@@ -269,7 +269,9 @@ completing-read-multiple
(setq-local completion-list-insert-choice-function
(lambda (_start _end choice)
(let* ((beg (save-excursion
- (if (search-backward-regexp
crm-separator nil t)
+ (if (search-backward-regexp
crm-separator
+
(field-beginning)
+ t)
(1+ (point))
(minibuffer-prompt-end))))
(end (save-excursion
This bug report was last modified 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.