From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Derk Ire Newsgroups: gmane.emacs.help Subject: Re: emacs interface with gpg-agent stopped working (or stopped caching passphrase) Date: Sat, 3 Sep 2016 11:50:38 -0700 Message-ID: References: <7df56913-7dfd-4789-a984-48b34f576c2f@googlegroups.com> <87eg51c9xk.fsf@iki.fi> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1472931354 24338 195.159.176.226 (3 Sep 2016 19:35:54 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Sep 2016 19:35:54 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Teemu Likonen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 03 21:35:49 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgGj5-0004kO-AH for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 21:35:39 +0200 Original-Received: from localhost ([::1]:47531 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgGj3-0001X9-3P for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 15:35:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgG1a-0000hM-4x for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:50:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgG1X-0002vh-Ib for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:50:41 -0400 Original-Received: from mail-vk0-x22f.google.com ([2607:f8b0:400c:c05::22f]:33827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgG1X-0002vd-CR for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 14:50:39 -0400 Original-Received: by mail-vk0-x22f.google.com with SMTP id v189so49886648vkv.1 for ; Sat, 03 Sep 2016 11:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wl30bAVcAEdQkM63FQwuna6W+X3KHwPppHPES4+Kpc8=; b=CqKZnkpoqsbXOL8l6jf/uc6MDMdb7FSCZ/vutkRUkGQBTgl0vCfY74vyOCo5nEPMhd I9MNo89i2Mp3iD7Ralkmxa9nTtt8u0jYxFlsWRksxg6ZaPo9GgKGjNRz80D/wW3LbnWC ox1NW0zKP+IOEa0EeGMHXgIcCbOkzkKHvo7clnSn/9JvJRZQXiTuP5vBlzN/vplrvg0U vG3WhVK2I7UDkHDMb15vT6aCvolUGO01Np0K1TAbUvRhT4BO9IV/qw0LmcpWCqin2zbV 2fsRF9dsgpUvBmbed2EtDtFJuTxdtkgRkDfGh8Yl4jh+GrJlDV2GD3ltwRQph/wOJhGl G6gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wl30bAVcAEdQkM63FQwuna6W+X3KHwPppHPES4+Kpc8=; b=ix5rnPn+QmB7HxBM6W5Qv94c5jGVOxYRA2sJ6QkqDrEoVQ9HTIHnFTT5A0kYZCWbdX eJN3Gj36JoeP8PwkESoTIibY0AzolCfhK4dL4sH6s+KoIELgFBXCdyGWLFY3nOaP8rMw DsZO39QUyUNpnt9Bl+x8fJRITAbdn6RNlzr7UEbjHYuqp/2zSDDzLF6dijhqH1WVW7DM 5URI/jsO0zsGz67FEGbXjTKxpJGOJclfNEPEmJKJIftJYFeJsyTtfc/WWxeau0Id9tSi OB+F3KStiQOEDB5P503hyxVpKrEaXoskQ6X6Nn9jE2GJ1ZVHGCUY4bgDIh/Hnfv3BcCW 6tFQ== X-Gm-Message-State: AE9vXwPnHgPEz2Ycf4O7r6zFSbPNiWh4wsCzNbOefTZY25LgG0ybILfwWrvfqh9OrkfCchoFIN1z5dW4DszS8Q== X-Received: by 10.31.146.10 with SMTP id u10mr17873233vkd.14.1472928638557; Sat, 03 Sep 2016 11:50:38 -0700 (PDT) Original-Received: by 10.176.2.74 with HTTP; Sat, 3 Sep 2016 11:50:38 -0700 (PDT) In-Reply-To: <87eg51c9xk.fsf@iki.fi> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c05::22f X-Mailman-Approved-At: Sat, 03 Sep 2016 15:34:49 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111244 Archived-At: Teemu, Setting epg-gpg-program in ~/.emacs fixed the problem ;;in ~/.emacs (setq epg-gpg-program "gpg2") I also found that with the program versions listed in OP, I no longer need to start gpg-agent in my .Xesession (or equivalent), nor do I need to set any environment variables. Emacs will in fact start gpg-agent when needed, and it automagically works, with gnome-ssh-askpass popping up, and remembering the passphrase for a while. Thank much for your insight. (3d time trying to post this reply, hope I got it right this time) On Sat, Sep 3, 2016 at 7:52 AM, Teemu Likonen wrote: > derkire@gmail.com [2016-09-02 23:32:11-07] wrote: > > > Expected (old) behavior: When opening (find-file) files in emacs, > > emacs contacts the gpg-agent, and a GUI window is popped to enter the > > passphrase. This is then enough to decrypt ALL additional .gpg files > > opened by emacs for the next 5 minutes. > > > > Actual (new) behavior: emacs instead asks for passphrase in the > > minibuffer (not GUI popup!), and the file will decrypt, BUT the PP has > > to be entered each time a new file is opened. That is, no more > > 5min/300sec window of caching. I interpret this to mean that the > > interface between emacs and the gpg-agent is not functioning > > correctly. > > It looks to me that your Emacs is now using old GPG 1.4 and not GPG 2.x > version. Emacs has some magic code to choose which one to use but the > logic is unknown to me. There is also variable epg-gpg-program. > > GPG 1.4 will connect to agent if ~/.gnupg/gpg.conf file has this line: > > use-agent > > GPG 2.x don't need that option because they always connect to the agent. > > > -- > /// Teemu Likonen - .-.. // > // PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 /// >