Re: Getting Org-Crypt to work (doc bug?)
Bastien writes: > Hi David, > > Applied as e2bb60581: > https://code.orgmode.org/bzg/org-mode/commit/e2bb60581 > > I'm attaching the patch so that you can see how to format the > ChangeLog for future contributions. > > Best, Thanks -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
Hi David, David Masterson writes: > diff --git a/doc/org-manual.org b/doc/org-manual.org > index 3eb745b5d..775af7a13 100644 > --- a/doc/org-manual.org > +++ b/doc/org-manual.org Applied as e2bb60581: https://code.orgmode.org/bzg/org-mode/commit/e2bb60581 I'm attaching the patch so that you can see how to format the ChangeLog for future contributions. Best, -- Bastien >From e2bb60581b489f92c9f2479994d484d2104968db Mon Sep 17 00:00:00 2001 From: David Masterson Date: Wed, 23 Sep 2020 11:03:24 +0200 Subject: [PATCH] doc/org-manual.org (Org Crypt): Add info links to epa and GnuPG * doc/org-manual.org (Org Crypt): Add info links to epa and GnuPG. TINYCHANGE --- doc/org-manual.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index 229575b13..043f2ddd1 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19697,8 +19697,8 @@ an Org file that is part of a publishing project. :END: Org Crypt encrypts the text of an entry, but not the headline, or -properties. Behind the scene, it uses the Emacs EasyPG library to -encrypt and decrypt files. +properties. Behind the scene, it uses the [[info:epa][Emacs EasyPG Library]] to +encrypt and decrypt files, and EasyPG needs a correct [[info:gnupg][GnuPG]] setup. #+vindex: org-crypt-tag-matcher Any text below a headline that has a =crypt= tag is automatically -- 2.25.1
Re: Getting Org-Crypt to work (doc bug?)
Hi David, David Masterson writes: > I didn't see a reply -- does the above patch work? Have you applied > it? I have not had the time to test the patch yet. If you are confident the fix is good, please update the format of the patch, following instructions here: https://orgmode.org/worg/org-contribute.html#commit-messages Thanks, -- Bastien
Re: Getting Org-Crypt to work (doc bug?)
David Masterson writes: > David Masterson writes: > >> Bastien writes: >> >>> Hi David, >>> >>> David Masterson writes: >>> Both things should be mentioned in the Org-Mode Info pages for org-crypt. >>> >>> Can you please provide a patch for this? >>> >>> Thanks, >> >> I'm not very good with this yet, but, when I figure it out, I will >> certainly consider a patch. Never having done a patch before, could you >> list the steps for providing a patch? > > Nevermind -- here's the patch: > > - diff --git a/doc/org-manual.org b/doc/org-manual.org index 3eb745b5d..775af7a13 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19650,8 +19650,9 @@ an Org file that is part of a publishing project. :END: Org Crypt encrypts the text of an entry, but not the headline, or -properties. Behind the scene, it uses the Emacs EasyPG library to -encrypt and decrypt files. +properties. Behind the scene, it uses the [[info:epa][Emacs EasyPG Library]] to +encrypt and decrypt files. Also, pay attention to the installation +and setup of [[info:gnupg][GnuPG]] #+vindex: org-crypt-tag-matcher Any text below a headline that has a =crypt= tag is automatically > - I didn't see a reply -- does the above patch work? Have you applied it? -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
> On Mon, 14 Sep 2020 15:17:02 +0100, Colin Baxter said: >writes: >> On Mon, Sep 14, 2020 at 12:18:50PM +0100, Colin Baxter wrote: >>> [...] 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. >> Oh, thanks -- this answers the question I only half-posed :) >> BTW: the variable documentation says to use `epg-pinentry-mode' >> for Emacs versions >= 27.1 Colin> I remember I had this epa/epg issue a while ago, I think with Colin> emacs-26.3. Putting the variable as `epa-pinentry-mode' worked for me, but Colin> `epg-pinentry-mode' didn't. I've not looked at it since. It still works Colin> for me with emacs-27.1 and I thought it best to leave it alone. :-) epa-pinentry-mode is a variable defined in `epg-config.el'. Its value is nil This variable is an alias for `epg-pinentry-mode'. This variable is obsolete since 27.1; use `epg-pinentry-mode' instead. That means you should be good for at least another two emacs releases or so (5 years, 8? who knows). Robert
Re: Getting Org-Crypt to work (doc bug?)
David Masterson writes: > Bastien writes: > >> Hi David, >> >> David Masterson writes: >> >>> Both things should be mentioned in the Org-Mode Info pages for >>> org-crypt. >> >> Can you please provide a patch for this? >> >> Thanks, > > I'm not very good with this yet, but, when I figure it out, I will > certainly consider a patch. Never having done a patch before, could you > list the steps for providing a patch? Nevermind -- here's the patch: - diff --git a/doc/org-manual.org b/doc/org-manual.org index 3eb745b5d..775af7a13 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19650,8 +19650,9 @@ an Org file that is part of a publishing project. :END: Org Crypt encrypts the text of an entry, but not the headline, or -properties. Behind the scene, it uses the Emacs EasyPG library to -encrypt and decrypt files. +properties. Behind the scene, it uses the [[info:epa][Emacs EasyPG Library]] to +encrypt and decrypt files. Also, pay attention to the installation +and setup of [[info:gnupg][GnuPG]] #+vindex: org-crypt-tag-matcher Any text below a headline that has a =crypt= tag is automatically - -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
Bastien writes: > Hi David, > > David Masterson writes: > >> Both things should be mentioned in the Org-Mode Info pages for >> org-crypt. > > Can you please provide a patch for this? > > Thanks, I'm not very good with this yet, but, when I figure it out, I will certainly consider a patch. Never having done a patch before, could you list the steps for providing a patch? -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
Colin Baxter writes: > 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. Oh! I'll have to try that. Thanks. -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
>writes: > On Mon, Sep 14, 2020 at 12:18:50PM +0100, Colin Baxter wrote: >> [...] 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. > Oh, thanks -- this answers the question I only half-posed :) > BTW: the variable documentation says to use `epg-pinentry-mode' > for Emacs versions >= 27.1 I remember I had this epa/epg issue a while ago, I think with emacs-26.3. Putting the variable as `epa-pinentry-mode' worked for me, but `epg-pinentry-mode' didn't. I've not looked at it since. It still works for me with emacs-27.1 and I thought it best to leave it alone. :-) Best wishes, signature.asc Description: PGP signature
Re: Getting Org-Crypt to work (doc bug?)
Hi David, David Masterson writes: > Both things > should be mentioned in the Org-Mode Info pages for org-crypt. Can you please provide a patch for this? Thanks, -- Bastien
Re: Getting Org-Crypt to work (doc bug?)
On Mon, Sep 14, 2020 at 12:18:50PM +0100, Colin Baxter wrote: > [...] 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. Oh, thanks -- this answers the question I only half-posed :) BTW: the variable documentation says to use `epg-pinentry-mode' for Emacs versions >= 27.1 Cheers - t signature.asc Description: Digital signature
Re: Getting Org-Crypt to work (doc bug?)
On Mon, Sep 14, 2020 at 10:42:57AM +0200, Gregor Zattler wrote: > Hi David, > * David Masterson [2020-09-13; 17:11]: > > Yes, gpg-agent is installed and appears to have been started in > > background. My O/S is Debian on a Chromebook. > > > > I start Emacs via 'xterm -e emacs' and just noticed (thanks to you) that > > I'm getting a textual popup on the xterm asking for the > > passphrase. Given that, everything works. > > > > So, you're saying that the textual popup is the correct mechanism for > > getting the passphrase? > > That's one possible way. If you want to have a graphical > dialog box, check which pinentry packages are installed: > > $ dpkg -l '*pinentry*' [...] > as you see, at my system, there are two pinentry packages > installed (besides the docs): pinentry-curses for terminal > while pinentry-qt provides a graphical dialog box. I choose > pinentry-qt, because it had fewer dependencies and was > smaller than the other options. > > If your system lacks a graphical pinentry, install one. Pinentry is gpg's way to ask you for your passphrase. AFAIK there's a way for Emacs to do the pinentry thing (in case you don't like some unrelated popup exploding in your face). I don't know what the current status is (there used to be a pinentry.el). So... lots of possibilities. Cheers - t signature.asc Description: Digital signature
Re: Getting Org-Crypt to work (doc bug?)
> 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,
Re: Getting Org-Crypt to work (doc bug?)
Hi David, * David Masterson [2020-09-13; 17:11]: > Yes, gpg-agent is installed and appears to have been started in > background. My O/S is Debian on a Chromebook. > > I start Emacs via 'xterm -e emacs' and just noticed (thanks to you) that > I'm getting a textual popup on the xterm asking for the > passphrase. Given that, everything works. > > So, you're saying that the textual popup is the correct mechanism for > getting the passphrase? That's one possible way. If you want to have a graphical dialog box, check which pinentry packages are installed: $ dpkg -l '*pinentry*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ NameVersion Architecture Description +++-===---== un pinentry (no description available) ii pinentry-curses 1.1.0-2 amd64curses-based PIN or pass-phrase entry dialog for GnuPG ii pinentry-doc1.1.0-2 all documentation for pinentry packages un pinentry-gnome3 (no description available) un pinentry-gtk2 (no description available) ii pinentry-qt 1.1.0-2 amd64Qt-based PIN or pass-phrase entry dialog for GnuPG un pinentry-qt4 (no description available) un pinentry-x11 (no description available) as you see, at my system, there are two pinentry packages installed (besides the docs): pinentry-curses for terminal while pinentry-qt provides a graphical dialog box. I choose pinentry-qt, because it had fewer dependencies and was smaller than the other options. If your system lacks a graphical pinentry, install one. Ciao; Gregor -- -... --- .-. . -.. ..--.. ...-.-
Re: Getting Org-Crypt to work (doc bug?)
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
Re: Getting Org-Crypt to work (doc bug?)
Gregor Zattler writes: > Hi David, > * David Masterson [2020-09-12; 19:09]: >> 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? > > I assume it waits for a passphrase. Do you have gpg-agent > installed? What is your operating system? Yes, gpg-agent is installed and appears to have been started in background. My O/S is Debian on a Chromebook. I start Emacs via 'xterm -e emacs' and just noticed (thanks to you) that I'm getting a textual popup on the xterm asking for the passphrase. Given that, everything works. So, you're saying that the textual popup is the correct mechanism for getting the passphrase? -- David Masterson
Re: Getting Org-Crypt to work (doc bug?)
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: --8<---cut here---start->8--- * Test :crypt: This is crypted. # Local Variables: # org-crypt-key: nil # End: --8<---cut here---end--->8--- 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. Regards, -- Nicolas Goaziou
Re: Getting Org-Crypt to work (doc bug?)
Hi David, * David Masterson [2020-09-12; 19:09]: > 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? I assume it waits for a passphrase. Do you have gpg-agent installed? What is your operating system? Ciao; Gregor -- -... --- .-. . -.. ..--.. ...-.-