[Top][All Lists]

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

Re: epa command names

From: Thierry Volpiatto
Subject: Re: epa command names
Date: Sat, 12 Nov 2011 09:07:01 +0100
User-agent: 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: 
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
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 

reply via email to

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