From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kDPSD9hRX19aSAAA0tVLHw (envelope-from ) for ; Mon, 14 Sep 2020 11:19:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YD8fCthRX18iSQAAB5/wlQ (envelope-from ) for ; Mon, 14 Sep 2020 11:19:52 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A1D8A940390 for ; Mon, 14 Sep 2020 11:19:51 +0000 (UTC) Received: from localhost ([::1]:50358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHmWU-0003di-GR for larch@yhetil.org; Mon, 14 Sep 2020 07:19:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHmVj-0003cJ-Ei for emacs-orgmode@gnu.org; Mon, 14 Sep 2020 07:19:03 -0400 Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:35572 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHmVg-0007Xl-Hv for emacs-orgmode@gnu.org; Mon, 14 Sep 2020 07:19:03 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1kHmVc-0009ib-Tl for emacs-orgmode@gnu.org; Mon, 14 Sep 2020 13:18:56 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Colin Baxter Subject: Re: Getting Org-Crypt to work (doc bug?) Date: Mon, 14 Sep 2020 12:18:50 +0100 Message-ID: <87r1r4hahx.fsf@yandex.com> References: <87h7s2gjjz.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:XIu8pTRYLx5MVts/7g+PIg7n4Oo= X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeBAMAAAAodabAAAAAB3RJTUUH1wQdAAY04/L8hgAA AAlwSFlzAAAewQAAHsEBw2lUUwAAAARnQU1BAACxjwv8YQUAAAASUExURc7OzpwAAAAAAP////8A AGNj/2aqqTQAAAA8SURBVHjaYzA2NnEBAmdj01D8wNgYpM7F2JiBgYFREAgEGJiU8AMGBpA6QaCG UVtGbRm1ZdSWUVsGjS0Aq20lJnMawnkAAAAASUVORK5CYII= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/14 07:18:57 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=yandex.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.41 X-TUID: IuiR+xABU7Kg >>>>> David Masterson writes: > Nicolas Goaziou writes: >> Hello, >> >> David Masterson writes: >> >>> I'm trying to get org-crypt to work, but I'm missing something. >>> Following the Org-Crypt Info page, I've set it up for symmetric >>> encryption and added a :crypt: tag to a header. When I try to >>> save the file, it reports that no key was specified, so it will >>> do symmetric encryption. And then it freezes. C-g will >>> unfreeze, but the buffer is slightly messed up like it started >>> working on something, but waited for an external command? GPG is >>> installed. What am I missing? >> >> Could you explain more precisely what you did? For example, I >> encounter no problem crypting the following file: >> >> * Test :crypt: >> >> This is crypted. >> >> # Local Variables: # org-crypt-key: nil # End: >> >> Upon saving the file, I type the key twice, and the entry is >> encrypted. >> >> Note that I evaluated (org-crypt-use-before-save-magic) once >> beforehand. > I'm setting up Org this way: > (use-package org :init (setq org-tags-exclude-from-inheritance > '("crypt") org-crypt-key nil ) :config (progn (require 'org-crypt) > (org-crypt-use-before-save-magic) ) ) > I did essentially what you did (added :crypt: to a header in one > of my files) and tried to save the file. > Found it! I started Emacs on Linux via 'xterm -e emacs &' because > something else had done this to me (forget what). The thing is > that GPG is asking for the passphrase on the xterm window and not > in the Emacs. I didn't notice this because Emacs covered > it. Someone else mentioned the gpg-agent(?) to prevent this (is > there another way?). Both things should be mentioned in the > Org-Mode Info pages for org-crypt. > -- David Masterson The overlay of a password field (either in an xterm or popup) is a particular problem for full screen applications, or if you using something like stumpwm. I've found that whether or not I get a popup depends on the version of gnupg. Anything greater than gpg version 2.1.18 I get a popup. In those cases, to make sure the password request is passed always to emacs and not to a popup, I set the variable `epa-pinentry-mode' to loopback as in #+begin_src elisp (setq epa-pinentry-mode 'loopback) #+end_src This seems to work. Best wishes,