Re: grep

Erik Hetzner <[email protected]> Mon, 27 Aug 2018 21:12:10 -0700
Newsgroups gmane.mail.wanderlust.general
Message-ID <5b84cb9b.1c69fb81.7cf58.3b38__41196.4559848004$1535429458$gmane$org@mx.google.com>
Hi all,

Wanderlust offers 2 methods of searching mail. The first, “filter”
folders, offer a way to view some subset of another folder’s mail by
either running a native IMAP search or by using search implemented in
emacs lisp. Native IMAP search is used for IMAP folders when you are
not running in disconnected mode - otherwise the internal, emacs lisp
search is used. Native IMAP search will generally be much faster, as
the entire folder need not be fetched locally. Native IMAP search can
also be used to search using gmail’s search features by using x-gm-raw
[1, 2] as the “Search by” condition. This is what is used with
wl-summary-virtual. It is documented here [3].

Some example folders:

  /from:tomas/%"[Gmail]/All Mail":[email protected]
    `- native IMAP Search
  /x-gm-raw:from:tomas/%"[Gmail]/All Mail":[email protected]
    `- native IMAP search with gmail extensions
  /from:tomas/.INBOX <- searching a maildir folder via emacs lisp

“Search folders”, on the other hand, use some external program to
search emails and generate a set of emails to be processed by WL. WL
ships with support for grep, rgrep, mu, notmuch and namazu. It is
documented here [4]. Some sample folders:

  ["tomas"]~/maildir/INBOX!rgrep
    `- search beneath ~/maildir/INBOX using rgrep
  ["tomas"]!mu <- search using the mu application [5]

If you use a single “archive” folder you may also be interested in the
“quicksearch” feature [6]. With a little configuration, you can
quickly search your entire email archive using a single key stroke (')
if you use mu, notmuch, IMAP or gmail.

Hope that helps! I know it’s confusing and not very well documented.

best, Erik

1. https://developers.google.com/gmail/imap/imap-extensions
2. https://support.google.com/mail/answer/7190
3. http://wanderlust.github.io/wl-docs/wl.html#Filter-Folder
4. http://wanderlust.github.io/wl-docs/wl.html#Search-Folder
5. https://www.djcbsoftware.nl/code/mu/
6. http://wanderlust.github.io/wl-docs/wl.html#Quick-Search

On Mon, 27 Aug 2018 11:41:13 -0700,
Tomas By <[email protected]> wrote:
> 
> Hello,
> 
> Google finds this:
> |http://www.gohome.org/wl/doc/wl_35.html
> |V   Move to the virtual folder with the condition specified. If called
> |    with prefix argument and current folder is virtual, exit
> |    it. (wl-summary-virtual)
> 
> Not sure how this is a form of searching.
> 
> Just running grep from inside Emacs/WL on all the msg bodies ought not
> to be utterly impossible.
> 
> I can't believe nobody thought of that before.
> 
> /Tomas
> 
> 
> 
> On Mon, 27 Aug 2018 20:12:21 +0200, John Covici wrote:
> > 
> > I have never seen this documented anywhere.
> > 
> > On Mon, 27 Aug 2018 12:36:08 -0400,
> > Juliusz Chroboczek wrote:
> > > 
> > > > Am wondering if there is a simple command for running grep on the
> > > > contents of the mails from inside WL? "Tools"/"Search Files" does not
> > > > do this, as I can confirm by opening a terminal and cd:ing to the
> > > > relevant folder manually.
> > > 
> > > Not an answer to your question -- but are you aware of the native search
> > > functionality in Wanderlust?  wl-summary-virtual, bound to <F> by default.
> > > 
> > > -- Juliusz
> > > 
> > > 
> > 
> > -- 
> > Your life is like a penny.  You're going to lose it.  The question is:
> > How do
> > you spend it?
> > 
> >          John Covici wb2una
> >          [email protected]
> > 
> > 
>