emacs-devel
[Top][All Lists]
Advanced

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

Re: Improvement proposals for `completing-read'


From: Daniel Mendler
Subject: Re: Improvement proposals for `completing-read'
Date: Wed, 14 Apr 2021 12:44:47 +0200

On 4/14/21 2:00 AM, Dmitry Gutov wrote:
On 12.04.2021 14:04, Daniel Mendler wrote:
The `consult--async-sink` contains this code which performs the refreshing:

      ;; Refresh the UI when the current minibuffer window belongs
      ;; to the current asynchronous completion session.
      (when-let (win (active-minibuffer-window))
        (when (eq (window-buffer win) buffer)
          (with-selected-window win
            (run-hooks 'consult--completion-refresh-hook)))))

Sounds good for minibuffers, but not so great for code completion, where context is more complex. And since completing-read shares the notion of completion table with completion-at-point-functions, I think any async support we add should work for both purposes.

Yes, that would be good. In order to generalize the Consult async protocol one would have to pass some refresh/notify function during setup, e.g. instead of passing only the 'setup argument, also pass a notify function argument. It seems to me that would be sufficient.



reply via email to

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