bug-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail regex


From: Sergey Poznyakoff
Subject: Re: mail regex
Date: Mon, 13 Aug 2001 19:14:52 +0300 (EET DST)

Bonsoir!

Sorry, last few days I've been absent and was unable to take part in the
discussion.

I agree with Alain's point that using Mutt search syntax hardly matches
mail/mailx way of specifying message sets. I think that any new features
we are adding should follow the mail's idea of doing things. I'd propose
to extend the message set specification in the following way (using
summary table provided by Alain):

    Ref                 Meaning
    ---------------------------------------------------------------------
    n                   Message number n
    n-m                 Messages n through m
    .                   The current message
    ^                   The first undeleted message
                        (or first deleted message for undelete)
    $                   The last message
    *                   All messages
    +                   Next message
    -                   Previous message
    user                All messages from the given user
    /string             All messages with string in the subject line
                        (the case of characters in string is ignored)
*   header:/regex/      All messages whose header: contents matches regex
                        (case insensitive). "header" is corresponding
                        header name in lowercase.
*   Header:/regex/      All messages whose header: contents matches regex
                        (case sensitive). "Header" is corresponding
                        header name, capitalized.
*   body:/regex/        All messages whose body matches regex
                        (case insensitive).
    :d                  All deleted messages
    :n                  All new messages
    :o                  All old messages
    :r                  All messages that have already been read
    :u                  All unread messages

*   :on DATE            All messages sent on DATE
*   :since DATE         All messages sent after DATE

(* marks proposed extensions.) This table does not include already implemented
extensions (n[P] meaning part number P of the nth message, etc.).
Comments?

I have already implemented header: and Header: semantics and am ready to
commit the changes.

By the way, this reminds me of the necessity to have a generalized search
API in the library. It could have various front ends, allowing to parse
mail, mutt, imap4d, etc. message specifications, and returning msgset_t
array. This way it could be used in all parts of mailutils.

> Mailx is archaic i.e. it's not a `visual' mail browser and there is
> a danger in extending too much it's capabilities.

Sure, but it also has its "ecological niche", hasn't it? For example, when
working over a slow modem line, one would surely prefer to run mail instead
of a full-screen mail browser, provided that mail offers enough features
to comfortably handle one's mail (that's what I am doing when I happen to
be far from my console, by the way :^)

> There is an effort call `hydrant', wich is yet another mail browser, that
> Jeff wanted to start.  The interesting thing about hydrant is that it
> will rely on mailutils/mailbox to provide much of the functionnality.

This is really very interesting. The full-screen mail browser seems to be
the only application the project lacks this far. 

au revoir,
Sergey


    



reply via email to

[Prev in Thread] Current Thread [Next in Thread]