Subject: bug#40248: 27.0.90; Failure open .authinfo.gpg from Gnus

From: Eli Zaretskii <[email-masked]>
Date: Sun, 29 Mar 2020 16:49:03 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Sun, 29 Mar 2020 09:45:55 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > But then only the encoding of the network process started by
> > nnimap-open-connection-1 should be made no-conversion.
> 
> I'm not sure I quite follow; if I misunderstand, I apologise:
> 
> Do you mean as a :coding parameter to make-network-process?
> nnimap-open-connection-1 doesn't call that function directly, and the
> functions it does call doesn't take any :coding parameters.

We could extend open-network-stream to accept :coding and pass that to
make-network-process.  Or we could call set-process-coding-system
right after open-network-stream returns.

> > By contrast, binding coding-system-for-* around the call to
> > open-network-stream has much wider consequences, as it affects _any_
> > code run as part of open-network-stream, in particularly
> > epg-find-configuration, which has nothing to do with the network
> > stream.
> 
> Yes, that's unfortunate -- the "bind variables as a way of passing in
> parameters" thing that Emacs does a lot is a really bad one.  I think
> the fix here would be to change open-network-stream, at least, to have a
> :coding parameter (and pass it on).

Yes, let's do that on master.