Subject: bug#75840: 31.0.50; epg

From: Eli Zaretskii <[email-masked]>
Date: Sun, 26 Jan 2025 14:22:09 +0200

> From: Richard Stallman <[email-masked]>
> Date: Sat, 25 Jan 2025 15:36:06 -0500
> 
> 
> I ran an Emacs command that invokes gpg, and it hung.
> It hung long enough that I concluded somehing was wrong.,
> and ytuped C-g.  I tried again and got similar resilt.
> I had no idea why encryption could do this.
> 
> Eentually I tried running gpg from a shell,.
> It thought for a long time and then ouput stuff
> about a trustdb check.  Since then gpg does not hang any more.
> I surmise that there was nothing actually broken, only
> the trustdb check took a long time.
> 
> I suggest changing Emacs to display `GPG is checking trustdb...'
> around that, so users won't get alarmed.

Please tell which command you invoked.  If you happen to know which
function checks the trustdb and hung, that would be even more helpful.
I almost never use epg and am not familiar with its code, and I don't
think we have epg experts on board to ask them to look into this.  So
I need every possible help from you to find the place where such a
message would be useful.

> I expect this would be easly for people who have worked
> a lot on epa and or epg.  It would be useful to add
> comments that explain in one place the way Emacs handles
> communication with the unferior GPG, fo both output and input.
> With that centralized eplanation, others would be able to
> do this too.

I agree, but I'm not aware of anyone around who knows enough about epg
to produce such an explanation.  The code is quite convoluted and
studying it is not something I can afford, sorry.  Patches are
welcome, of course.