[Top][All Lists]

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

Re: Emacs should provide more modern item completion out of the box

From: Juri Linkov
Subject: Re: Emacs should provide more modern item completion out of the box
Date: Thu, 30 Jan 2020 01:00:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu)

>> Using a vertical display while keeping instant feedback of icomplete-mode
>> that doesn't require pressing TABs should be easy to do as well:
> [,,,]
>> (defun minibuffer-quick-update ()
>>   (when (>= (length (minibuffer-contents)) minibuffer-quick-min)
>>     (let ((completion-styles '(flex))
>>           (last-command nil))
>>       (minibuffer-complete))))
> Why `minibuffer-complete`?  This will actually perform completion
> (i.e. it may modify the content of the minibuffer).  I think you want to
> use `minibuffer-completion-help` instead

Ah, I completely forgot about the key `?'
(never used it since TAB is more DWIM-ish).

> (and I'm not sure why you bind `completion-styles` since it will only
> take effect during the display but not when the user finally hits RET).

This part I don't understand - it seems its main point is to take effect
during the display.

But anyway completion styles should be customized separately,
e.g. I think 'partial-completion' is more usable than 'flex' :)

> Also, you probably want to run this within a `while-no-input` of some kind.

'while-no-input' feels still too laggy when tried with this:

(defun minibuffer-quick-update ()
  (when (and minibuffer-completion-table
             (>= (length (minibuffer-contents)) minibuffer-quick-min))
    (let ((non-essential t))

Maybe better to use run-with-idle-timer that could be customized with
a number of seconds to delay.

reply via email to

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