From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.bugs Subject: Re: Fwd: fill-paragraph puts one useless blank at the end of many Chinese big5 lines Date: Tue, 22 Apr 2003 15:56:36 +0900 (JST) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200304220656.PAA02651@etlken.m17n.org> References: <200304211502.h3LF2uFT029217@rum.cs.yale.edu> <87ist78n65.fsf@jidanni.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 1050995078 10743 80.91.224.249 (22 Apr 2003 07:04:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2003 07:04:38 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 22 09:04:36 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 197rpU-0002n9-00 for ; Tue, 22 Apr 2003 09:04:36 +0200 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 197rpi-0006yl-00 for gnu-bug-gnu-emacs@m.gmane.org; Tue, 22 Apr 2003 03:04:50 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 197rpK-0006pi-00 for bug-gnu-emacs@gnu.org; Tue, 22 Apr 2003 03:04:26 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 197rpH-0006hx-00 for bug-gnu-emacs@gnu.org; Tue, 22 Apr 2003 03:04:25 -0400 Original-Received: from tsukuba.m17n.org ([192.47.44.130]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 197rpG-0006Uv-00; Tue, 22 Apr 2003 03:04:22 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2])h3M6ubo22359; Tue, 22 Apr 2003 15:56:37 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) h3M6uaA12308; Tue, 22 Apr 2003 15:56:36 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id PAA02651; Tue, 22 Apr 2003 15:56:36 +0900 (JST) Original-To: jidanni@dman.ddts.net In-reply-to: <87ist78n65.fsf@jidanni.org> (message from Dan Jacobson on Tue, 22 Apr 2003 07:07:30 +0800) 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) Original-cc: rms@gnu.org Original-cc: bug-gnu-emacs@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:4868 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:4868 In article <87ist78n65.fsf@jidanni.org>, Dan Jacobson writes: >>>>>> "S" == Stefan Monnier writes: >>> fill-paragraph puts one useless blank at the end of many of these >>> Chinese big5 lines here in locale zh_TW.Big5 when I set fill-column to >>> 16 or 17 etc. I uuencoded the sample input: S> It's done on purpose (in fill-newline): S> (if (and (= (following-char) ?\ ) S> (or (aref (char-category-set (preceding-char)) ?|) S> (looking-at "[ \t]+\\c|"))) S> ;; We need one space at end of line so that S> ;; further filling won't delete it. NOTE: We S> ;; intentionally leave this one space to S> ;; distinguish the case that user wants to put S> ;; space between \c| characters. S> (forward-char 1)) > Well, whatever... except that I now see them with (setq-default > show-trailing-whitespace t) and my thrifty genes say they must go. > Plus it's not very environmentally conscious [uses disk space]. And, > it may very well have effects beyond what you thought. And, if I must > clean it up afterwards, you should do it for me before I see it. And, > it looks sloppy. Perhaps, by adding some text property to such newlines that replaces white spaces between \c| characters, we can avoid leaving those spaces. Stefan, what do you think? Currently I myself don't have a time to work on fill.el (it seems that the file has been widely changed since I wrote the above code). Could you work on it? Otherwise, I'll put this matter in my TODO list. --- Ken'ichi HANDA handa@m17n.org