From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: determining process coding Date: Fri, 13 Feb 2015 10:41:23 +0200 Message-ID: <83twyq430s.fsf@gnu.org> References: <87egpv5sxb.fsf@ericabrahamsen.net> <83r3tv5e1e.fsf@gnu.org> <87r3tu4esn.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1423816919 21989 80.91.229.3 (13 Feb 2015 08:41:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 13 Feb 2015 08:41:59 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Feb 13 09:41:45 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YMBom-00044D-Dg for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Feb 2015 09:41:44 +0100 Original-Received: from localhost ([::1]:53941 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBol-00022d-LC for geh-help-gnu-emacs@m.gmane.org; Fri, 13 Feb 2015 03:41:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44251) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBoa-00022K-7g for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 03:41:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMBoW-00011t-6X for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 03:41:32 -0500 Original-Received: from mtaout26.012.net.il ([80.179.55.182]:38166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMBoV-00011p-UQ for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 03:41:28 -0500 Original-Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NJP00800BURAV00@mtaout26.012.net.il> for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 10:41:38 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJP008F3C5EVQ10@mtaout26.012.net.il> for help-gnu-emacs@gnu.org; Fri, 13 Feb 2015 10:41:38 +0200 (IST) In-reply-to: <87r3tu4esn.fsf@ericabrahamsen.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.182 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102699 Archived-At: > From: Eric Abrahamsen > Date: Fri, 13 Feb 2015 12:27:04 +0800 > > Eli Zaretskii writes: > > >> From: Eric Abrahamsen > >> Date: Thu, 12 Feb 2015 18:24:16 +0800 > >> > >> Gnus opens a long-running connection to an IMAP server through a process > >> buffer, and while playing with the code, I tried (process-coding-system > >> (get-buffer-process (current-buffer))) while the IMAP buffer was > >> current, and it gave me (binary . binary). > > > > This probably means Gnus encodes text "by hand" before sending it. > > Look for encode-coding somewhere. > > It turns out that, in `nnimap-open-connection-1', Gnus explicitly lets > `coding-system-for-read|write' to 'binary. The actual connection is > created inside that let, with `open-protocol-stream' (aka > `make-network-stream'). That's expected. > I really don't see much else relevant to coding. Most commands are sent > with `nnimap-send-command', which simply runs: > > (process-send-string (get-buffer-process (current-buffer)) COMMAND) > > The only de|encoding I see going on is with IMAP folder names, with the > IMAP variant of UTF-7. Look in the places that create the strings which are then sent with nnimap-send-command. If they are encoded, they will be encoded where they are consed.