On Wed, Aug 03, 2016 at 03:03:17PM +1000, c...@zip.com.au wrote:
> On 02Aug2016 08:05, Yubin Ruan <ablacktsh...@gmail.com> wrote:

> >>If you want to be more precise, you can use a modifier such as:
> >>
> >> ~C mutt-users@mutt.org
> >>
> >>to match messages with that in the To or CC headers.
> >
> >I have tried that, but when I press that ~ key, mutt give me some "key is not
> >bound. Press ? for help" message.(when I say I press the ~ key, I mean I 
> >press
> ><shift>~ , which would give you a ~ when you do normal typing, otherwise it's
> >just a ` )
> 
> Ah. The string above is a pattern expression. It is only meaningful
> at the prompt for <tag-pattern> or <limit> or searching. So what I
> should have asked you to type was:
> 
>  T~C mutt-users@mutt.org
> 
> so that the "T" (<tag-pattern>) opens the prompt requesting a
> pattern, and only _then_ do you type the pattern "~C
> mutt-users@mutt.org".
> 
> You might also want to experiment with "l" (<limit>), which
> restricts your view of the mailbox to just the messages matching a
> pattern. This will give you an easy way to experiment with patterns,
> and is also a handy way to locate particular messages in a large
> mailbox. Use the pattern "." to undo a "limit": that is a regexp for
> "any character", and effectively matches every message.

I have to say that `T~C mutt-users@mutt.org` have make my life a lot easier.
Thanks!

> 
> >That's weird. I have no idea why, but I guess maybe that's because of
> >my configuration setting, part of which I copy directly from other's blog:
> >
> >   set index_format='%-20.20L %4C [%Z] %{%b %d} %-15.15F (%?l?%4l&%4c?) %s'
> >   color index green  default ~N         # new
> >   color index red default ~D            # deleted
> >   color index brightmagenta default ~T  # tagged
> >   color index brightyellow default ~F   # flagged
> >   set pager_index_lines=10
> >   bind index,pager \Ck  sidebar-prev  #previous folder in sidebar
> >   bind index,pager \Cj  sidebar-next  #next folder in sidebar
> >   bind index,pager \CO  sidebar-open  #open selected folder in sidebar
> >   macro index      b    '<enter-command>toggle 
> > sidebar_visible<enter><refresh>'
> >   macro index      \cb  '<enter-command>toggle 
> > sidebar_visible<enter><refresh>'
> >   bind index       d    display-message
> >   bind index       gg   first-entry
> >   bind index       G    last-entry
> >   bind index       h    noop
> >   bind index       l    noop
> >
> >that's all of my conf that are related to index view. Anything wrong ?
> 
> There's nothing wrong there, but I would feel unhappy about the "d"
> macro above. Normally "d" is bound to <delete-message>, so if you
> every open someone else's mutt, or open your own but bypassing the
> configuration above (which sometimes one wants to do), then "d" can
> easily lead to accidental deletion of messages.
> 
> Normally <enter> will display a message, and i would advocate
> removing your "d" macro and just using <enter>. Safer all around.

yes, I think you are right. I'm kind of mixing all those stuff now...
 
> >>>   Can anyone tell me,
> >>>   ** How can I have that Thunderbird message filtering in mutt?(i.e., 
> >>> moving
> >>>   some messages from inbox to other mailbox according to the `To` field 
> >>> or `Cc`
> >>>   field)
> 
> The simplest way to do that would be as you imagined:
> 
>  - tag the messages you want to move, for example by typing:
> 
>      T~C mutt-users@mutt.org
> 
>  - move ("save" in mutt parlance) these messages to another folder.
> 
> The key "s" is bound to <save-message>. Normally that operates on
> the current message. What you want is to operate on all the tagged
> messages. This is done by prefixing the command with ";" which is
> bound to <tag-prefix>. You can do this with many operations (copy,
> delete, etc). So type:
> 
>  ;s
> 
> meaning <tag-prefix><save>. This will prompt you for a folder name
> for the messages.
> 
> >
> >If there's some common practice I would really appreciate to hear some. 
> >Figuring
> >it out myself is kind of hard.
> 
> The practice varies very widely.
> 
> Many people use mutt to connect directly to IMAP servers such as GMail.
> 
> Alternatively, you arrange to collect your email from such servers
> (or your ISP's POP service, etc) and store it locally. Then use mutt
> to browse the local folders. Note here that mutt tends not to do the
> collecting, though it has pop and imap services and you _can_
> collect with mutt.
> 
> Of course, you can use mutt to connect to an IMAP service and copy
> messages to local folders or vice versa.
> 
> Finally, there is some middle group. Using tools like offline-imap
> you can mirror your IMAP service (GMail) to local folders and use
> mutt locally. This has some advantages:
> 
>  - you have local email, which you can browse and read and reply to
> if you are    offline, such as I am on a train with only my laptop
> 
>  - you still have your IMAP service which you can access with a
> normal GUI    mail client (TBird, Apple Mail, etc) or via the web
> (mail.google.com) or    from your phone
> 
> Essentially mutt is a mail reader which will talk to local folders
> and/or remote IMAP services.
 
Fortunately, after a few googling and combining all those info I have gathered,
I find something like this:

push 
'<tag-pattern>~cmutt-us...@mutt.org<enter>;simaps://ablacktsh...@imap.gmail.com/mutt-users<enter>y'

I put this in my .muttrc, and every time I open mutt, it would automatically
move all the messages which are `To: mutt-users@mutt.org` or `Cc:
mutt-users@mutt.org` to the mutt-users folder. Although it does it remotely,
which would slow thing down when the network connection is not so good, I pretty
satisfied with this. Although something like procmail of offline-mail would make
thing faster, that would make it much complicated for now, so I would rather
settle down.

Anyway, thank you!

regards,
Ruan

Reply via email to