--- Begin Message ---
Subject: |
29.0.60; choose-completion erases in-region buffer |
Date: |
Wed, 15 Feb 2023 20:32:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
0. emacs-29 -Q
1. type: (with-c C-M-i
2. type: M-down ... M-RET
3. check that the whole buffer was deleted before a selected
completion candidate was inserted to the buffer:
C-h v buffer-undo-list RET
Here is a possible fix for emacs-29:
diff --git a/lisp/simple.el b/lisp/simple.el
index c58acfe3adc..1924567cc3f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9882,7 +9882,8 @@ choose-completion
(with-current-buffer buffer
(choose-completion-string
choice buffer
- (or (and completion-use-base-affixes base-affixes)
+ (or (and (not completion-in-region-mode)
+ completion-use-base-affixes base-affixes)
base-position
;; If all else fails, just guess.
(list (choose-completion-guess-base-position choice)))
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#61535: 29.0.60; choose-completion erases in-region buffer |
Date: |
Sun, 19 Feb 2023 21:32:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>> M-RET is bound to minibuffer-choose-completion in
>> completion-in-region-mode-map.
>> minibuffer-choose-completion let-binds completion-use-base-affixes to t
>> before calling choose-completion. Therefore completion-use-base-affixes
>> should be ignored in choose-completion for completion-in-region-mode.
>
> OK, thanks for the explanations. I wonder if some of the above should
> be in comments to the code, though.
Added to comments.
> Please install the patch on emacs-29.
Done.
--- End Message ---