Simon Josefsson wrote: Hi Simon, first of all, fore some reasons you got lost from the list of CC's so you missed some important messages in this thread, including a more elaborated version of my patch... > 1) Non-agent mode didn't work at all (the args list contained 'nil' so > invoking gpg failed with a lisp error). Yes. This was fixed in my second patch. (and in the attached, of cause) > 2) After fixing the above, the patch made the passphrase be 't', which > broke the passphrase cache, causing a lisp error. Thanks, I used your strategy to fix this issue in my new patch (which I attached). > How about this patch instead? It works for me. I've also improved > the pgg-use-agent default value. This is very error prone. As I wrote before on emacs-devel: there are certain situations in which using the agent will fail -- even if it is available: for example: on an text console running the standard pin-entry program (which uses curses) from within emacs won't work. That's why I think this option should be explicitly enabled by the user. Another problem is, that checking for $GPG_AGENT_INFO is not sufficient, the environment variable will stay set, even is the agent was killed. Could you please consider committing the attached patch, which reverses the default of pgg-gpg-use-agent to nil, and adds an check if the agent is _really_ available, when pgg-gpg-use-agent is set to t? (The patch is against the latest CVS, including your patch that is) cheers sascha