From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: determining process coding Date: Wed, 18 Feb 2015 11:49:02 +0800 Message-ID: <8761az98wh.fsf@ericabrahamsen.net> References: <87egpv5sxb.fsf@ericabrahamsen.net> <83r3tv5e1e.fsf@gnu.org> <87r3tu4esn.fsf@ericabrahamsen.net> <83twyq430s.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424232484 32540 80.91.229.3 (18 Feb 2015 04:08:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Feb 2015 04:08:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 18 05:07:47 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 1YNvvL-0006MF-Qj for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Feb 2015 05:07:43 +0100 Original-Received: from localhost ([::1]:48289 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNvvL-0008W7-2C for geh-help-gnu-emacs@m.gmane.org; Tue, 17 Feb 2015 23:07:43 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNvvA-0008W1-MH for help-gnu-emacs@gnu.org; Tue, 17 Feb 2015 23:07:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNvv7-0000O8-Gf for help-gnu-emacs@gnu.org; Tue, 17 Feb 2015 23:07:32 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:48362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNvv7-0000O3-9g for help-gnu-emacs@gnu.org; Tue, 17 Feb 2015 23:07:29 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YNvv6-0006Ip-5e for help-gnu-emacs@gnu.org; Wed, 18 Feb 2015 05:07:28 +0100 Original-Received: from 111.197.155.109 ([111.197.155.109]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Feb 2015 05:07:28 +0100 Original-Received: from eric by 111.197.155.109 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 18 Feb 2015 05:07:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 45 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 111.197.155.109 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:yYxrLpZDFSwKEav4yT+wmGiJDJ0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:102780 Archived-At: Eli Zaretskii writes: >> 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. I'm feeling dense here, but really not seeing anything. All the strings are just fed to `nnimap-send-command' as they are. If I'm not wrong about that, what's the most reliable way to figure out what encoding will end up getting used when talking to the server? Thanks again, Eric