<<< Date Index >>>     <<< Thread Index >>>

[PATCH] to improve the rendering of format=flowed quoted text



Attached is a patch for mutt-1.4i to improve the rendering of
format=flowed quoted text by space-stuffing all quoted lines.  This
makes the quoting of format=flowed text more consistent with the
quoting style traditionally used for format=fixed text and makes the
quoted text recognizable by the default 'quote_regexp'.  This
behavior is controlled by a new boolean option, 'stuff_all_quoted'.
When unset (the default), mutt's behavior is the same as without the
patch.

Gary

-- 
Gary Johnson                               | Agilent Technologies
garyjohn@xxxxxxxxxxxxxxx                   | Wireless Division
http://www.spocom.com/users/gjohnson/mutt/ | Spokane, Washington, USA
--- PATCHES.orig        2003-02-25 07:06:57.000000000 -0800
+++ PATCHES     2003-12-28 02:33:50.000000000 -0800
@@ -1,0 +1 @@
+patch-1.4.gj.stuff_all_quoted.1
--- handler.c.orig      2003-02-25 07:06:53.000000000 -0800
+++ handler.c   2003-12-28 01:19:07.000000000 -0800
@@ -935,7 +935,12 @@
      */
     if (*cont && !level && !mutt_strcmp (Pager, "builtin") && 
flowed_maybe_quoted (cont))
       state_puts ("\033[0m",s);
+
+    if (level && option (OPTSTUFFALLQUOTED))
+      state_putc (' ', s);
   }
+  else if (level && option (OPTSTUFFALLQUOTED))
+    state_putc (' ', s);
   else if ((*cont == ' ') || (*cont == '>') || (!level && !mutt_strncmp (cont, 
"From ", 5)))
     state_putc (' ', s);
 }
--- init.h.orig 2003-02-25 07:06:56.000000000 -0800
+++ init.h      2003-12-29 01:14:31.000000000 -0800
@@ -2191,6 +2191,17 @@
   ** 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 quoted lines in displayed and
+  ** generated text/plain; format=flowed attachments, as allowed by RFC
+  ** 2646.  This makes the quoting of format=flowed text more consistent
+  ** with the quoting style traditionally used for format=fixed text.
+  ** The quoted text is easier to read and is recognizable by the
+  ** default ``$$quote_regexp''.  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-02-25 07:06:56.000000000 -0800
+++ mutt.h      2003-12-28 01:04:59.000000000 -0800
@@ -394,6 +394,7 @@
   OPTSTATUSONTOP,
   OPTSTRICTTHREADS,
   OPTSUSPEND,
+  OPTSTUFFALLQUOTED,
   OPTTEXTFLOWED,
   OPTTHOROUGHSRC,
   OPTTHREADRECEIVED,