Solved.
Problem was that in graphical mode I saw no password prompt. Failed without a
useful failure message.
Perhaps org-crypt could be improved to catch this situation?
Starting emacs in a terminal worked, as the password prompt was in the
originating terminal window.
On a Mac, I tended to start emacs from the dock, so no terminal.
Solution was to follow the instruction in pinentry.
I then added (pinenty-start) to my .emacs init file.
No org-encrypt-entry prompts for a password in the minibuffer.
pinentry is a built-in package.
Status: Built-In.
Version: 0.1
Summary: GnuPG Pinentry server implementation
Other versions: 0.1 (gnu).
This package allows GnuPG passphrase to be prompted through the
minibuffer instead of graphical dialog.
To use, add "allow-emacs-pinentry" to "~/.gnupg/gpg-agent.conf",
reload the configuration with "gpgconf --reload gpg-agent", and
start the server with M-x pinentry-start.
> On 14 Oct 2017, at 3:33 am, Nicolas Goaziou <[email protected]> wrote:
>
> Hello,
>
> David Maslen <[email protected]> writes:
>
>> In the example below the words “test this” are not replaced by encrypted
>> text.
>> My previous experience is that the entire contents of a org subheading
>> structure marked with the :crypt: tag would be encrypted/decrypted by the
>> related org function.
>
> I cannot reproduce it. The text is properly replaced by encrypted text
> here.
>
> Regards,
>
> --
> Nicolas Goaziou 0x80A93738