Re: [O] emacs , windows, gpg, org-crypt

2018-03-29 Thread hymie!

Thank you!  Your suggestion led me to the answer.

In our last episode, the evil Dr. Lacto had captured our hero,
  Jonathan Leech-Pepin , who said:

> On 29 March 2018 at 09:59, hymie!  wrote:
>
>> Greetings.
>>
>> I set this all up years ago, I just got a new computer, I'm not an expert
>> with Windows, and I've been unable to find my problem with Google.
>>
>> I have Windows 10, I have emacs, I have Org 9.0.3 (yes, I need to update),
>> and I have GPG4Win.  I have entries in my .emacs file:

I missed the most important entry in my .emacs file:
  (setq exec-path '("C:\\Program Files (x86)\\GNU\\GnuPG"))

The file path has changed on my new computer
  (setq exec-path '("C:\\Program Files (x86)\\GnuPG\\bin"))

and now gpg.exe is in emacs's local exec-path.

> I'd take a look at ~C-h v -gpg TAB~ -> possible suggestion is
> epg-gpg-program which points to "gpg" by default.

This was the variable I couldn't figure out.  TIL that you can tab-complete
in the middle of a variable too.

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] emacs , windows, gpg, org-crypt

2018-03-29 Thread Jonathan Leech-Pepin
On 29 March 2018 at 09:59, hymie!  wrote:

> Greetings.
>
> I set this all up years ago, I just got a new computer, I'm not an expert
> with Windows, and I've been unable to find my problem with Google.
>
> I have Windows 10, I have emacs, I have Org 9.0.3 (yes, I need to update),
> and I have GPG4Win.  I have entries in my .emacs file:
>
>  (require 'org-crypt)
>  (org-crypt-use-before-save-magic)
>  (setq org-tags-exclude-from-inheritance (quote ("crypt")))
>  [...]
>  (setq org-crypt-key "")
>;; GPG key to use for encryption
>  [...]
>  (global-set-key "\C-cd" 'org-decrypt-entry)
>  (global-set-key "\C-ce" 'org-encrypt-entry)
>
> But when I try to decrypt something, I get this error:
>
>   Searching for program: no such file or directory, gpg
>
> The only responses I can find are to add gpg to my %PATH% , but
> I don't think my employer's GPO will let me.


There is a machine/system %PATH% and a Current User %PATH%.
Normally GPOs will block you from modifying the system %PATH% but
allow you to change the User Path.  This may be an option.

I was hoping to find a place in org-crypt where "gpg" is defined so that
> I can specify a full path instead, but as yet, I haven't found it.


I'd take a look at ~C-h v -gpg TAB~ -> possible suggestion is
epg-gpg-program which points to "gpg" by default.
~org-encrypt-string~ uses epg for encryption purposes so changing
that program path should fix the issue.

--
Jon


> Can somebody give me a push?
>
> --hymie! http://lactose.homelinux.net/~hymie
> hy...@lactose.homelinux.net
>
>
>


Re: [O] emacs , windows, gpg, org-crypt

2018-03-29 Thread Adonay Felipe Nogueira
> The only responses I can find are to add gpg to my %PATH% , but

That's the most recommended way.

> I don't think my employer's GPO will let me.

That's very limitting indeed. In various GNU+Linux system distributions,
even the user-friendly ones such as Trisquel ([1]), allow each user to
have their own ${PATH}.

I cannot help you on solving Windows only-issues (not to be confused
with: Emacs or Org mode issues manifested in Windows), so I suggest you
to install a free/libre system distribution such as Trisquel ([1])
instead.

[1] .

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.



[O] emacs , windows, gpg, org-crypt

2018-03-29 Thread hymie!
Greetings.

I set this all up years ago, I just got a new computer, I'm not an expert
with Windows, and I've been unable to find my problem with Google.

I have Windows 10, I have emacs, I have Org 9.0.3 (yes, I need to update),
and I have GPG4Win.  I have entries in my .emacs file:

 (require 'org-crypt)
 (org-crypt-use-before-save-magic)
 (setq org-tags-exclude-from-inheritance (quote ("crypt")))
 [...]
 (setq org-crypt-key "")
   ;; GPG key to use for encryption
 [...]
 (global-set-key "\C-cd" 'org-decrypt-entry)
 (global-set-key "\C-ce" 'org-encrypt-entry)

But when I try to decrypt something, I get this error:

  Searching for program: no such file or directory, gpg

The only responses I can find are to add gpg to my %PATH% , but
I don't think my employer's GPO will let me.

I was hoping to find a place in org-crypt where "gpg" is defined so that
I can specify a full path instead, but as yet, I haven't found it.

Can somebody give me a push?

--hymie! http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net