[PATCH] Add inside-Emacs mode to GUI pinentry programs

Neal H. Walfield neal at walfield.org
Tue Jun 16 13:15:04 CEST 2015


At Mon, 15 Jun 2015 12:15:51 +0900,
Daiki Ueno wrote:
> 
> From 3a4e67b768f232b31843e1a2e1441ae78cebbc18 Mon Sep 17 00:00:00 2001
> From: Daiki Ueno <ueno at gnu.org>
> Date: Mon, 15 Jun 2015 12:04:01 +0900
> Subject: [PATCH] agent: Unset INSIDE_EMACS on gpg-agent startup
> 
> * agent/gpg-agent.c (main): Unset INSIDE_EMACS envvar.
> 
> --
> 
> The variable is set only temporarily when gpg is called from Emacs,
> keeping it during the session makes no sense.
> 
> Signed-off-by: Daiki Ueno <ueno at gnu.org>
> ---
>  agent/gpg-agent.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
> index e721d8a..9430bb1 100644
> --- a/agent/gpg-agent.c
> +++ b/agent/gpg-agent.c
> @@ -1172,6 +1172,12 @@ main (int argc, char **argv )
>          gnupg_unsetenv ("DISPLAY");
>  #endif
>  
> +      /* Remove the INSIDE_EMACS variable so that a pinentry does not
> +         always try to interact with Emacs.  */
> +#ifndef HAVE_W32_SYSTEM
> +      gnupg_unsetenv ("INSIDE_EMACS");
> +#endif
> +

This clears it when gpg-agent is in regular server mode.  What about
pipe server mode?

Thanks,

:) Neal



More information about the Gnupg-devel mailing list