Re: [PATCH] emacs: process crypto for reply only when specified
authorTomi Ollila <tomi.ollila@iki.fi>
Sun, 13 Apr 2014 20:41:07 +0000 (23:41 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:34 +0000 (10:01 -0800)
b1/690ce82153dfa71e671e91ed34e211de613b39 [new file with mode: 0644]

diff --git a/b1/690ce82153dfa71e671e91ed34e211de613b39 b/b1/690ce82153dfa71e671e91ed34e211de613b39
new file mode 100644 (file)
index 0000000..8dfcd03
--- /dev/null
@@ -0,0 +1,112 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id A3F21431FBC\r
+       for <notmuch@notmuchmail.org>; Sun, 13 Apr 2014 13:41:25 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id k4k6Ya3rS2Ri for <notmuch@notmuchmail.org>;\r
+       Sun, 13 Apr 2014 13:41:14 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 96F51431FBD\r
+       for <notmuch@notmuchmail.org>; Sun, 13 Apr 2014 13:41:14 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id 5D00110008F;\r
+       Sun, 13 Apr 2014 23:41:07 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: David Bremner <david@tethera.net>,\r
+       Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Notmuch Mail <notmuch@notmuchmail.org>\r
+Subject: Re: [PATCH] emacs: process crypto for reply only when specified\r
+In-Reply-To: <87ob05xu9g.fsf@zancas.localnet>\r
+References: <1396689486-19232-1-git-send-email-jani@nikula.org>\r
+       <1396852814-10338-1-git-send-email-jrollins@finestructure.net>\r
+       <8761me3st5.fsf@zancas.localnet>\r
+       <m24n1xa3yu.fsf@guru.guru-group.fi>\r
+       <87ob05xu9g.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.17+200~g5c6d42d (http://notmuchmail.org) Emacs/24.3.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Sun, 13 Apr 2014 23:41:07 +0300\r
+Message-ID: <m2fvlhklng.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 13 Apr 2014 20:41:25 -0000\r
+\r
+On Sun, Apr 13 2014, David Bremner wrote:\r
+\r
+> Tomi Ollila <tomi.ollila@iki.fi> writes:\r
+>\r
+>>\r
+>> Code looks OK. +1. I'm interested to see whether replies to signed emails\r
+>> work on this system where sign/(de|en)cryption just doesn't work (out of\r
+>> the box) :D\r
+>>\r
+>\r
+> It's a good point. I need to insert my smartcard to sign things, which\r
+> I'm sometimes too lazy to do. In my case, maybe I should stop being so\r
+> lazy; I suspect my particular case is a but unusual.\r
+\r
+Below is what happened to me when I failed to remove the \r
+"<#secure method=pgpmime mode=sign>" part from the beginning of the message\r
+It is very easy to detect and there is nothing much one can use if they\r
+have configured notmuch-crypto-process-mime to be t (like I seem to have ;)\r
+\r
+--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
+notmuch-crypto-process-mime is a variable defined in `one-notmuch.el'.\r
+Its value is t\r
+Original value was nil\r
+--8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<--\r
+\r
+Emacs stopped responding my keypresses after C-c C-c; C-g brought control\r
+back to me -- and then I tried again...\r
+\r
+ps output\r
+\r
+19028 ?     SLs  0:00 /usr/bin/gpg --no-tty --status-fd 1 --yes --command-f\r
+19029 ?     SL   0:00 gpg-agent --server\r
+19030 ?     RL   0:50 /usr/bin/pinentry-curses\r
+19034 ?     SLs  0:00 /usr/bin/gpg --no-tty --status-fd 1 --yes --command-f\r
+19035 ?     SL   0:00 gpg-agent --server\r
+19036 ?     RL   0:04 /usr/bin/pinentry-curses\r
+19037 pts/6 R+   0:00 ps x\r
+\r
+The 'pinentry-curses' and this emacs doesn't play along well (I've seen\r
+this happening before when I tried to encrypt some messages). I had\r
+to pkill gpg and pinentry-curses to get rid of the above processes.\r
+\r
+> Perhaps people with no ability to sign are less likely to have\r
+> "notmuch-crypto-process-mime" set?  Or we can add another configuration\r
+> variable initialized from notmuch-crypto-process-mime, but allowing\r
+> people to shut this off.\r
+\r
+Well, I set notmuch-crypto-process-mime to nil -- it still wants to\r
+sign the message and runs gpg...\r
+\r
+... my case may be unique enough no-one else has the same problem; anyway\r
+ideas how to automatically kill the gpg process(es) when one aborts send\r
+attempt? \r
+\r
+Tomi\r
+\r