From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: filling bug in text-mode Date: Sat, 08 Oct 2005 00:52:52 +0300 Organization: JURTA Message-ID: <878xx5m16r.fsf@jurta.org> References: <20051005.224026.229265335.wl@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1128725836 25758 80.91.229.2 (7 Oct 2005 22:57:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Oct 2005 22:57:16 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 08 00:57:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EO187-0007ZY-8y for ged-emacs-devel@m.gmane.org; Sat, 08 Oct 2005 00:55:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EO13W-00064w-VK for ged-emacs-devel@m.gmane.org; Fri, 07 Oct 2005 18:51:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EO0yU-0002wR-L1 for emacs-devel@gnu.org; Fri, 07 Oct 2005 18:45:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EO0yR-0002tK-Tl for emacs-devel@gnu.org; Fri, 07 Oct 2005 18:45:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EO0yQ-0002sf-Kr for emacs-devel@gnu.org; Fri, 07 Oct 2005 18:45:54 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EO0yH-00089E-TS; Fri, 07 Oct 2005 18:45:46 -0400 Original-Received: from mail.neti.ee (80-235-37-160-dsl.mus.estpak.ee [80.235.37.160]) by Relayhost1.neti.ee (Postfix) with ESMTP id 4D33E1B9C; Sat, 8 Oct 2005 01:45:57 +0300 (EEST) Original-To: Werner LEMBERG In-Reply-To: <20051005.224026.229265335.wl@gnu.org> (Werner LEMBERG's message of "Wed, 05 Oct 2005 22:40:26 +0200 (CEST)") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:43665 Archived-At: > Consider the following text in text-mode: > ---- > It's not necessary to buy a new computer just for a DVD > drive... Today, the most important part of a computer is the amount > of RAM -- the more, the better. It's far more important than a fast > CPU. > ---- > Now set the column width to 70 chars and execute `fill-paragraph' -- > the string `drive...' should be moved to the first line, since the > last period is followed by two spaces, but nothing happens. Why? > This looks like a bug to me. I looked into this bug. It is caused by `sentence-end' not matching the sentence ending with three periods. The second rule in `fill-nobreak-p': ;; Another approach to the same problem. (save-excursion (skip-chars-backward ". ") (and (looking-at "\\.") (not (looking-at (sentence-end))))) tries to match the end of the sentence, but fails. One solution is to fix the regexp in `sentence-end' to match three periods. However, this might have an undesirable effect in other places. A more localized fix is to change the rule above to skip only one period backward before trying to match the sentence end. -- Juri Linkov http://www.jurta.org/emacs/