Daniel Schoepe
2010-Jan-18 14:32 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
This patch adds crypto_selector to the variables available to the before-edit hook, so one can set default crypto-options or sign/encrypt a mail depending on e.g the message or header content. Users should beware that the variable can be nil, since the same hook is also run from reply_mode which doesn''t have access to the crypto_selector element or crypto-support can be absent entirely. -------------- next part -------------- A non-text attachment was scrubbed... Name: add_crypto_selector.patch Type: application/octet-stream Size: 2056 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100118/875ba628/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100118/875ba628/attachment.bin>
William Morgan
2010-Jan-23 12:53 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Hi Daniel, I like the idea, but would prefer a dedicated "crypto-mode" hook analogous to how we have the "reply-to" hook for setting the default reply-to mode. -- William <wmorgan-sup at masanjin.net>
Carlos Garcia Campos
2010-Jan-24 11:10 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from William Morgan''s message of s?b ene 23 13:53:04 +0100 2010:> Hi Daniel, > > I like the idea, but would prefer a dedicated "crypto-mode" hook > analogous to how we have the "reply-to" hook for setting the default > reply-to mode.+1 I filed a bug report for that some time ago indeed: http://masanjin.net/sup-bugs/issue13 -- Carlos Garcia Campos PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100124/a701f0e7/attachment.bin>
Daniel Schoepe
2010-Jan-26 15:55 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from William Morgan''s message of Sat Jan 23 13:53:04 +0100 2010:> Hi Daniel, > > I like the idea, but would prefer a dedicated "crypto-mode" hook > analogous to how we have the "reply-to" hook for setting the default > reply-to mode.Okay, here''s the new patch: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Added-crypto-settings-hook.patch Type: application/octet-stream Size: 1449 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100126/eb412c58/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100126/eb412c58/attachment.bin>
Ben Walton
2010-Jan-26 18:19 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from Daniel Schoepe''s message of Tue Jan 26 10:55:55 -0500 2010:> Okay, here''s the new patch:+1 for this. Patch looks OK to my eye, fwiw. -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100126/7713b319/attachment.bin>
Rich Lane
2010-Feb-27 18:17 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Applied to master.
Gaute Hope
2010-Mar-09 10:29 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from Daniel Schoepe''s message of 2010-01-26 16:55:55 +0100:> Excerpts from William Morgan''s message of Sat Jan 23 13:53:04 +0100 2010: > > Hi Daniel, > > > > I like the idea, but would prefer a dedicated "crypto-mode" hook > > analogous to how we have the "reply-to" hook for setting the default > > reply-to mode.Could someone be so kind and provide an example for setting it to i.e. ''Sign'' by default, given a specific from address? - gaute -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100309/9dc5db42/attachment.bin>
Daniel Schoepe
2010-Mar-12 22:03 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from Gaute Hope''s message of Tue Mar 09 11:29:13 +0100 2010:> Could someone be so kind and provide an example for setting it to i.e. > ''Sign'' by default, given a specific from address? > > - gauteSomething like this should work: crypto_selector.set_to :sign if header["From"] == "foo at ba.r" (You might need to use e.g. a regex if the header also contains the name, as in "Foo Bar <mail>") -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100312/67bfb75c/attachment-0001.bin>
Gaute Hope
2010-Mar-12 22:34 UTC
[sup-talk] [patch] Add crypto_selector variable to before-edit
Excerpts from Daniel Schoepe''s message of 2010-03-12 23:03:03 +0100:> Excerpts from Gaute Hope''s message of Tue Mar 09 11:29:13 +0100 2010: > > Could someone be so kind and provide an example for setting it to i.e. > > ''Sign'' by default, given a specific from address? > > > > - gaute > > Something like this should work: > > crypto_selector.set_to :sign if header["From"] == "foo at ba.r" > > (You might need to use e.g. a regex if the header also contains the name, > as in "Foo Bar <mail>")Thanks, that did it! - gaute -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: not available URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20100312/09960bdb/attachment.bin>