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 12:24:39 -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 1472931355 24713 195.159.176.226 (3 Sep 2016 19:35:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Sep 2016 19:35:55 +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:50 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-0004ig-4D for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 21:35:39 +0200 Original-Received: from localhost ([::1]:47529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgGj2-0001X5-TB for geh-help-gnu-emacs@m.gmane.org; Sat, 03 Sep 2016 15:35:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgGYU-00087j-VE for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 15:24:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgGYS-0008Sr-JU for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 15:24:41 -0400 Original-Received: from mail-ua0-x236.google.com ([2607:f8b0:400c:c08::236]:36676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgGYS-0008Sk-DQ for help-gnu-emacs@gnu.org; Sat, 03 Sep 2016 15:24:40 -0400 Original-Received: by mail-ua0-x236.google.com with SMTP id 49so16274510uat.3 for ; Sat, 03 Sep 2016 12:24:40 -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=JbprsIJA97OEy04FpwawGTBZj7DWxyxn4Him048PQUI=; b=OpzbcNhhrVgx1Vic7YTNvDnz/N8/EDgYmtaEVoBh+7bhThZlVAVgqnXJmoQAtvvGOD qSnQN1M1oFyIJUifNi2suZX36ObR2cf3mjSaAv6iWRkUL2o/C8f4Sz/RLnJg9s4BzlN+ NEic1yJvdvSTPW+Z7Ie038mBxJlanvamrx0/Tayywq1RHi4ANz/2PwcqbqfVT6QnC2+c BtOutT8o5c7I2U5t+kbtVu3CFo7aq+SmlC6X0PLYWBxSyVImR12pC3X98d3P/BqrN3Wb TXbwaaFoxigtBB2xfqk5bnrcERk2VaNcnqSQb5RzjJ0L91qMTpMgN5W9RKHlG0vuCBWh qY/g== 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=JbprsIJA97OEy04FpwawGTBZj7DWxyxn4Him048PQUI=; b=QUsH9Vy+jwLaTH6nAG0ujCuzFrZYODik8UaNSwPHjXOfgutNMPSQcgZ/XGfrrXgSWK 6BtykYJ5AHFNIa8rVX0YgE63jBgknQOXbVqUGNmC1lkwIg2LIehnFk2X1jACbzp0wrju NUlZtUbM7BMDnIYUhRZkHLf2DxxN86H4g8nJz4FZ2kp/obcOCAgDH+yiq1I9EcOpvB9o eVo+vyNcJbOQ4RVUimRvGBeGWxDNq2/eDr1FXmbujV2YkzabFvMY5TRA34aHmhMjXLDH OjCP6qgrdPviRvf80LZMnOX4Jg98j48+ecgw30egqJsES3x39NWkCINF3K/D57/8VZSZ t0Mg== X-Gm-Message-State: AE9vXwPJqZgEOnDlO43A0Rrx2KYEkLxntR3WGyvPuoGf+3nVkEWZWDXwOBSLEAtqWewjJVGaztXZflg7wSyodg== X-Received: by 10.176.1.21 with SMTP id 21mr11321189uak.2.1472930680032; Sat, 03 Sep 2016 12:24:40 -0700 (PDT) Original-Received: by 10.176.2.74 with HTTP; Sat, 3 Sep 2016 12:24:39 -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:c08::236 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:111245 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. (4th attempt, sorry about the repeats) 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 /// >