Hi, On Tue, Oct 23, 2007, Rocco Rutte wrote: >> On Thu, Oct 18, 2007, Rocco Rutte wrote: > >>> original: flowed? | reply: flowed? | trim spaces >>> 1 N N N >>> 2 N Y Y >>> 3 Y N Y >>> 4 Y Y N > >>> 1: fixed reply to fixed mail: no problem >>> 2: flowed reply to fixed mail: your example, problem >>> 3: fixed reply to flowed mail: potential problem later on, esp. with >>> other MUAs >>> 4: flowed reply to flowed mail: no problem > > Attached is a patch which is a first take at implementing the above matrix. > I only tested each case once but it seems to work.
I also tested each case briefly and it works for me. I'm very happy with it. > Now that I look at the changes, the behavior differs quite a lot compare to > the current one. Maybe we should only use these changes depending on > $flowed_compat (or something like that) defaulting to 'no' (to keep the > current behavior as default)? IMHO the default behaviour should be the one which avoids interoperability problems. I suspect most users will use the default settings and don't want think about the details (and they attribute problems to format=flawed, not to implementation or configuration issues). But an option to disable the space stripping would be good. (E.g. if someone wants to repair the quoting manually to create proper format=flowed replies). > + if (option (OPTTEXTFLOWED) && l >= 3 && ascii_strncmp (buf + l - 3, "-- > ", 3) != 0) > + { > + /* when generating format=flowed from format=fixed, > + * strip all trailing spaces except for the signature > + * separator to improve interoperability */ I don't get the signature separator test -- why not just ascii_strcmp(buf, "-- ")? Wouldn't your code treat "foo-- " as a signature separator? Thanks, Johannes