From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61235 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Behaviour of flow-fill before signature Date: Thu, 27 Oct 2005 14:23:30 +0200 Message-ID: References: <2n64rlcrvo.fsf@ccfs1.fuw.edu.pl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130416052 18390 80.91.229.2 (27 Oct 2005 12:27:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2005 12:27:32 +0000 (UTC) Original-X-From: ding-owner+m9765@lists.math.uh.edu Thu Oct 27 14:27:30 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EV6q6-0005c8-PH for ding-account@gmane.org; Thu, 27 Oct 2005 14:26:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EV6q2-0006Di-00; Thu, 27 Oct 2005 07:26:34 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EV6nI-0006Dd-00 for ding@lists.math.uh.edu; Thu, 27 Oct 2005 07:23:44 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EV6nF-00025K-9U for ding@lists.math.uh.edu; Thu, 27 Oct 2005 07:23:44 -0500 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EV6n9-0000eC-00 for ; Thu, 27 Oct 2005 14:23:35 +0200 Original-Received: from latte.josefsson.org (c494102a.s-bi.bostream.se [217.215.27.65]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3) with ESMTP id j9RCNVCl001867 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 Oct 2005 14:23:32 +0200 Original-To: ding@gnus.org OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:051027:ding@gnus.org::TceLpSJv1rYnL3iK:42mj In-Reply-To: (Reiner Steib's message of "Thu, 27 Oct 2005 12:30:49 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on yxa-iv X-Virus-Scanned: ClamAV version 0.84, clamav-milter version 0.84e on yxa.extundo.com X-Virus-Status: Clean X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61235 Archived-At: Reiner Steib writes: > On Wed, Oct 26 2005, Simon Josefsson wrote: > >> However, this should be fixed in CVS, both for Gnus 5.10 and No Gnus, so an >> upgrade should solve the problem. > > Beside the point-at-[be]ol stuff (required for compatibility with old > Emacsen), there is this diff: > > --- v5-10/lisp/flow-fill.el 2005-08-26 15:41:39.000000000 +0200 > +++ No/lisp/flow-fill.el 2005-10-26 11:27:06.000000000 +0200 > @@ -113,6 +102,11 @@ > (save-excursion > (set-buffer (or (current-buffer) buffer)) > (goto-char (point-min)) > + ;; Remove space stuffing. > + (while (re-search-forward "^ " nil t) > + (delete-char -1) > + (forward-line 1)) > + (goto-char (point-min)) > (while (re-search-forward " $" nil t) > (when (save-excursion > (beginning-of-line) > > Should it be added to Gnus 5.10 too? I think that patch is incorrect -- according to RFC 3767, space stuffing should be done after checking for quoting. I don't see a simple way to fix this though, right now the 5.10 logic is a bit backwards, in that it searches for flowed lines first and then for quoting on those lines. So it may miss space stuffing on fixed lines. I don't have time to work out the code properly right now, but if someone would like to read RFC 3767 and construct examples for all corner cases, that would really help. It is difficult to modify the algorithm without accidentally cause regressions. Making a test harness from the examples is the next step (there is one example and very simple test harness in flow-fill.el now). After that, tinkering with the algorithm is much simpler. So I don't care strongly whether 5.10 has this patch or not, as the code appear slightly broken regardless.