[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: epa command names
Re: epa command names
Sat, 12 Nov 2011 09:07:01 +0100
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux)
Stefan Monnier <address@hidden> 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:
which will match all commands _containing_ "encrypt"
which will match all commands _starting_ by "encrypt"
And also, if you say:
M-x encrypt mail
M-x mail encrypt
Both will match "epa-mail-encrypt"
i.e (string-match "mail or encrypt" "command_name")
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
Re: epa command names, Stefan Monnier, 2011/11/11
Re: epa command names, Thierry Volpiatto, 2011/11/12