emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Org-Crypt to work (doc bug?)


From: Colin Baxter
Subject: Re: Getting Org-Crypt to work (doc bug?)
Date: Mon, 14 Sep 2020 12:18:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

>>>>> David Masterson <dsmasterson92630@outlook.com> writes:

    > Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
    >> Hello,
    >> 
    >> David Masterson <dsmasterson92630@outlook.com> 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,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]