On Thu, Dec 10, 2015 at 03:37:29PM -0800, Kevin J. McCarthy wrote:
> On Mon, Nov 23, 2015 at 09:51:39PM -0800, Will Yardley wrote:

> > I would also love to see a better fix for quoting flowed text
> > when replying using *non* flowed text.  Bugs #3309, #3001 have
> > a better description. FreeBSD's patch (patch-1.5.XX.vvv.quote)
> > http://download.openpkg.org/components/cache/mutt/patch-1.5.24.vvv.quote.gz
> > works well enough for me.
> 
> I have been trying to read up on format=flowed and the patches you
> referenced, but frankly both the above patch and the revised gentoo
> version at:
> http://sourceforge.net/p/gentoomuttpatches/code/ci/default/tree/07-quote.patch
> make no sense to me.
> 
> Below, the first column indicates the "original" content of an email.
> The second column is the output when replying using the FreeBSD patch,
> and the third column is output when replying using the Gentoo patch.
> (with unset text_flowed; set quote_quoted)

FWIW, I do not have $quote_quoted set, but I'm pretty sure the behavior
is as I expect with the FreeBSD patch for some reason. I've used the
FreeBSD ports version, but have also used that patch directly when
building on a Mac.

For example, given the quoted material:
>> Yay!
>
> Noes!

replying gives me
> >> Yay!
> >
> > Noes!

If I build unpatched mutt-1.5.23 on the same box, it's displayed the
same way, but replying gives me:

> >>Yay!
> >
> >Noes!

I verified that set ? quote_quoted and set ? text_flowed returns:
quote_quoted is unset
text_flowed is unset

The original patch I used for a long time was the "stuff_all_quoted"
patch (by Gary Johnson) (see attached), however, it became difficult to
keep it in a state that would apply to current mutt.

Does that one make any more sense to you?

w

diff -u mutt-1.5.12/PATCHES mutt-1.5.12.patched/PATCHES
--- mutt-1.5.12/PATCHES 2006-07-14 11:12:47.000000000 -0700
+++ mutt-1.5.12.patched/PATCHES 2006-08-07 23:20:25.000000000 -0700
@@ -0,0 +1 @@
+patch-1.5.5.1.gj.stuff_all_quoted.2
Common subdirectories: mutt-1.5.12/contrib and mutt-1.5.12.patched/contrib
Common subdirectories: mutt-1.5.12/doc and mutt-1.5.12.patched/doc
diff -u mutt-1.5.12/handler.c mutt-1.5.12.patched/handler.c
--- mutt-1.5.12/handler.c       2005-12-20 01:36:02.000000000 -0800
+++ mutt-1.5.12.patched/handler.c       2006-08-07 23:20:25.000000000 -0700
@@ -924,9 +924,6 @@
 
 static void flowed_stuff (STATE *s, char *cont, int level)
 {
-  if (!option (OPTTEXTFLOWED) && !(s->flags & M_DISPLAY))
-    return;
-
   if (s->flags & M_DISPLAY)
   {
     /* 
@@ -936,7 +933,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);
Only in mutt-1.5.12.patched/: handler.c.orig
Common subdirectories: mutt-1.5.12/imap and mutt-1.5.12.patched/imap
diff -u mutt-1.5.12/init.h mutt-1.5.12.patched/init.h
--- mutt-1.5.12/init.h  2006-07-05 01:40:05.000000000 -0700
+++ mutt-1.5.12.patched/init.h  2006-08-07 23:20:25.000000000 -0700
@@ -2728,6 +2728,16 @@
   ** ``$$sort_re'' for a less drastic way of controlling this
   ** behaviour.
   */
+  { "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.  This makes the quoting of 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
Only in mutt-1.5.12.patched/: init.h.orig
Common subdirectories: mutt-1.5.12/intl and mutt-1.5.12.patched/intl
Common subdirectories: mutt-1.5.12/m4 and mutt-1.5.12.patched/m4
diff -u mutt-1.5.12/mutt.h mutt-1.5.12.patched/mutt.h
--- mutt-1.5.12/mutt.h  2006-06-08 04:49:07.000000000 -0700
+++ mutt-1.5.12.patched/mutt.h  2006-08-07 23:20:25.000000000 -0700
@@ -427,6 +427,7 @@
   OPTSTATUSONTOP,
   OPTSTRICTTHREADS,
   OPTSUSPEND,
+  OPTSTUFFALLQUOTED,
   OPTTEXTFLOWED,
   OPTTHOROUGHSRC,
   OPTTHREADRECEIVED,
Only in mutt-1.5.12.patched/: mutt.h.orig
Common subdirectories: mutt-1.5.12/po and mutt-1.5.12.patched/po

Reply via email to