[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#40248: 27.0.90; Failure open .authinfo.gpg from Gnus
From: |
Robert Pluim |
Subject: |
Re: bug#40248: 27.0.90; Failure open .authinfo.gpg from Gnus |
Date: |
Tue, 31 Mar 2020 13:09:14 +0200 |
>>>>> On Tue, 31 Mar 2020 12:31:04 +0200, Andreas Schwab <address@hidden> said:
Andreas> On Mär 31 2020, Robert Pluim wrote:
>> My reading of set_network_socket_coding_system is that having a plist
>> in make-network-process with :coding nil overrides a non-nil
>> coding-system-for-{read-write}, which I donʼt think we want.
Andreas> You are right, make-network-process and make-serial-process handle
that
Andreas> differently than make-process and make-pipe-process. I think this
is a
Andreas> bug, they should all handle :coding nil the same (same as absence).
I think I agree with that. Basically this, initially (and the same for
make-serial-process)
diff --git a/src/process.c b/src/process.c
index e18a5aa538..b00d8e1cfe 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3261,9 +3262,7 @@ set_network_socket_coding_system (Lisp_Object proc,
Lisp_Object host,
Lisp_Object coding_systems = Qt;
Lisp_Object val;
- tem = Fplist_member (contact, QCcoding);
- if (!NILP (tem) && (!CONSP (tem) || !CONSP (XCDR (tem))))
- tem = Qnil; /* No error message (too late!). */
+ tem = Fplist_get (contact, QCcoding);
/* Setup coding systems for communicating with the network stream. */
/* Qt denotes we have not yet called Ffind_operation_coding_system. */
Andreas> But in any case, your patch can be simplyfied:
Andreas> --- a/lisp/net/network-stream.el
Andreas> +++ b/lisp/net/network-stream.el
Andreas> @@ -246,10 +246,12 @@ gnutls-boot (as returned by
`gnutls-boot-parameters')."
Andreas> (defun network-stream-open-plain (name buffer host service
parameters)
Andreas> (let ((start (with-current-buffer buffer (point)))
Andreas> - (stream (make-network-process :name name :buffer buffer
Andreas> - :host (puny-encode-domain host)
Andreas> - :service service
Andreas> - :nowait (plist-get parameters
:nowait))))
Andreas> + (stream (apply #'make-network-process :name name :buffer buffer
Andreas> + :host (puny-encode-domain host)
Andreas> + :service service
Andreas> + :nowait (plist-get parameters :nowait)
Andreas> + (if (plist-member parameters :coding)
Andreas> + (list :coding (plist-get parameters
:coding))))))
Andreas> (when (plist-get parameters :warn-unless-encrypted)
Andreas> (setq stream (nsm-verify-connection stream host service nil
t)))
Andreas> (list stream
Sure.
Robert