emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61535: closed (29.0.60; choose-completion erases in-region buffer)


From: GNU bug Tracking System
Subject: bug#61535: closed (29.0.60; choose-completion erases in-region buffer)
Date: Sun, 19 Feb 2023 19:33:02 +0000

Your message dated Sun, 19 Feb 2023 21:32:08 +0200
with message-id <86zg99v4cn.fsf@mail.linkov.net>
and subject line Re: bug#61535: 29.0.60; choose-completion erases in-region 
buffer
has caused the debbugs.gnu.org bug report #61535,
regarding 29.0.60; choose-completion erases in-region buffer
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61535: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61535
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]