Hi Eike, Eike Rathke wrote: > > 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 ;)
Okay that sounds reasonable. I'll improve the docmentation to be more clear about what's happening for the crypt-hook. > > 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. For other hooks, such as account-hook, *all* the matching hooks are run. The last one "wins" only because it has the chance to override whatever all the previous matching hooks did. For the crypt-hook, only the first matching hook was run. With this patch, it's being changed so that all hooks are run (with confirmation). > 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? crypt-hooks only accept a regexp. The man page was incorrect so I fixed it. None of the pattern modifiers work for crypt-hook. (I actually committed another patch that fixed the manual, but I didn't realize the hooks were in the man page too. I'll create another patch to fix the rest of the man page soon.) -Kevin
signature.asc
Description: PGP signature