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

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

Re: Incrementally display the Emacs command list filtered out by the inp


From: Tassilo Horn
Subject: Re: Incrementally display the Emacs command list filtered out by the input key words in real-time.
Date: Fri, 02 Jul 2021 14:40:58 +0200
User-agent: mu4e 1.5.13; emacs 28.0.50

Hongyi Zhao <hongyi.zhao@gmail.com> writes:

> I tried the following code snippet posted at
> <https://emacs.stackexchange.com/questions/13500/fuzzy-completion-style>,
> but there is no effect at all:

Emacs already has a fuzzy completion style (see the `flex' entry in
`completion-styles-alist'), no need to copy&paste some 6 year old
implementation from the internet.

> (add-to-list 'completion-styles-alist
>              '(naive-fuzzy
>                completion-naive-fuzzy-try-completion
>                completion-naive-fuzzy-all-completions
>                "Simple naive-fuzzy completion, which never alters the
> string to complete, unless a unique match exists."))
>
> ;; (setq-local completion-styles '(naive-fuzzy))

Try (setq completion-styles '(flex)).  But note that the used
`completion-styles' just defines how the input is matched against the
things to be completed, i.e., you'll see no visual difference.  See the
manual at (info "(emacs) Completion Styles").

To have a more visual UI, follow Eli's advice:

>> And maybe try an alternative completion mode, like icompletion-mode.

It is called `icomplete-mode'.

Another very nice UI is the `vertico' package from GNU ELPA.  Other
popular choices include ivy, selectrum, etc.

Bye,
Tassilo



reply via email to

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