From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: Emacs-diffs Digest, Vol 2, Issue 28 Date: Tue, 28 Jan 2003 09:32:54 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200301280032.JAA15601@etlken.m17n.org> References: <200301200152.KAA16258@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: main.gmane.org 1043713997 30800 80.91.224.249 (28 Jan 2003 00:33:17 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2003 00:33:17 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18dJgh-00080d-00 for ; Tue, 28 Jan 2003 01:33:15 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18dJl8-0002XE-00 for ; Tue, 28 Jan 2003 01:37:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dJhC-0004sl-06 for emacs-devel@quimby.gnus.org; Mon, 27 Jan 2003 19:33:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18dJgT-0004jS-00 for emacs-devel@gnu.org; Mon, 27 Jan 2003 19:33:01 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18dJgR-0004gc-00 for emacs-devel@gnu.org; Mon, 27 Jan 2003 19:33:00 -0500 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18dJgP-0004Vd-00; Mon, 27 Jan 2003 19:32:57 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h0S0Wsk29800; Tue, 28 Jan 2003 09:32:54 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h0S0WsR22873; Tue, 28 Jan 2003 09:32:54 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA15601; Tue, 28 Jan 2003 09:32:54 +0900 (JST) Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 21 Jan 2003 13:18:25 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:11150 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11150 In article , Richard Stallman writes: > [...] > * process.c (read_process_output): Decide the multibyteness of > string given to a process filter by a coding system used for > decoding the process output. > But, I don't remeber the detail now. > set-process-multibyte should be a good solution. I think we have extrapolated the behaviour of process I/O from that of file I/O. But set-process-multibyte breaks it. It's something like declaring the multibyteness of a process but we don't declare that of a file. So it's not easy to extrapolate the exact semantics of set-process-multibyte. It is fairly clear for the case that a process has a fileter and coding system is no-conversion or raw-text. But what to do with the other coding systems (e.g. Latin-1, iso-2022-jp). If a process is unibyte, what kind of string, the filter should get? Should we suppress a text decoding like the case of inserting a file into a unibyte buffer? And if the process has no filter but has a buffer, what to do for a unibyte process that has a multibyte buffer, or for a multibyte process that has a unibyte buffer? And what to do with process-send-string/region. I think it is better to keep extrapolating the behaviour of process reading/sending from file reading/writing. For inserting a proecss output in a buffer, there's no difficulty to extrapolate the behaviour. For a filter, although we don't have a function something like string-from-file, the most resembling code will be this. (with-temp-buffer (insert-file-contents FILE) (buffer-string)) A string given to a process filter must be the same as the result of that code, which means that default-enable-multibyte-characters decides the multibyteness, and if it is nil, character conversion except for end-of-line conversion is suppressed. The only question is when to check default-enable-multibyte-characters. When a process is created, or just before calling a filter? I think the former is more like file I/O. And it may be ok to have a function set-process-filter-multibyte which can change the multibyteness of a string to a filter on the way. Or, was the intention of set-process-multibyte actually set-process-filter-multibyte? --- Ken'ichi HANDA handa@m17n.org