Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: Behaviour of flow-fill before signature
Date: Thu, 27 Oct 2005 14:23:30 +0200	[thread overview]
Message-ID: <ilur7a7i1x9.fsf@latte.josefsson.org> (raw)
In-Reply-To: <v98xwf1cbq.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Thu, 27 Oct 2005 12:30:49 +0200")

Reiner Steib <reinersteib+gmane@imap.cc> 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.



      reply	other threads:[~2005-10-27 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 19:34 Michal Jankowski
2005-10-26  9:13 ` Simon Josefsson
2005-10-27 10:30   ` Reiner Steib
2005-10-27 12:23     ` Simon Josefsson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ilur7a7i1x9.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).