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

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

bug#45768: bug#45767: bug#45768: icomplete-mode does not provide in regi


From: Juri Linkov
Subject: bug#45768: bug#45767: bug#45768: icomplete-mode does not provide in region completion for dabbrev-completion
Date: Thu, 19 May 2022 19:58:40 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

> Try the recipe given in the bug report.  You should see now that after
> M-C-/ the possible completions get listed (in icomplete-mode style) on
> the same line (via an overlay).

Sorry, I temporarily removed these lines from `completion-at-point`:

              (completion-in-region-mode-predicate
               (lambda ()
                 ;; We're still in the same completion field.
                 (let ((newstart (car-safe (funcall hookfun))))
                   (and newstart (= newstart start)))))

to be able to use the new `minibuffer-next-completion`
(this puzzle is still unsolved).

> The `icomplete-in-buffer` functionality is very rough around the edges.
> I only implemented it as a kind of "proof of concept".  I think things
> like `corfu-mode` work much better (because they don't displace
> existing text in the buffer, they are just drawn on top of it).

Now `C-,` (icomplete-backward-completions) and `C-.` 
(icomplete-forward-completions)
work fine inline after `M-C-/`.  But typing `C-j` 
(icomplete-force-complete-and-exit)
erases the current buffer and replaces its contents with the selected 
completion.
Then it signals an error while trying to call `exit-minibuffer`.  It seems 
inline
completions need more work to be as smooth as in the minibuffer.

> [ To be honest, in my memory (from when I wrote the code), the list was
>   shown in the echo area rather than "inline".  ]

Maybe as an option inline completion could just activate the minibuffer
with initial input as a string under point from the original buffer.
This will allow to use normal completion in the minibuffer.  Then
exiting the minibuffer will replace the initial string with the string
returned from the minibuffer.





reply via email to

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