emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jka-compr.el doesn't recognise gzipped files from their magic bytes


From: Stephen J. Turnbull
Subject: Re: jka-compr.el doesn't recognise gzipped files from their magic bytes
Date: Wed, 19 Sep 2007 12:55:50 +0900

Eli Zaretskii writes:

 > > From: "Stephen J. Turnbull" <address@hidden>
 > > Cc: address@hidden,
 > >     address@hidden
 > > 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]