logo       

Re: New features: msg#00106

Subject: Re: New features
On 2005-08-28 16:42:14 +0000, Rocco Rutte wrote:
> * Alain Bench [05-08-28 10:29:26 +0200] wrote:
> 
> >   BTW an aside about f=f code: See my external quote symbol "|" was
> >transformed to a additional level of quoting in your reply.
> 
> I know. With Peter we already started to discuss such issues. The 
> background is this: for f=f the only quoting character is '>' because 
> detecting the right quoting level is crucial for it.
> 
> However, if one uses '|' for some example, this is covered by 
> $quote_regexp so that, in order to satisfy the standard, we change it by 
> force to '>'.

I think it quite common to use different quote characters for different
sources . I use ">" for quoting the message I am replying to and "|" to
quote other sources (e.g., a message from a different thread, a web
page, a book, etc.).

Forcibly changing "|" to ">" would remove that distinction and might
alter the meaning of a message. This should not be done by default.

Ok, lets consider the different cases and what muttng can and should do
(should we use Christian's Wiki for this? I am not a big fan of Wikis,
but trying to create lists via email can get involved pretty fast).

1) Message is f=f, and reply should be f=f, too.

    The easy case: Assume that the message is well-formed, so muttng can
    just quote it with a single ">" character per physical line
    (alternatively it can rewrap the message before quoting it),
    space-stuff any text it generates itself (attribution line, maybe
    signature) and pass it on to $editor. Likewise, we assume that
    $editor knows about f=f, so muttng should just accept what it gets. 
    (It may check for well-formedness, but it should not silently
    second-guess the editor, at least not by default).

2) Message if f=f, reply should be plain.

    Rewrap the message. Prefix with $indent_string. Hand to $editor.
    Remove all trailing whitespace (except for the signature separator)
    so that all lines are fixed even if some other MUA mistakenly thinks
    the message is f=f. (This is necessary if $indent_string is not ">")

3) Message is plain, reply should be plain.

    Same as 2, except that the message is not rewrapped.

4) Message is plain, reply should be f=f.

    I think this is the hard case, because we have to guess about
    quoting levels, flowing text, etc.

    Of course there is the easy solution: Just don't guess. Preserve the
    message exactly as it is by deleting any trailing spaces and
    space-stuffing each line before quoting it.

    But this is clearly not optimal, as any quotes within the quoted
    message will not be represented as nested quotes, but as lines
    starting with ">" (or whatever).

    Simply replacing $quote_regex with an appropriate number of ">" isn't
    good either as it may remove the distinction between different kinds
    of quotes and also sometimes match too much (and it may be difficult
    to correct manually because the original string is lost).

    One possibility might be a separate $flowed_quote_regex which is set
    to "^( ?>)+" by default, which is used to determine the quoting
    level when converting from plain to f=f.

    A somewhat more complicated approach is to use $quote_regex, but
    record the first match of any depth and use that one for the rest of
    the message. This should work well for messages which start with
    quotes.

    As an example, consider the message:

    A wrote:
    > B wrote:
    >:> > Barbapapa,
    >:> Barbamama,
    >:> | Barbabella,
    >:Barbaletta,
    >:> Barbarix,
    >:Barbawum,
    >Barbabo,
    |Barbakus,
    >Barbalala,

    Then with the default $quote_regex, the prefixes for the levels
    would be:

    1: ">"
    2: ">:"
    3: ">:>"
    4: ">:> >"

    So the message would be converted to 

    A wrote:
    > B wrote:
    >>>> Barbapapa,
    >>> Barbamama,
    >>> | Barbabella,
    >>Barbaletta,
    >>> Barbarix,
    >>Barbawum,
    >Barbabo,
    |Barbakus,
    >Barbalala,

    before quoting, which preserves the two lines (Barbabella and
    Barbakus) with a different quote character.


    Another problem is flowing. If a line in a non-flowed message ends
    with a space, should we assume that it should be flowed together
    with the next line? This assumption actually makes sense if the line
    was originally part of an f=f message but then quoted in a f=fixed
    message.

    Are there other heuristics to find paragraphs which can be flowed?
    
    Basically, I think mutt should not be fancy here and preserve the
    line breaks in a fixed message exactly and not try to join them to
    paragraphs. Therefore, trailing blanks should be removed before
    invoking $editor.

    The rest is then as in case 1).

        hp

-- 
   _  | Peter J. Holzer    | Ich sehe nun ein, dass Computer wenig
|_|_) | Sysadmin WSR       | geeignet sind, um sich was zu merken.
| |   | hjp@xxxxxx         |
__/   | http://www.hjp.at/ |    -- Holger Lembke in dan-am

Attachment: pgpNgFqZIEhri.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
linux.arklinux....    user-groups.lin...    kde.usability/2...    ietf.ipp/2002-0...    mail.spam.spamc...    os.netbsd.devel...    audio.cd-record...    text.unicode.de...    php.documentati...    games.fps.halfl...    window-managers...    suse.oracle.gen...    bug-tracking.gn...    video.dvdrip.us...    xfree86.cvs/200...    java.netbeans.m...    network.argus/2...    culture.sf.kill...    debian.ports.al...    freebsd.questio...    qplus.devel/200...    handhelds.palm....   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe