From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Small patch to enable use of gpg-agent with pgg Date: Wed, 22 Mar 2006 10:46:39 +0100 Message-ID: <87acbihkw0.fsf@latte.josefsson.org> References: <2cd46e7f0510031250u66ea1349yb437d539ce4027ef@mail.gmail.com> <2cd46e7f0510061541w73bb6a92wb6d22829b6e804ae@mail.gmail.com> <20051007100014.GB4850@kenny.sha-bang.local> <2cd46e7f0510071106k3d4d3e6agc36f16a37d8b6bc6@mail.gmail.com> <20051007214952.GA30235@kenny.sha-bang.local> <20051008103627.GA1218@kenny.sha-bang.local> <2cd46e7f0510081131h14e2bbeaga7f1a33ebd6347c8@mail.gmail.com> <2cd46e7f0510101415t76825ea7u9749fe23da54ce@mail.gmail.com> <2cd46e7f0510121647x3c51fb65pc883ed61f4e864ab@mail.gmail.com> <2cd46e7f0510200708x4640d1c2t50743cf439e52dd4@mail.gmail.com> <87pskfq361.fsf@latte.josefsson.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143020838 27528 80.91.229.2 (22 Mar 2006 09:47:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Mar 2006 09:47:18 +0000 (UTC) Cc: "Daiki Ueno \(pgg author\)" , ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 22 10:47:15 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FLzvl-0002Qu-LG for ged-emacs-devel@m.gmane.org; Wed, 22 Mar 2006 10:47:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FLzvz-0007pU-Sd for ged-emacs-devel@m.gmane.org; Wed, 22 Mar 2006 04:47:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FLzvl-0007pO-Jf for emacs-devel@gnu.org; Wed, 22 Mar 2006 04:47:05 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FLzvk-0007pB-HY for emacs-devel@gnu.org; Wed, 22 Mar 2006 04:47:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FLzvk-0007p8-8r for emacs-devel@gnu.org; Wed, 22 Mar 2006 04:47:04 -0500 Original-Received: from [217.13.230.178] (helo=yxa.extundo.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FLzvq-0000kN-2k for emacs-devel@gnu.org; Wed, 22 Mar 2006 04:47:10 -0500 Original-Received: from localhost.localdomain (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id k2M9kdrr007505; Wed, 22 Mar 2006 10:46:40 +0100 Original-To: Sascha Wilde OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060322:wilde@sha-bang.de::GoDxe8hSeB8gkDdM:1lnt X-Hashcash: 1:21:060322:ding@gnus.org::U1atbj0dwqDbj+sh:6Yc7 X-Hashcash: 1:21:060322:emacs-devel@gnu.org::0q3Vo6TJ/7DxUeDp:AabO X-Hashcash: 1:21:060322:ueno@unixuser.org::H+7Z5r1I/VA/mYvL:I3YP In-Reply-To: (Sascha Wilde's message of "Wed, 22 Mar 2006 09:36:51 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on yxa.extundo.com X-Virus-Status: Clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:51953 gmane.emacs.gnus.general:62354 Archived-At: Sascha Wilde writes: > Simon Josefsson wrote: > > Hi Simon, > > first of all, fore some reasons you got lost from the list of CC's so > you missed some important messages in this thread, including a more > elaborated version of my patch... Hi Sascha. Oops! >> 1) Non-agent mode didn't work at all (the args list contained 'nil' so >> invoking gpg failed with a lisp error). > > Yes. This was fixed in my second patch. (and in the attached, of cause) > >> 2) After fixing the above, the patch made the passphrase be 't', which >> broke the passphrase cache, causing a lisp error. > > Thanks, I used your strategy to fix this issue in my new patch (which > I attached). Your patch look good, although Daiki's idea of querying for the passphrase only when it is needed seem better. I don't have time to implement that though. If you or Daiki have time, I'd prefer that solution, but if there isn't a patch to commit within a few days, I'll install your patch so we don't get stuck. What do you think? >> How about this patch instead? It works for me. I've also improved >> the pgg-use-agent default value. > > This is very error prone. As I wrote before on emacs-devel: there are > certain situations in which using the agent will fail -- even if it is > available: for example: on an text console running the standard > pin-entry program (which uses curses) from within emacs won't work. > That's why I think this option should be explicitly enabled by the user. > > Another problem is, that checking for $GPG_AGENT_INFO is not > sufficient, the environment variable will stay set, even is the agent > was killed. Ah, I see. > Could you please consider committing the attached patch, which > reverses the default of pgg-gpg-use-agent to nil, and adds an check if > the agent is _really_ available, when pgg-gpg-use-agent is set to t? > > (The patch is against the latest CVS, including your patch that is) Seems fine, although I'll wait a day or so until I see if we can get Daiki's idea implemented. Thanks!