From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Limit what M-x TAB lists?
Date: Fri, 27 Dec 2013 16:29:13 +0900 [thread overview]
Message-ID: <8738len452.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <87bo03itkn.fsf@building.gnus.org>
Lars Ingebrigtsen writes:
> Here's today's unrealistic idea: Wouldn't it be nice if `M-x fooTAB' was
> more useful?
>
> For instance, if I type `M-x vc-dTAB' in this buffer, I get the
> following:
>
> Possible completions are:
> vc-default-check-headers vc-default-mark-resolved
> vc-default-revision-completion-table vc-delete-file
> vc-diff vc-dir
> vc-dir-delete-file vc-dir-find-file
> vc-dir-find-file-other-window vc-dir-hide-state
> vc-dir-hide-up-to-date vc-dir-ignore
> vc-dir-isearch vc-dir-isearch-regexp
> vc-dir-kill-dir-status-process vc-dir-kill-line
> vc-dir-mark vc-dir-mark-all-files
> vc-dir-menu vc-dir-mode
> vc-dir-next-directory vc-dir-next-line
> vc-dir-previous-directory vc-dir-previous-line
> vc-dir-query-replace-regexp vc-dir-refresh
> vc-dir-search vc-dir-show-fileentry
> vc-dir-toggle-mark vc-dir-unmark
> vc-dir-unmark-all-files vc-dir-unmark-file-up
vc-default-...
vc-delete-file
vc-diff
vc-dir
vc-dir-...
is simple to compute algorithmically (string processing). It doesn't
do what you want, obviously, but it sure reduces the visual clutter.
Another algorithmic approach would be to mark each symbol defined in a
keymap with the property 'completion-keymap and the keymap (list of
keymaps). If none of the keymaps in which a symbol is defined are
currently active, filter the symbol out. Heck, maybe the property is
a premature optimization; perhaps which keymaps bind the function and
whether they are active can be done sufficiently quickly.
prev parent reply other threads:[~2013-12-27 7:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 14:18 Limit what M-x TAB lists? Lars Ingebrigtsen
2013-12-26 14:58 ` Stefan Monnier
2013-12-26 15:24 ` Lars Ingebrigtsen
2013-12-26 16:03 ` Óscar Fuentes
2013-12-26 16:09 ` Lars Ingebrigtsen
2013-12-26 17:50 ` Stefan Monnier
2013-12-26 18:03 ` Lars Ingebrigtsen
2013-12-27 1:41 ` Lars Ingebrigtsen
2014-01-03 18:00 ` Ted Zlatanov
2014-01-06 15:47 ` Davis Herring
2014-01-18 17:43 ` Lars Ingebrigtsen
2013-12-26 17:50 ` Tom
2014-01-11 21:07 ` Nix
2014-01-11 23:38 ` Drew Adams
2013-12-27 7:29 ` Stephen J. Turnbull [this message]
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=8738len452.fsf@uwakimon.sk.tsukuba.ac.jp \
--to=stephen@xemacs.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
/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).