From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: epa command names
Date: Sat, 12 Nov 2011 09:07:01 +0100 [thread overview]
Message-ID: <87ty693gt6.fsf@gmail.com> (raw)
In-Reply-To: <jwvty69kdtn.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 12 Nov 2011 02:22:12 -0500")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>>> I have switched to using epa instead of mailcrypt. The only drawback
>>>> I see is that the command names are not natural; thus, remembering
>>>> them is extra work.
>>>> Shall we give them aliases without `epa-'? For instance, define
>>>> `mail-encrypt' or `encrypt-mail' as an alias for `epa-mail-encrypt'?
>>> I don't much like this option because of the inability to handle
>>> conflicts. I'd much rather make M-x a bit more permissive such that M-x
>>> mail-encrypt falls back to epa-mail-encrypt (probably via completion).
>>>
>>> One way is something along the lines of the `substring' completion-style
>>> (which we could restrict to substrings that start after a word boundary),
>>> but I think we'd want something less general.
>>>
>>> I'm thinking of a way for packages to say "if `mail-encrypt' is matched
>>> by the user's input, then include `epa-mail-encrypt' in the list of
>>> completion candidates". This would handle conflicts very
>>> straightforwardly since if we have a second rule "if `mail-encrypt' is
>>> matched by the user's input, then include `superduper-mail-encrypt' in
>>> the list of completion candidates" M-x mail-encrypt TAB would simply
>>> provide both options as valid completion candidates.
>
>> anything does that actually.
>
> IIUC the "that" which it does is the "substrings that start after a word
> boundary" matching, but not the other one (which requires extra manually
> provided information, AFAICT). Right?
It loop in command list and does (string-match pattern "command_name").
This allow to do:
M-x encrypt
which will match all commands _containing_ "encrypt"
but also:
M-x ^encrypt
which will match all commands _starting_ by "encrypt"
And also, if you say:
M-x encrypt mail
or
M-x mail encrypt
Both will match "epa-mail-encrypt"
i.e (string-match "mail or encrypt" "command_name")
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
next prev parent reply other threads:[~2011-11-12 8:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 18:05 epa command names Richard Stallman
2011-11-11 18:26 ` name prefixes [was: epa command names] Drew Adams
2011-11-12 0:30 ` Richard Stallman
2011-11-12 3:52 ` Stephen J. Turnbull
2011-11-12 23:32 ` Richard Stallman
2011-11-15 6:23 ` Kevin Rodgers
2011-11-15 23:29 ` Richard Stallman
2011-11-12 8:55 ` Andreas Röhler
2011-11-11 22:07 ` epa command names Stefan Monnier
2011-11-11 22:28 ` Drew Adams
2011-11-12 2:34 ` Jason Rumney
2011-11-12 3:00 ` Stefan Monnier
2011-11-12 3:33 ` Chong Yidong
2011-11-12 6:36 ` Thierry Volpiatto
2011-11-12 7:22 ` Stefan Monnier
2011-11-12 8:07 ` Thierry Volpiatto [this message]
2011-11-12 23:32 ` Richard Stallman
2011-11-13 6:41 ` Thierry Volpiatto
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ty693gt6.fsf@gmail.com \
--to=thierry.volpiatto@gmail.com \
--cc=emacs-devel@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.