Re: [PATCH] cli: crypto: tell gmime to use gpg-agent
authorDavid Bremner <david@tethera.net>
Wed, 27 Feb 2013 17:11:48 +0000 (13:11 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:47 +0000 (09:53 -0800)
4d/96cefd53705bcbdcabaf9433620a425ddba5d2 [new file with mode: 0644]

diff --git a/4d/96cefd53705bcbdcabaf9433620a425ddba5d2 b/4d/96cefd53705bcbdcabaf9433620a425ddba5d2
new file mode 100644 (file)
index 0000000..8db0527
--- /dev/null
@@ -0,0 +1,94 @@
+Return-Path: <bremner@unb.ca>\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 A5751431FB6\r
+       for <notmuch@notmuchmail.org>; Wed, 27 Feb 2013 09:11:57 -0800 (PST)\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 GzOvq2DPsodl for <notmuch@notmuchmail.org>;\r
+       Wed, 27 Feb 2013 09:11:55 -0800 (PST)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 9679C431FAF\r
+       for <notmuch@notmuchmail.org>; Wed, 27 Feb 2013 09:11:55 -0800 (PST)\r
+Received: from remotemail by tesseract.cs.unb.ca with local (Exim 4.80)\r
+       (envelope-from <bremner@unb.ca>)\r
+       id 1UAkXm-0002aX-SQ; Wed, 27 Feb 2013 13:11:50 -0400\r
+Received: (nullmailer pid 29489 invoked by uid 1000);\r
+       Wed, 27 Feb 2013 17:11:48 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
+       Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] cli: crypto: tell gmime to use gpg-agent\r
+In-Reply-To: <87hakxpwcu.fsf@servo.finestructure.net>\r
+References: <1361950838-22919-1-git-send-email-jani@nikula.org>\r
+       <87hakxpwcu.fsf@servo.finestructure.net>\r
+User-Agent: Notmuch/0.15.1 (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 27 Feb 2013 13:11:48 -0400\r
+Message-ID: <87r4k1znor.fsf@maritornes.cs.unb.ca>\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: Wed, 27 Feb 2013 17:11:57 -0000\r
+\r
+Jameson Graef Rollins <jrollins@finestructure.net> writes:\r
+\r
+> I will argue that the "use-agent" option should be enabled.  If we force\r
+> use of gpg-agent, then we don't allow people to opt out of using it.\r
+> That's not very user friendly, particularly if someone has not enabled\r
+> it for a specific reason.\r
+\r
+But right now we force people to enable the agent globally via use-agent\r
+if they want to decrypt mail in notmuch-cli/emacs. The proposed change\r
+allows them to use the agent only for notmuch.\r
+\r
+> But I think more to the point we need a little bit of due diligence of\r
+> the effects of this before we enable it.  What happens if gpg-agent is\r
+> not available?  What happens if there is no X session?  Tests that probe\r
+> the various circumstances would be useful.\r
+\r
+I don't think we should directly care about the presence of an X session\r
+or not; the agent protocol doesn't depend on how the agent was started\r
+afaik. \r
+\r
+> I do note, though, that the error messages are not very useful.  It\r
+> would be nice if could figure out that the decryption failed because of\r
+> lack of agent and inform the user of that.\r
+\r
+Yes, it would be nice to detect a missing/non-responsive agent. And that\r
+could be used by tests.\r
+\r
+> We should probably also update the show man page to make explicit that\r
+> an agent may be required.\r
+\r
+We probably need to word it more strongly than that.  If the user wants\r
+decryption then notmuch requires an agent; if they want encryption or\r
+signing then message-mode (really probably easypg) requires an agent.\r
+I'm not sure how it manages it, but according to Jani's experiments it\r
+seems that message mode already uses the agent independently of the\r
+user's config; perhaps via the '--use-agent' argument to gpg.  So the\r
+current situation is unfortunately asymmetric.\r
+\r
+Of course it would help if there was documentation for the emacs\r
+interface that we could update.\r
+\r