Re: [PATCH] to improve the rendering of format=flowed quoted text -- new 1.5.5.1 version
Will Yardley found some problems with the previous version of this
patch: it did not apply the space-stuffing to replies as it was
supposed to. So here is the latest version.
Gary
--
Gary Johnson | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA
--- PATCHES.orig 2003-04-15 06:18:34.000000000 -0700
+++ PATCHES 2003-12-31 00:13:58.000000000 -0800
@@ -1,0 +1 @@
+patch-1.5.5.1.gj.stuff_all_quoted.3
--- handler.c.orig 2003-11-05 01:41:31.000000000 -0800
+++ handler.c 2004-02-23 03:21:10.000000000 -0800
@@ -919,9 +919,6 @@
static void flowed_stuff (STATE *s, char *cont, int level)
{
- if (!option (OPTTEXTFLOWED) && !(s->flags & M_DISPLAY))
- return;
-
if (s->flags & M_DISPLAY)
{
/*
@@ -931,7 +928,15 @@
*/
if (*cont && !level && !mutt_strcmp (Pager, "builtin") &&
flowed_maybe_quoted (cont))
state_puts ("\033[0m",s);
+
+ if (*cont && level && option (OPTSTUFFALLQUOTED))
+ state_putc (' ', s);
}
+ else if (option (OPTSTUFFALLQUOTED) && *cont &&
+ ((s->prefix && s->prefix[strlen(s->prefix) - 1] == ' ') ? level - 1
: level))
+ state_putc (' ', s);
+ else if (!option (OPTTEXTFLOWED))
+ return;
else if ((!(s->flags & M_PRINTING)) &&
((*cont == ' ') || (*cont == '>') || (!level && !mutt_strncmp (cont,
"From ", 5))))
state_putc (' ', s);
--- init.h.orig 2003-11-05 01:41:32.000000000 -0800
+++ init.h 2004-02-24 10:20:28.000000000 -0800
@@ -2492,6 +2492,18 @@
** personal mailbox where you might have several unrelated messages with
** the subject ``hi'' which will get grouped together.
*/
+ { "stuff_all_quoted", DT_BOOL, R_NONE, OPTSTUFFALLQUOTED, 0 },
+ /*
+ ** .pp
+ ** When set, mutt will space-stuff all non-empty quoted lines in
+ ** displayed and generated text/plain; format=flowed attachments, as
+ ** allowed by RFC 2646. That is, quoted lines will appear as "> text"
+ ** rather than ">text" when displayed and in replies and forwards.
+ ** This makes the quoting in format=flowed text easier to read and
+ ** more consistent with the quoting style traditionally used for
+ ** format=fixed text. When unset, mutt will space-stuff quoted lines
+ ** only as required by RFC 2646.
+ */
{ "suspend", DT_BOOL, R_NONE, OPTSUSPEND, 1 },
/*
** .pp
--- mutt.h.orig 2003-11-05 01:41:32.000000000 -0800
+++ mutt.h 2003-12-30 16:56:43.000000000 -0800
@@ -406,6 +406,7 @@
OPTSTATUSONTOP,
OPTSTRICTTHREADS,
OPTSUSPEND,
+ OPTSTUFFALLQUOTED,
OPTTEXTFLOWED,
OPTTHOROUGHSRC,
OPTTHREADRECEIVED,