From 706a6861346257c260ff54d1c92810068dcd0dbe Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 9 Jul 2012 11:17:28 +0300 Subject: [PATCH] * docs: add some examples of queries that need quoting --- emacs/mu4e.texi | 4 ++++ man/mu-easy.1 | 9 ++++++++- man/mu-find.1 | 20 +++++++++++++++++--- www/cheatsheet.org | 4 ++++ 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/emacs/mu4e.texi b/emacs/mu4e.texi index 8cb9c986..63d85dd5 100644 --- a/emacs/mu4e.texi +++ b/emacs/mu4e.texi @@ -1119,6 +1119,10 @@ subject:wombat date:20090601..20090630 # get all messages with PDF attachments in the /projects folder maildir:/projects mime:application/pdf +# get all messages about Rupert in the Sent Items folder +# note that terms with spaces need quotes +maildir:"/Sent Items" rupert + # get all important messages which are signed: flag:signed prio:high diff --git a/man/mu-easy.1 b/man/mu-easy.1 index 1f3eba5b..c8f18731 100644 --- a/man/mu-easy.1 +++ b/man/mu-easy.1 @@ -1,4 +1,4 @@ -.TH MU-EASY 1 "May 2012" "User Manuals" +.TH MU-EASY 1 "July 2012" "User Manuals" .SH NAME @@ -144,6 +144,13 @@ Get all messages from Jim without an attachment: \fB$ mu find from:jim AND NOT flag:attach\fR .fi +Get all messages in the Sent Items folder about yoghurt: +.nf + \fB$mu find maildir:'/Sent Items' yoghurt\fR +.fi +Note how we need to quote search terms that include spaces. + + Get all unread messages where the subject mentions Ångström: .nf \fB$ mu find subject:Ångström flag:unread\fR diff --git a/man/mu-find.1 b/man/mu-find.1 index 8e11f0f2..8b6cb5cd 100644 --- a/man/mu-find.1 +++ b/man/mu-find.1 @@ -81,8 +81,7 @@ would do in an internet search engine. For example, will find all messages that contain both 'monkey' and 'banana' in either body or subject or one of the address-fields (to/from/cc). -As mentioned, matching is case-insensitive and accent-insensitive; -thus +As mentioned, matching is case-insensitive and accent-insensitive; thus .nf $ mu find Mönkey BÄNAÑå @@ -90,6 +89,7 @@ thus yields the same results as the example above. + \fBmu\fR also recognizes prefixes for specific fields in a messages; for example: @@ -243,7 +243,21 @@ could use: $ mu find size:10K..2M .fi -Finally, you can match \fIall\fR messages using "": + +It's important to remember that if a search term includes spaces, you should +\fIquote\fr those parts. Thus, when we look at the following examples: + +.nf + $ mu find maildir:/Sent Items yoghurt + $ mu find maildir:'/Sent Items' yoghurt +.fi + +The first query searches for messages in the \fI/Sent\fR maildir matching +\fIItems\fR and \fIyoghurt\fR, while the second query searches the \fI/Sent +Items\fR maildir searching for messages matching \fIyoghurt\fR. + + +You can match \fIall\fR messages using "" (or ''): .nf $ mu find "" diff --git a/www/cheatsheet.org b/www/cheatsheet.org index 924986b3..0faf6c9e 100644 --- a/www/cheatsheet.org +++ b/www/cheatsheet.org @@ -38,6 +38,10 @@ If =mu= did not guess the right Maildir, you can set it explicitly: *** signed messages about apples *OR* oranges #+html:
  $ mu find flag:signed apples OR oranges
+*** messages about yoghurt in the Sent Items folder (note the quoting): +#+html:
  $ mu find maildir:'/Sent Items' yoghurt
+ + *** unread messages about things starting with 'soc' (soccer, society, socrates, ...) #+html:
  $ mu find 'subject:soc*' flag:unread