From: Juri Linkov <juri@linkov.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: ndame <emacsuser@freemail.hu>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>,
Dmitry Gutov <dgutov@yandex.ru>
Subject: Re: Emacs should provide more modern item completion out of the box
Date: Thu, 30 Jan 2020 01:00:28 +0200 [thread overview]
Message-ID: <87v9otkgvn.fsf@mail.linkov.net> (raw)
In-Reply-To: <jwva767x8rx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 28 Jan 2020 22:09:06 -0500")
>> 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))
(while-no-input
(minibuffer-completion-help)))))
Maybe better to use run-with-idle-timer that could be customized with
a number of seconds to delay.
next prev parent reply other threads:[~2020-01-29 23:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-02 13:44 Emacs should provide more modern item completion out of the box ndame
2020-01-02 22:31 ` Dmitry Gutov
2020-01-03 5:39 ` ndame
2020-01-28 21:54 ` Juri Linkov
2020-01-29 3:09 ` Stefan Monnier
2020-01-29 23:00 ` Juri Linkov [this message]
2020-01-29 23:57 ` Stefan Monnier
2020-01-03 9:18 ` Andrea Corallo
2020-01-03 9:45 ` ndame
2020-01-03 12:57 ` Dmitry Gutov
2020-01-03 22:37 ` jeremyb
2020-01-04 18:16 ` Andrea Corallo
2020-01-08 10:28 ` Stefan Kangas
2020-01-04 20:52 ` Stefan Monnier
2020-01-06 15:27 ` Dmitry Gutov
2020-01-06 15:52 ` Stefan Monnier
2020-01-08 10:22 ` Stefan Kangas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9otkgvn.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=emacsuser@freemail.hu \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).