From ef6f58d51b1fb67b12cedc89a4754afa49614433 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 8 Jun 2011 08:34:34 +0300 Subject: [PATCH] * cheatsheet.org: updated --- www/cheatsheet.org | 66 ++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/www/cheatsheet.org b/www/cheatsheet.org index b3b1841e..f8d82de9 100644 --- a/www/cheatsheet.org +++ b/www/cheatsheet.org @@ -5,38 +5,37 @@ * Mu Cheatsheet Here are some tips for using =mu=. If you want to know more, please refer to the - =mu= man pages. For a quick warm-up, there's the =mu-easy= man-page. + =mu= man pages. For a quick warm-up, there's also the =mu-easy= man-page. ** Indexing your mail +#+html:
 $ mu index
+ +If =mu= did not guess the right Maildir, you can set it explicitly: - You can index your mail with: -#+html: $ mu index - - If =mu= did not guess the right Maildir, you can set it explicitly: -#+html: $ mu index --maildir=~/MyMaildir +#+html:
 $ mu index --maildir=~/MyMaildir
*** Excluding directories from indexing - If you want to exclude certain directories from being indexed (for example, - directories with spam-messages), put a file called =.noindex= in the directory - to exlude, and it will be ignored when indexing (including its children) - + If you want to exclude certain directories from being indexed (for example, + directories with spam-messages), put a file called =.noindex= in the directory + to exlude, and it will be ignored when indexing (including its children) + ** Finding messages After you have indexed your messages, you can search them. Here are some - examples. + example. *** messages about Helsinki (in message body, subject, sender, ...) -#+html: $ mu find Helsinki +#+html:
 $ mu find Helsinki
*** messages to Jack with subject jellyfish containing the word tumbleweed -#+html: $ mu find to:Jack subject:jellyfish tumbleweed +#+html:
 $ mu find to:Jack subject:jellyfish tumbleweed
*** messages between 2 kilobytes and a 2Mb, written in December 2009 with an attachment from Bill -#+example $ mu find size:2k..2m date:20091201..20093112 flag:attach from:bill +#+html: $ mu find size:2k..2m date:20091201..20093112 flag:attach from:bill *** unread messages about soccer or socrates or ... -#+html: $ mu find 'subject:soc*' flag:unread +#+html:
  $ mu find 'subject:soc*' flag:unread
** Finding contacts @@ -44,15 +43,15 @@ searched with =mu cfind= (after your messages have been indexed): *** all contacts with 'john' in either name or e-mail address -#+html: $ mu cfind john +#+html:
 $ mu cfind john
=mu cfind= takes a regular expression for matching. You can export the contact information to a number of formats for use in - e-mail clients. For examples: + e-mail clients. For example: *** export /all/ your contacts to the =mutt= addressbook format -#+html: $ mu cfind --format=mutt-alias +#+html:
 $ mu cfind --format=mutt-alias
Other formats are: =plain=, =mutt-ab=, =wl= (Wanderlust), =org-contact=, =bbdb= and =csv= (comma-separated values). @@ -63,18 +62,19 @@ You can retrieve attachments from messages using =mu extract=, which takes a message file as an argument. Without any other arguments, it displays the MIME-parts of the message. You can then get specific attachments: -#+html: $ mu extract --parts=3,4 my-msg-file + +#+html:
 $ mu extract --parts=3,4 my-msg-file
will get you parts 3 and 4. You can also extract files based on their name: -#+html: $ mu extract my-msg-file '.*\.jpg' +#+html:
 $ mu extract my-msg-file '.*\.jpg'
- The second argument is a case-insensitive regular expression, and the - command will extract any files matching the pattern -- in the example, all - =.jpg=-files. + The second argument is a case-insensitive regular expression, and the command + will extract any files matching the pattern -- in the example, all + =.jpg=-files. - Do not confuse the '.*' regular expression in =mu extract= (and =mu cfind= - with the '*' wildcard in =mu find=. + Do not confuse the '.*' /regular expression/ in =mu extract= (and =mu cfind=) + with the '*' /wildcard/ in =mu find=. ** Getting more colorful output @@ -83,7 +83,7 @@ it with =--color=, or setting the =MU_COLORS= environment variable to non-empty. -#+html: $ mu find --color capibara +#+html:
 $ mu find --color capibara
(since =mu= version 0.9.6) @@ -95,7 +95,7 @@ For example, to get the number of lines in all your messages mentioning /banana/, you could use something like: -#+html: $ mu find --fields="'l'" banana | xargs wc -l +#+html:
 $ mu find --fields="'l'" banana | xargs wc -l
Note that we use ='l'=, so the returned message paths will be quoted. This is useful if you have maildirs with spaces in their names. @@ -103,7 +103,7 @@ For further processing, also the ~--format=(xml|json|sexp)~ can be useful. For example, -#+html: $ mu find --format=xml pancake +#+html:
 $ mu find --format=xml pancake
will give you a list of pancake-related messages in XML-format. @@ -111,6 +111,16 @@ The =mu-find= man page contains examples for =mutt= and =wanderlust=. +** Viewing messages + + You can view message contents with =mu view=; it does not use the database + and simply takes a message file as it's argument: + +#+html:
 $ mu view ~/Maildir/inbox/cur/message24
+ + You can also use =--color= to get colorized output, and =--summary= to get a + summary of the message contents instead of the whole thing. + #+html:
© 2011 Dirk-Jan C. Binnema
#+begin_html