Hi Kevin,

On Saturday, 2015-04-04 11:41:12 -0700, Kevin J. McCarthy wrote:

> So this version keeps track of when a key has been selected for an
> address and adds this:
>      else if (r == M_NO)
>      {
>        if (key_selected || (crypt_hook->next != NULL))
>        {
>          crypt_hook = crypt_hook->next;
>          continue;
>        }
>      }
> So key selection with the original address will only take place for the
> last crypt-hook and only if a key hasn't been selected yet.

I think that behavior should be mentioned in the docs.

There's anyhow always some confusion with hooks and overriding and which
one wins in what order ;)

> This patch has a fairly specific use case, but I don't think it's too
> intrusive.  One side effect is that crypt-hooks for a regexp can't be
> changed, only appended to.  There may be a few cases where a person had
> multiple crypt-hooks and were counting on the ordering somehow, and now
> they have multiple prompts instead of just the first matching one.

When having multiple IDs for the same regex I would had assumed the last
matching won instead of the first.. as with most other hooks.


> --- a/doc/muttrc.man.head
> +++ b/doc/muttrc.man.head
> -\fBcrypt-hook\fP \fIpattern\fP \fIkey-id\fP
> +\fBcrypt-hook\fP \fIregexp\fP \fIkey-id\fP

This one makes me think.. was an expression such as

crypt-hook '~C ^account@example\.org$' '0x...'

a valid pattern, will it be a valid regexp? I guess not, for both?
Because the entire regexp (previously pattern) string is taken as
recipient expression?

  Eike

-- 
OpenPGP/GnuPG encrypted mail preferred in all private communication.
Key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
Use LibreOffice! https://www.libreoffice.org/

Attachment: signature.asc
Description: Digital signature

Reply via email to