From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: jka-compr.el doesn't recognise gzipped files from their magic bytes Date: Wed, 19 Sep 2007 12:55:50 +0900 Message-ID: <877imnia0p.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87vea8wsqo.fsf@uwakimon.sk.tsukuba.ac.jp> <87tzpswmjm.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1190174127 5071 80.91.229.12 (19 Sep 2007 03:55:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Sep 2007 03:55:27 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, christopher.ian.moore@gmail.com To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 19 05:55:25 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IXqep-00064I-9W for ged-emacs-devel@m.gmane.org; Wed, 19 Sep 2007 05:55:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXqen-0006K0-PT for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2007 23:55:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IXqek-0006JF-Aq for emacs-devel@gnu.org; Tue, 18 Sep 2007 23:55:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IXqei-0006Gj-Bo for emacs-devel@gnu.org; Tue, 18 Sep 2007 23:55:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IXqei-0006GX-60 for emacs-devel@gnu.org; Tue, 18 Sep 2007 23:55:16 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IXqeh-0000xC-UD for emacs-devel@gnu.org; Tue, 18 Sep 2007 23:55:16 -0400 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IXqeA-0005Zv-BI for emacs-pretest-bug@gnu.org; Tue, 18 Sep 2007 23:54:42 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IXqee-0000ws-BH for emacs-pretest-bug@gnu.org; Tue, 18 Sep 2007 23:55:15 -0400 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IXqeY-0000vt-Un; Tue, 18 Sep 2007 23:55:07 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (unknown [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id A11B97FFA; Wed, 19 Sep 2007 12:55:04 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id BB3961A2E11; Wed, 19 Sep 2007 12:55:50 +0900 (JST) In-Reply-To: X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" (+CVS-20070621) XEmacs Lucid X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-Detected-Kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:79268 gmane.emacs.pretest.bugs:19930 Archived-At: Eli Zaretskii writes: > > From: "Stephen J. Turnbull" > > Cc: christopher.ian.moore@gmail.com, > > emacs-pretest-bug@gnu.org > > Date: Tue, 18 Sep 2007 14:49:17 +0900 > > > > Furthermore, there must be some scheme for buffering for process > > coding systems. > > I'm not sure what buffering you had in mind. AFAIK, Emacs reads into > a buffer whatever portion output of a process is available in the > OS-maintained pipe, decodes that portion, and passes the decoded text > to the filter or sentinel function. Decodes with what? is the question. If the process output coding system is nil, Emacs must "guess" what it is. This requires reading all of the input and collecting some "statistics about it", then making a decision about which coding system to use, and finally it *goes back to the beginning* and decodes according to that coding system. Which is exactly the situation we are describing here. There may be no buffer there that Emacs can access under normal circumstances, however, there is some mechanism that can be used by coding systems. For example, CCL could be used.