database error
[notmuch-archives.git] / 6e / 23e8ec856a1a0b4db226cbd4999c419b760380
1 Return-Path: <Sebastian@SSpaeth.de>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 49D8C476B8A\r
6         for <notmuch@notmuchmail.org>; Mon,  8 Mar 2010 03:50:14 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.686\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.686 tagged_above=-999 required=5\r
12         tests=[AWL=-0.687, BAYES_50=0.001] autolearn=ham\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id hS6AeWXr70lU for <notmuch@notmuchmail.org>;\r
16         Mon,  8 Mar 2010 03:50:13 -0800 (PST)\r
17 Received: from homiemail-a25.g.dreamhost.com (caiajhbdcahe.dreamhost.com\r
18         [208.97.132.74])\r
19         by olra.theworths.org (Postfix) with ESMTP id 58946476B76\r
20         for <notmuch@notmuchmail.org>; Mon,  8 Mar 2010 03:50:13 -0800 (PST)\r
21 Received: from sspaeth.de (mtec-hg-docking-1-dhcp-204.ethz.ch\r
22         [129.132.133.204])\r
23         by homiemail-a25.g.dreamhost.com (Postfix) with ESMTPA id D06AE678083\r
24         for <notmuch@notmuchmail.org>; Mon,  8 Mar 2010 03:49:56 -0800 (PST)\r
25 Received: by sspaeth.de (sSMTP sendmail emulation);\r
26         Mon, 08 Mar 2010 12:49:54 +0100\r
27 From: "Sebastian Spaeth" <Sebastian@SSpaeth.de>\r
28 To: Notmuch development list <notmuch@notmuchmail.org>\r
29 Date: Mon, 08 Mar 2010 12:49:54 +0100\r
30 Message-ID: <87aaujyqvx.fsf@SSpaeth.de>\r
31 MIME-Version: 1.0\r
32 Content-Type: text/plain; charset=us-ascii\r
33 Subject: [notmuch] gpg decryption\r
34 X-BeenThere: notmuch@notmuchmail.org\r
35 X-Mailman-Version: 2.1.13\r
36 Precedence: list\r
37 List-Id: "Use and development of the notmuch mail system."\r
38         <notmuch.notmuchmail.org>\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
40         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
42 List-Post: <mailto:notmuch@notmuchmail.org>\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
46 X-List-Received-Date: Mon, 08 Mar 2010 11:50:14 -0000\r
47 \r
48 My bank frequently sends me transactions as an inline-armored gpg\r
49 encrypted text. So I added the below 2 lines in my .emacs and added this\r
50 function to the list of notmuch-show-hook functions:\r
51 \r
52 (defun spaetz/decrypt ()\r
53   (epa-decrypt-armor-in-region (point-min) (point-max)))\r
54 \r
55 Despite warning in the docs that this function should not be called from\r
56 elisp programs directly, it works just fine for me. The only annoyance\r
57 is that the function asks "Should I replace the current text (y/n)" in\r
58 the status bar whenever it detects gpg text.\r
59 It works for me and is a nice proof-of-concept which happens to solve my bank\r
60 account itch, but definitely needs improvement:\r
61 \r
62 - We just feed it the whole notmuch-show buffer, it would be nicer to\r
63 hand it the just the region of the message body/mime part. I wonder, if\r
64 things like this should not better be done with dme's message-washing\r
65 hooks rather than a notmuch-show hook?  \r
66 \r
67 - The annoying "should I replace the current text" question should not\r
68 appear, ie we need to use some more low-level functionality and\r
69 implement mime part "cleaning".\r
70 \r
71 - This will not handle encrypted text as an mime attachment, I guess.\r
72 \r
73 No clue, just tossing this out for now.\r
74 \r
75 Sebastian\r