From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: How to create a derived encoding? Date: Tue, 12 Oct 2004 23:02:38 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1097618100 20362 80.91.229.6 (12 Oct 2004 21:55:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Oct 2004 21:55:00 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 12 23:54:49 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CHUbY-0000BC-00 for ; Tue, 12 Oct 2004 23:54:49 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHUiZ-0007eA-JQ for ged-emacs-devel@m.gmane.org; Tue, 12 Oct 2004 18:02:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CHUiH-0007aH-Gv for emacs-devel@gnu.org; Tue, 12 Oct 2004 18:01:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CHUiG-0007Zl-Da for emacs-devel@gnu.org; Tue, 12 Oct 2004 18:01:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CHUiG-0007Zf-5w for emacs-devel@gnu.org; Tue, 12 Oct 2004 18:01:44 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CHUb0-0000mM-Fb for emacs-devel@gnu.org; Tue, 12 Oct 2004 17:54:15 -0400 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CHTn5-0006aE-VN; Tue, 12 Oct 2004 17:02:40 -0400 Original-To: Stefan Monnier In-Reply-To: (Stefan Monnier's message of "Tue, 12 Oct 2004 12:23:10 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28319 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28319 Stefan Monnier writes: >>> 1 - assume the raw TeX output with its funny quoted bytes is in the >>> current temp buffer. The buffer is in unibyte mode. > >> No good. We are talking about process output that is accumulating in >> a buffer. We can't just let everything trickle in in raw mode since >> the buffer may be interactive and so we need to have more or less >> accurate stuff at each point of time. > > That's OK. This assumption is not important. You can do the > decoding in the process filter, or anywhere else. > >>> 3 - call decode-coding-region with the appropriate coding system. >>> 4 - set the buffer to multibyte. > >> The buffer comes into being incrementally. > > There can be several buffers. Remember in point 1 I said "temp buffer". > And I'm sue it can be all done within a multibyte buffer if necessary. > >>> If the step number 2 is too slow, you can most likely implement a >>> CCL program that does it faster. > >> Well, that was what I was asking about. And how to let this CCL >> program run prefixed to the normal process output decoding program. > > You can run a CCL program independently from any coding system. Well, I can hardly run it manually _before_ the process decoding stuff. And if I run it in the filter function, it has to deal with partial characters at the end of the string. And the utf-8 decoding after it also has to deal with partial characters at the end of the string, which is normally done by the process filter. And of course the most challenging bit is that I have no clue whatsoever about CCL programs. Not to mention that I hope that XEmacs Mule will work just the same, but that's a different distraction. If it doesn't, I'll whine on the respective lists until it does. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum