From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 8D4726DE1069 for ; Sat, 9 Feb 2019 09:34:44 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.035 X-Spam-Level: X-Spam-Status: No, score=0.035 tagged_above=-999 required=5 tests=[AWL=0.025, RCVD_IN_DNSWL_NONE=-0.0001, T_SPF_PERMERROR=0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LN9V4q2AoD4z for ; Sat, 9 Feb 2019 09:34:43 -0800 (PST) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTPS id 6B20E6DE1016 for ; Sat, 9 Feb 2019 09:34:43 -0800 (PST) Received: from fifthhorseman.net (cpe-74-71-53-242.nyc.res.rr.com [74.71.53.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by che.mayfirst.org (Postfix) with ESMTPSA id 3B892F99A for ; Sat, 9 Feb 2019 12:34:41 -0500 (EST) Received: by fifthhorseman.net (Postfix, from userid 1000) id F3BF42040D; Sat, 9 Feb 2019 12:34:37 -0500 (EST) From: Daniel Kahn Gillmor To: Notmuch Mail Subject: [PATCH] emacs: Invoke gpg with --batch and --no-tty Date: Sat, 9 Feb 2019 12:34:37 -0500 Message-Id: <20190209173437.7970-1-dkg@fifthhorseman.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2019 17:34:44 -0000 When invoking gpg as a backgrounded tool, it's important to let gpg know that it is backgrounded, to avoid spurious prompts or other breakage. In particular, https://bugs.debian.org/913614 was a regression in GnuPG which causes problems when importing keys without a terminal, but gpg expects one. Ensuring that notmuch-emacs always invokes gpg as a background process should avoid some of these unnecessary failure. Thanks to Justus Winter for finding this problem. Signed-off-by: Daniel Kahn Gillmor --- emacs/notmuch-crypto.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index fc2b5301..353f721e 100644 --- a/emacs/notmuch-crypto.el +++ b/emacs/notmuch-crypto.el @@ -142,7 +142,7 @@ mode." (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process epg-gpg-program nil t t "--list-keys" fingerprint)) + (call-process epg-gpg-program nil t t "--batch" "--no-tty" "--list-keys" fingerprint)) (recenter -1)))) (defun notmuch-crypto-sigstatus-error-callback (button) @@ -153,9 +153,9 @@ mode." (with-selected-window window (with-current-buffer buffer (goto-char (point-max)) - (call-process epg-gpg-program nil t t "--recv-keys" keyid) + (call-process epg-gpg-program nil t t "--batch" "--no-tty" "--recv-keys" keyid) (insert "\n") - (call-process epg-gpg-program nil t t "--list-keys" keyid)) + (call-process epg-gpg-program nil t t "--batch" "--no-tty" "--list-keys" keyid)) (recenter -1)) (notmuch-show-refresh-view))) -- 2.20.1