Jameson Graef Rollins <jrollins@finestructure.net> writes: > I will argue that the "use-agent" option should be enabled. If we force > use of gpg-agent, then we don't allow people to opt out of using it. > That's not very user friendly, particularly if someone has not enabled > it for a specific reason. But right now we force people to enable the agent globally via use-agent if they want to decrypt mail in notmuch-cli/emacs. The proposed change allows them to use the agent only for notmuch. > But I think more to the point we need a little bit of due diligence of > the effects of this before we enable it. What happens if gpg-agent is > not available? What happens if there is no X session? Tests that probe > the various circumstances would be useful. I don't think we should directly care about the presence of an X session or not; the agent protocol doesn't depend on how the agent was started afaik. > I do note, though, that the error messages are not very useful. It > would be nice if could figure out that the decryption failed because of > lack of agent and inform the user of that. Yes, it would be nice to detect a missing/non-responsive agent. And that could be used by tests. > We should probably also update the show man page to make explicit that > an agent may be required. We probably need to word it more strongly than that. If the user wants decryption then notmuch requires an agent; if they want encryption or signing then message-mode (really probably easypg) requires an agent. I'm not sure how it manages it, but according to Jani's experiments it seems that message mode already uses the agent independently of the user's config; perhaps via the '--use-agent' argument to gpg. So the current situation is unfortunately asymmetric. Of course it would help if there was documentation for the emacs interface that we could update.