From: Juri Linkov <juri@linkov.net>
To: ndame <emacsuser@freemail.hu>
Cc: Dmitry Gutov <dgutov@yandex.ru>,
"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: Emacs should provide more modern item completion out of the box
Date: Tue, 28 Jan 2020 23:54:29 +0200 [thread overview]
Message-ID: <87eevje3tm.fsf@mail.linkov.net> (raw)
In-Reply-To: <AyKgzA.1v2IT2bQDAXt.n6JsMNSXcK6GYktJBnD@freemail.hu> (ndame's message of "Fri, 3 Jan 2020 05:39:47 +0000 (GMT)")
>> There are several. For M-x, the easiest one to try out is 'M-x icomplete-mode'.
>> Turn it on and see how you like the new 'M-x' experience.
>
> I tried it. It has the immediate feedback, but it still requires
> pressing TABs, lacks flex matching and has no recency bias.
Indeed, flex matching should be customized separately for icomplete-mode
(tho fido-mode uses it by default), but actually none of them requires
pressing TABs, and both have recency bias.
> Also, the horizontal format makes it only suitable for selecting from
> short items. When you have long items in your candidate list
> (e.g. different long paths from all over the file sytem) then it
> doesn't work. That's why modern systems use a vertical display,
> or support it also, besides the horizontal format.
Using a vertical display while keeping instant feedback of icomplete-mode
that doesn't require pressing TABs should be easy to do as well:
#+BEGIN_SRC emacs-lisp
(define-minor-mode minibuffer-quick-mode
"Toggle minibuffer quick completion mode."
:global t
:group 'minibuffer
(if minibuffer-quick-mode
(add-hook 'minibuffer-setup-hook 'minibuffer-quick-setup)
(remove-hook 'minibuffer-setup-hook 'minibuffer-quick-setup)))
(defun minibuffer-quick-setup ()
(add-hook 'post-command-hook #'minibuffer-quick-update nil t))
(defvar minibuffer-quick-min 1
"Minimal length of minibuffer contents to show completion.")
(defun minibuffer-quick-update ()
(when (>= (length (minibuffer-contents)) minibuffer-quick-min)
(let ((completion-styles '(flex))
(last-command nil))
(minibuffer-complete))))
(minibuffer-quick-mode)
#+END_SRC
next prev parent reply other threads:[~2020-01-28 21:54 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 [this message]
2020-01-29 3:09 ` Stefan Monnier
2020-01-29 23:00 ` Juri Linkov
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=87eevje3tm.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=emacsuser@freemail.hu \
/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).