bug-mailutils
[Top][All Lists]
Advanced

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

Re: mail regex


From: Alain Magloire
Subject: Re: mail regex
Date: Sat, 11 Aug 2001 16:14:36 -0400 (EDT)

> 
> Quoting Alain Magloire <address@hidden>, who wrote:
> > > Quoting Sergey Poznyakoff <address@hidden>, who wrote:
> > > > Actually, I am thinking about a more general approach. Sometimes it
> > > > is necessary to select letters on the contents of an arbitrary
> > > > header.  So, I'd extend the search syntax to something like
> > > > 
> > > >         Received:/.*mirddin.*/
> > > > 
> > > > meaning select all the letters with the given regexp in Received: 
> > > > header.
> > > > If the "header:" portion is omitted, it defaults to Subject:.
> > > > Any comments?
> > > 
> > > Have you looked at Mutt's pattern's? They do this, here's an excerpt from
> > > the docs:
> > > 
> > >   4.2.  Patterns
> > > 
> > >   Many of Mutt's commands allow you to specify a pattern to match
> > >   (limit, tag-pattern, delete-pattern, etc.).  There are several ways to
> > >   select messages:
> > 
> > I certainly like the idea of extending the search to other parts of 
> > messages,
> > like envelope, attribute, headers and body.  But Mutt's syntax does not go
> > well with mailx way of doing things.
> 
> Not to sure why you say they are so incompatible. I took Sergey's comment to
> mean that mailx has a search command, and that he wants to extend it to some
> of the header fields, and he proposed a syntax. Mutt has a search command,
> too.

mailx search command, is not exactly a command it is rather a way
you can specify a message list.  For example, `from', `top', `print', etc ..
are commands and you can specify a msglist to apply this command
here is a table:

 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)
    :d                  All deleted messages
    :n                  All new messages
    :o                  All old messages
    :r                  All messages that have already been read
    :u                  All unread messages

So doing

print 10-20

will print messages from 10 to 20

print /sam

Will print all message containning "sam" in the subject.

> I think it's syntax has been fairly well used, and found to be useful,
> so you guys may want to consider emulating it, or at least look at
> it's capabilities to find some inspiration on what may be cool. Si j'ai
> malcomprende (est ce'que ca une vraie mot?), c'est bien aussi!

8-).
Do not get me wrong, brainstorming and throwing ideas, are the only
way to get things better.

I was saying that mailx and mutt do not interact with the user
the same way and trying to incoporate some of the syntax of mutt
may not be the right approach in this case (see message list table
above).

> Ok, back to my errands (work 5 days, run errands 1 day, get a 1 day weekend,
> this is not life).

and party all night.

> A bientot!

Yes, come visit, I need reinforcement.

So after the :
- female squirrel having her offspring in my walls
- a field-mouse driving me crasy for two weeks
- two chip-monks stuck in the dryer tube
- the rabbit eating the backyard garden and chopping the head
  of the tulips
- the rackoon, very civilised, a reminder not to leave the
  garbage to early or at night, probably hired by the city
  to reinforce bylaws.
- a rather memorable `impression' by a "pe'pe' le putois" skunk.

now .... (drum please ...)

- battling a .. bat.. in the middle of the night.

--
alain, the vampire slayer.





reply via email to

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