[notmuch] gpg decryption

Jameson Rollins jrollins at finestructure.net
Mon Mar 8 08:47:39 PST 2010


On Mon, 08 Mar 2010 12:49:54 +0100, "Sebastian Spaeth" <Sebastian at SSpaeth.de> wrote:
> My bank frequently sends me transactions as an inline-armored gpg
> encrypted text.

Wow!  That's incredible.  I assume this is a German Bank?  Only in my
wildest fantasies could I even conceive of such a thing possibly
happening, especially in the US.  I want to use your bank.

> So I added the below 2 lines in my .emacs and added this function to
> the list of notmuch-show-hook functions:

> (defun spaetz/decrypt ()
>   (epa-decrypt-armor-in-region (point-min) (point-max)))
> 
> Despite warning in the docs that this function should not be called from
> elisp programs directly, it works just fine for me. The only annoyance
> is that the function asks "Should I replace the current text (y/n)" in
> the status bar whenever it detects gpg text.
> It works for me and is a nice proof-of-concept which happens to solve my bank
> account itch, but definitely needs improvement:

Do I've had problems with notmuch if I answer "yes" to the replace
current text question.  It appears to actually modify the file being
decrypted, which in this case is the actual mail message, and that seems
to cause problems for notmuch.  I actually want the text to be replaced,
but just in the buffer, and not in the file.  I haven't looked into this
yet though.

We really need to get some better PGP/MIME support in the emacs UI.
Unfortunately I just haven't had the time to work on it.  I'm at least
glad that other are struggling with it as well, so it's not just me.

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100308/908dccf8/attachment.pgp>


More information about the notmuch mailing list