From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: set-process-filter-multibyte and etc. Date: Wed, 19 Feb 2003 17:27:10 -0800 (PST) Organization: Sony Electronics Inc. Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030219.172710.60851987.Takaaki.Ota@am.sony.com> References: <200301280032.JAA15601@etlken.m17n.org> <5xsmvdbgf7.fsf@kfs2.cua.dk> <200302100815.RAA04123@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1045704530 23615 80.91.224.249 (20 Feb 2003 01:28:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2003 01:28:50 +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 18lfW4-00068f-00 for ; Thu, 20 Feb 2003 02:28:48 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18lfjL-0001rm-00 for ; Thu, 20 Feb 2003 02:42:32 +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 18lfUt-0004oK-06 for emacs-devel@quimby.gnus.org; Wed, 19 Feb 2003 20:27:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18lfUa-0004iN-00 for emacs-devel@gnu.org; Wed, 19 Feb 2003 20:27:16 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18lfUY-0004eV-00 for emacs-devel@gnu.org; Wed, 19 Feb 2003 20:27:15 -0500 Original-Received: from mail2.fw-sj.sony.com ([160.33.82.69]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18lfUX-0004bq-00 for emacs-devel@gnu.org; Wed, 19 Feb 2003 20:27:13 -0500 Original-Received: from mail2.sjc.in.sel.sony.com (mail2.sjc.in.sel.sony.com [43.134.1.111]) by mail2.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id BAA07968; Thu, 20 Feb 2003 01:27:11 GMT Original-Received: by mail2.sjc.in.sel.sony.com id BAA14668; Thu, 20 Feb 2003 01:27:11 GMT Original-To: handa@m17n.org In-Reply-To: <200302100815.RAA04123@etlken.m17n.org> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew-3.2rc1 on Emacs-21.3.50.1 (i386-msvc-nt5.0.2195) of 2003-02-19 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:11782 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11782 2003-02-10 Kenichi Handa * process.c (QCfilter_multibyte): New variable. (setup_process_coding_systems): New function. setup_process_coding_systems should check the validity of inch and outch since they can be (-1) when the buffer is killed and setup_process_coding_systems is called downstream of exec_sentinel. Here is the actual case I encountered. EMACS! memset + 65 bytes setup_coding_system(int 0x114f893c, coding_system * 0x11377064) line 3401 + 22 bytes setup_process_coding_systems(int 0x41d41780) line 605 + 23 bytes Fset_process_buffer(int 0x41d41780, int 0x11342404) line 855 + 9 bytes Ffuncall(int 0x00000003, int * 0x0082f448) line 2744 + 25 bytes Fbyte_code(int 0x31bd5834, int 0x41beb580, int 0x00000004) line 709 + 16 bytes funcall_lambda(int 0x41b7a440, int 0x00000002, int * 0x0082f684) line 2929 + 43 bytes Ffuncall(int 0x00000003, int * 0x0082f680) line 2788 + 20 bytes Fapply(int 0x00000002, int * 0x0082f6cc) line 2247 + 13 bytes apply1(int 0x11b30894, int 0x51c8d95c) line 2500 + 11 bytes read_process_output_call() line 4374 + 29 bytes internal_condition_case_1(int (void)* 0x01050bfd read_process_output_call(void), int 0x51c8d954, int 0x1135c214, int (void)* 0x01052894 exec_sentinel_error_handler(void)) line 1392 + 7 bytes exec_sentinel() line 5971 + 98 bytes status_notify() line 6068 + 13 bytes wait_reading_process_input(int 0x0000001e, int 0x00000000, int 0x0fffffff, int 0x00000001) line 3939 sit_for(int 0x0000001e, int 0x00000000, int 0x00000001, int 0x00000001, int 0x00000000) line 6249 + 21 bytes read_char(int 0x00000001, int 0x00000003, int * 0x0082fa7c, int 0x11342404, int * 0x0082fbdc) line 2681 + 36 bytes read_key_sequence(int * 0x0082fd40, int 0x0000001e, int 0x11342404, int 0x00000000, int 0x00000001, int 0x00000001) line 8566 + 41 bytes command_loop_1() line 1492 + 27 bytes internal_condition_case(int (void)* 0x0101409f command_loop_1(void), int 0x1135c214, int (void)* 0x01013c71 cmd_error(void)) line 1351 + 3 bytes command_loop_2() line 1290 + 21 bytes internal_catch(int 0x113517c4, int (void)* 0x01013f67 command_loop_2(void), int 0x11342404) line 1112 + 7 bytes command_loop() line 1269 + 23 bytes recursive_edit_1() line 985 + 5 bytes Frecursive_edit() line 1042 main() line 1661 EMACS! mainCRTStartup + 180 bytes _start() line 136 KERNEL32! 77ea847c() -Tak Mon, 10 Feb 2003 17:15:16 +0900 (JST): Kenichi Handa wrote: > In article <5xsmvdbgf7.fsf@kfs2.cua.dk>, storm@cua.dk (Kim F. Storm) writes: > >> 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. > > > Good points. Also, there could be a new `:multibyte BOOL' argument to > > make-network-process to initialize the filter multibyteness of the new > > process; specifying this would override the setting of > > default-enable-multibyte-characters. > > >> Or, was the intention of set-process-multibyte actually > >> set-process-filter-multibyte? > > > At least, that was the problem I was looking at when I suggested it, > > so yes. > > I've just installed changes for set-process-filter-multibyte > and etc. I added the followings to etc/NEWS. Could people > please fix my English. > > --- > Ken'ichi HANDA > handa@m17n.org > > ** New function `set-process-filter-multibyte' sets the multibyteness > of a string given to a process's filter. > > ** New function `process-filter-multibyte-p' returns t if > a string given to a process's filter is multibyte. > > ** A filter function of a process is called with a multibyte string if > the filter's multibyteness is t. That multibyteness is decided by the > value of `default-enable-multibyte-characters' when the process is > created and can be changed later by `set-process-filter-multibyte'. > > ** If a process's coding system is raw-text or no-conversion and its > buffer is multibyte, the output of the process is at first converted > to multibyte by `string-to-multibyte' then inserted in the buffer. > Previously, it was converted to multibyte by `string-as-multibyte', > which was not compatible with the behaviour of file reading. > > ** New function `string-to-multibyte' converts a unibyte string to a > multibyte string with the same individual character codes. > > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel