From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Herbert Euler" Newsgroups: gmane.emacs.devel Subject: Problem of auto-fill-mode for wide character Date: Sat, 17 Dec 2005 23:58:44 +0800 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: sea.gmane.org 1134835593 20903 80.91.229.2 (17 Dec 2005 16:06:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 17 Dec 2005 16:06:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 17 17:06:30 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EneYV-0002vU-G1 for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2005 17:05:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EneZF-00088M-JH for ged-emacs-devel@m.gmane.org; Sat, 17 Dec 2005 11:05:53 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EneUe-0006n2-VQ for emacs-devel@gnu.org; Sat, 17 Dec 2005 11:01:09 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EneUc-0006lX-M0 for emacs-devel@gnu.org; Sat, 17 Dec 2005 11:01:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EneUZ-0006lE-LO for emacs-devel@gnu.org; Sat, 17 Dec 2005 11:01:05 -0500 Original-Received: from [64.4.19.45] (helo=hotmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EneXC-0004iG-1Z for emacs-devel@gnu.org; Sat, 17 Dec 2005 11:03:46 -0500 Original-Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 17 Dec 2005 07:58:44 -0800 Original-Received: from 64.4.19.200 by by109fd.bay109.hotmail.msn.com with HTTP; Sat, 17 Dec 2005 15:58:44 GMT X-Originating-IP: [221.216.146.98] X-Originating-Email: [herberteuler@hotmail.com] X-Sender: herberteuler@hotmail.com Original-To: emacs-devel@gnu.org X-OriginalArrivalTime: 17 Dec 2005 15:58:44.0747 (UTC) FILETIME=[C222CDB0:01C60322] 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:47954 Archived-At: Hello everyone, I'm very happy to see that Emacs supports Unicode internally, but there is a problem in auto-fill-mode with this modification. I'm going to explain why I think it's because of Unicode support. In Emacs 21, some wide characters, such as Chinese characters, are inserted with the command 'encoded-kbd-self-insert-iso2022 -8bit'. This makes it different from inserting command for ASCII characters, which are insterted with 'self-insert-command'. Auto- fill-mode works fine in this way (although I don't know about the detail); if one inputs more Chinese characters beyond 'current -fill-column', these Chinese characters will be moved to the next line automatically. Perhaps it's because Chinese characters are inserted with 'encoded-kbd-self-insert-iso2022-8bit' other than 'self-insert-command'. In the current Unicode 2 branch, Chinese characters are inserted with the command 'self-insert-command' as ASCII characters. This makes auto-fill in Chinese like other languages such as English, since "in Auto Fill mode, lines are broken automatically _at spaces_ when they get longer than the desired width". This is good to languages in which words are separated with spaces, but at least it's not appropriate for Chinese, because there are _no_ spaces between Chinese characters. So one can force Emacs auto-fill either by inserting spaces or by pressing M-q to invoke 'fill-paragraph', both of them is not "natural" in Chinese editing. Is my understanding correct? Could somebody help solve this problem? Thanks. Regards, Guanpeng Xu _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/