From: Drew Adams <drew.adams@oracle.com>
To: Hongyi Zhao <hongyi.zhao@gmail.com>,
help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Incrementally display the Emacs command list filtered out by the input key words in real-time.
Date: Fri, 2 Jul 2021 14:43:31 +0000 [thread overview]
Message-ID: <SA2PR10MB4474A71E994433523CE4F379F31F9@SA2PR10MB4474.namprd10.prod.outlook.com> (raw)
In-Reply-To: <CAGP6POLOyp5DZta2T8VOz1a0osKCvHp=VhGBMVgt8kJH0qsk2w@mail.gmail.com>
> Say, when I input "foo bar", the matched command
> list are incrementally displayed immediately, and
> finally the ones which including "foo" and "bar"
> in any part of the candidate commands are filtered
> out. How do I configure my init file to implement
> this feature?
Not too sure what you're asking for.
1. You say you want to first see command-name
matches for input `foo bar'.
2. But then you say you want command names that
contain either `foo' or `bar' to be filtered
out (i.e., excluded).
Those two seem contradictory. The first seems
unnecessary - undone by the second. But maybe
you just want to see all command names at first,
for some reason.
Anyway, if what you want is instead something
like this:
1. You see all command names initially.
2. You type something to exclude the names that
contain either `foo' or `bar'.
Then that's trivial if you use Icicles.
1. To see all completions initially, set or bind
variable `icicle-show-Completions-initially-flag'
to non-nil.
2. To exclude matches of some pattern (e.g. `foo'):
a. Type the pattern, to see _only_ its matches.
b. Use `C-~' to get the complement, i.e., to
subtract those matches from the previous set
of matches.
E.g., to exclude all matches for `foo' or `bar'
(anywhere in the command name, i.e., in any order):
1. Type `foo C-~' to see all except `foo' matches.
2. Type `bar C-~' to see all except matches for
`foo' or `bar'.
See also:
* https://www.emacswiki.org/emacs/Icicles_-_Nutshell_View#ChippingAway
* https://www.emacswiki.org/emacs/Icicles_-_Candidate_Sets#SetOperations
If you don't really care to show all completions for
empty input (e.g. all command names), then leave
`icicle-show-Completions-initially-flag' nil.
By default, you can just use `TAB' or `S-TAB' to
initiate completion. Doing that once suffices:
completions are then updated automatically as you
change your minibuffer input.
If you want completions to be updated automatically
whenever you change minibuffer input without having
to use `TAB' or `S-TAB', but you don't want to show
completions initially (i.e., with empty input), then
set variable `icicle-incremental-completion' to
non-nil and non-t (the default value is `t').
[You can cycle its value any time, using `C-#' during
completion: OFF, ON (initiated by `TAB' or `S-TAB'),
or eager (initiated by typing anything).]
See: https://www.emacswiki.org/emacs/Icicles_-_Icompletion#IncrementalCompletion
___
There is, BTW, no "fuzzy" matching involved in
your example of excluding `foo' and `bar' matches.
However, Icicles does support fuzzy matching -
seven kinds of fuzzy matching, in fact.
See https://www.emacswiki.org/emacs/Icicles_-_Completion_Methods_and_Styles#FuzzyCompletion
next prev parent reply other threads:[~2021-07-02 14:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-02 5:22 Incrementally display the Emacs command list filtered out by the input key words in real-time Hongyi Zhao
2021-07-02 6:25 ` Eli Zaretskii
2021-07-02 7:23 ` Hongyi Zhao
2021-07-02 12:40 ` Tassilo Horn
2021-07-02 15:27 ` Hongyi Zhao
2021-07-02 14:43 ` Drew Adams [this message]
2021-07-02 15:40 ` [External] : " Hongyi Zhao
2021-07-03 18:49 ` Marcin Borkowski
2021-07-03 23:39 ` Hongyi Zhao
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=SA2PR10MB4474A71E994433523CE4F379F31F9@SA2PR10MB4474.namprd10.prod.outlook.com \
--to=drew.adams@oracle.com \
--cc=help-gnu-emacs@gnu.org \
--cc=hongyi.zhao@gmail.com \
/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.
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).