www: remove from source tree
So it won't end up in packages, either.
|
@ -1,148 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
permalink: code/mu/cheatsheet.html
|
||||
---
|
||||
|
||||
# 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 also the
|
||||
`mu-easy` man-page.
|
||||
|
||||
## Indexing your mail
|
||||
``` $ mu index```
|
||||
|
||||
If `mu` did not guess the right Maildir, you can set it explicitly:
|
||||
|
||||
``` $ 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 exclude, 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. Also note the `--threads` argument to get a threaded display of
|
||||
the messages, and `--color` to get colors (both since 0.9.7).
|
||||
|
||||
### messages about Helsinki (in message body, subject, sender, ...)
|
||||
``` $ mu find Helsinki```
|
||||
|
||||
### messages to Jack with subject jellyfish containing the word tumbleweed
|
||||
``` $ mu find to:Jack subject:jellyfish tumbleweed```
|
||||
|
||||
### messages between 2 kilobytes and a 2Mb, written in December 2009 with an attachment from Bill
|
||||
``` $ mu find size:2k..2m date:20091201..20093112 flag:attach from:bill```
|
||||
|
||||
### signed messages about apples *OR* oranges
|
||||
``` $ mu find flag:signed apples OR oranges```
|
||||
|
||||
### messages about yoghurt in the Sent Items folder (note the quoting):
|
||||
``` $ mu find maildir:'/Sent Items' yoghurt```
|
||||
|
||||
|
||||
### unread messages about things starting with 'soc' (soccer, society, socrates, ...)
|
||||
``` $ mu find 'subject:soc*' flag:unread```
|
||||
|
||||
Note, the '*' only works at the /end/ of a search term, and you need to
|
||||
quote it or the shell will interpret it before `mu` sees it.
|
||||
(searching using the '*' wildcard is available since mu 0.9.6)
|
||||
|
||||
### finding messages with images as attachment
|
||||
``` $ mu find 'mime:image/*' ```
|
||||
(since mu version 0.9.8)
|
||||
|
||||
### finding messages with 'milk' in one of its text parts (such as text-based attachments):
|
||||
``` $ mu find embed:milk ```
|
||||
(since mu version 0.9.8)
|
||||
|
||||
### finding /all/ your messages
|
||||
``` $ mu find ""```
|
||||
(since mu version 0.9.7)
|
||||
|
||||
## Finding contacts
|
||||
|
||||
Contacts (names + email addresses) are cached separately, and can be
|
||||
searched with `mu cfind` (after your messages have been indexed):
|
||||
|
||||
### all contacts with 'john' in either name or e-mail address
|
||||
``` $ 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 example:
|
||||
|
||||
### export /all/ your contacts to the `mutt` addressbook format
|
||||
``` $ mu cfind --format=mutt-alias```
|
||||
|
||||
Other formats are: `plain`, `mutt-ab`, `wl` (Wanderlust), `org-contact`,
|
||||
`bbdb` and `csv` (comma-separated values).
|
||||
|
||||
## Retrieving attachments from messages
|
||||
|
||||
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:
|
||||
|
||||
``` $ mu extract --parts=3,4 my-msg-file```
|
||||
|
||||
will get you parts 3 and 4. You can also extract files based on their name:
|
||||
|
||||
``` $ 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.
|
||||
|
||||
Do not confuse the '.*' /regular expression/ in `mu extract` (and `mu
|
||||
cfind`) with the '*' /wildcard/ in `mu find`.
|
||||
|
||||
## Getting more colorful output
|
||||
|
||||
Some of the `mu` commands, such as `mu find`, `mu cfind` and `mu view`
|
||||
support colorized output. By default this is turned off, but you can enable
|
||||
it with `--color`, or setting the `MU_COLORS` environment variable to
|
||||
non-empty.
|
||||
|
||||
``` $ mu find --color capibara```
|
||||
|
||||
(since `mu` version 0.9.6)
|
||||
|
||||
## Integration with mail clients
|
||||
|
||||
The `mu-find` man page contains examples for `mutt` and `wanderlust`. And
|
||||
since version 0.9.8, `mu` includes its own e-mail client for `emacs`, `mu4e`.
|
||||
|
||||
## Viewing specific 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:
|
||||
|
||||
``` $ 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.
|
||||
|
||||
## Further processing of matched messages
|
||||
|
||||
If you need to process the results of your queries with some other program,
|
||||
you can return the results as a list of absolute paths to the messages found:
|
||||
|
||||
For example, to get the number of lines in all your messages mentioning
|
||||
/banana/, you could use something like:
|
||||
|
||||
``` $ mu find --exec='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.
|
||||
|
||||
For further processing, also the ~--format`(xml|sexp)~ can be useful. For
|
||||
example,
|
||||
|
||||
``` $ mu find --format=xml pancake```
|
||||
|
||||
will give you a list of pancake-related messages in XML-format.
|
BIN
www/graph01.png
Before Width: | Height: | Size: 8.5 KiB |
190
www/index.md
|
@ -1,190 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
permalink: /code/mu/
|
||||
---
|
||||
|
||||
# Welcome to mu!
|
||||
|
||||
<img src="mu.jpg" align="right" margin="10px"/> With the *enormous* amounts of e-mail many people
|
||||
gather and the importance of e-mail messages in our daily work-flow, it is very important to be able
|
||||
to quickly deal with all that - in particular, to instantly find that one important e-mail you need
|
||||
right now.
|
||||
|
||||
For that, *mu* was created. *mu* is a tool for dealing with e-mail messages stored in the
|
||||
[Maildir](http://en.wikipedia.org/wiki/Maildir)-format, on Unix-like systems. *mu*'s main purpose is
|
||||
to help you to find the messages you need, quickly; in addition, it allows you to view messages,
|
||||
extract attachments, create new maildirs, ... See the [mu cheatsheet](cheatsheet.html) for some
|
||||
examples. Mu's source code is available [in github](https://github.com/djcb/mu), and there is the
|
||||
[mu-discuss](http://groups.google.com/group/mu-discuss) mailing list.
|
||||
|
||||
*mu* includes an emacs-based e-mail client (`mu4e`), a simple GUI (`mug`) and bindings for the
|
||||
Guile/Scheme programming language.
|
||||
|
||||
## Features
|
||||
|
||||
- fast indexing for [Maildir](http://en.wikipedia.org/wiki/Maildir), Maildir+ and Maildir-on-VFAT
|
||||
- search for messages based on the sender, receiver, subject, date-range,
|
||||
size, priority, words in message, flags (signed, encrypted, new, replied,
|
||||
has-attachment,...), message-id, maildir, tags, attachment (name,
|
||||
mime-type, text) and more
|
||||
- support for encrypted and signed messages
|
||||
- command-line tools for indexing, searching, viewing, adding/removing
|
||||
messages, extracting attachments, exporting/searching address lists,
|
||||
creating maildirs, ...
|
||||
- accent/case normalization - so *angstrom* matches *Ångström*
|
||||
- can be integrated with other e-mail clients such as
|
||||
[mutt](http://www.mutt.org/) and
|
||||
[Wanderlust](http://www.emacswiki.org/emacs/WanderLust).
|
||||
- [mu4e](mu4e.html), an emacs-based e-mail client based on `mu` (see screenshot).
|
||||
- [mu-guile](mu-guile.html):
|
||||
[guile 2.0](http://www.gnu.org/software/guile/) bindings that
|
||||
allow for scripting, advanced processing of your data, and doing
|
||||
all kinds of statistics
|
||||
- fully documented (man pages, info pages)
|
||||
|
||||
## News
|
||||
|
||||
### 2021-07-27: mu/mu4e 1.6 is available
|
||||
|
||||
A new release is available; [release notes](https://github.com/djcb/mu/releases/tag/1.6) and
|
||||
grab the [tarball](https://github.com/djcb/mu/releases/download/1.6.10/mu-1.6.10.tar.xz) (latest 1.6.x release).
|
||||
|
||||
### 2020-04-18: mu/mu4e 1.4 is available
|
||||
|
||||
A new release is available; [release notes](https://github.com/djcb/mu/releases/tag/1.4) and
|
||||
grab the [tarball](https://github.com/djcb/mu/releases/download/1.4.15/mu-1.4.15.tar.xz) (latest 1.4.x release).
|
||||
|
||||
|
||||
### 2019-04-07: mu/mu4e 1.2 is available
|
||||
|
||||
A new release is available; see the [release notes](https://github.com/djcb/mu/releases/tag/1.2) and
|
||||
grab the [tarball](https://github.com/djcb/mu/releases/download/1.2/mu-1.2.0.tar.xz).
|
||||
|
||||
|
||||
### 2018-02-03: mu/mu4e 1.0 is available
|
||||
|
||||
After a decade of development, mu 1.0 is available. Read
|
||||
[NEWS](https://github.com/djcb/mu/blob/v1.0/NEWS.org) with all the details.
|
||||
|
||||
### 2016-12-05: mu/mu4e 0.9.18 is available
|
||||
|
||||
mu 0.9.18 offers a number of improvements across the board. For
|
||||
example, people with huge maildirs can use a special "lazy-checking"
|
||||
mode to speed up indexing; it's now possible to view rich-text message
|
||||
in an embedded webkit-view, and the release adds support for org-mode
|
||||
9.x. There also many small fixes and tweaks in mu4e, all based on
|
||||
user-feedback.
|
||||
|
||||
For all the details,
|
||||
see: [NEWS.org](https://github.com/djcb/mu/blob/0.9.18/NEWS.org).
|
||||
|
||||
Get it from the [Release page](https://github.com/djcb/mu/releases).
|
||||
|
||||
### 2016-01-21: mu/mu4e 0.9.16 is here, and it is our latest stable release!
|
||||
|
||||
#### Better behaviour and context handling
|
||||
- Context Handling just got smart: new ‘mu4e-context’ defines and switches between various contexts, which are groups of settings. This may be used for instance to easily configure and switch between multiple accounts.
|
||||
- Improved behaviour in html and messages marks: ability to toggle between html and text display of messages & better management of messages marked as read or unread.
|
||||
|
||||
#### User Interface improvements
|
||||
- Numerous improvements in threads view and mailing lists management
|
||||
- Fancy characters can now be properly used as well as special customizations for message views
|
||||
|
||||
#### Faster Indexing and message management
|
||||
- Indexing & caching optimizations
|
||||
|
||||
You can grab the tarball directly
|
||||
[from Github](https://github.com/djcb/mu-releases) or wait a bit to
|
||||
get it through your distribution channels (details may vary from one
|
||||
distribution to another).
|
||||
|
||||
None of this would be possible without a team of dedicated
|
||||
individuals: Adam Sampson, Ævar Arnfjörð Bjarmason, Bar Shirtcliff,
|
||||
Charles-H. Schulz, Clément Pit--Claudel, Damien Cassou, Declan Qian,
|
||||
Dima Kogan, Dirk-Jan C. Binnema, Foivos, Foivos S. Zakkak, Hinrik Örn
|
||||
Sigurðsson, jeroen tiebout, JJ Asghar, Jonas Bernoulli, Jun Hao,
|
||||
Martin Yrjölä, Maximilian Matthé, Piotr Trojanek, prsarv, Thierry
|
||||
Volpiatto, Titus von der Malsburg (and of course all people who
|
||||
reported issues, provided suggestions etc.)
|
||||
|
||||
We hope you will enjoy this release as much as we do. Happy Hacking!
|
||||
|
||||
-- The mu/mu4e Team
|
||||
|
||||
## Old News
|
||||
|
||||
- 2015-09-24: After almost 6 months, a new release of mu/mu4e. We are
|
||||
happy to announce mu and mu4e 0.9.9.13! have just been
|
||||
released. The following key features and improvements have been
|
||||
added:
|
||||
|
||||
* Change the way the headers are displayed and sorted
|
||||
* Fancy characters now enabled distinctively both for marks and
|
||||
headers
|
||||
* Composing a message is now possible in a separate frame
|
||||
* Ability to display the subject of a thread only on top of it for
|
||||
enhanced clarity
|
||||
* Lots of bugs squashed, updates to the documentation (BDDB), as
|
||||
well as embedding the News file inside mu4e itself.
|
||||
|
||||
|
||||
- 2013-03-30: released [mu-0.9.9.5](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.9.5.tar.gz); full with new features and bug
|
||||
fixes – see the download link for some of the details. Many
|
||||
thanks to all who contributed!
|
||||
- 2012-10-14: released [mu-0.9.9](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.9.tar.gz); a new barrage of fixes and
|
||||
improvements – check the link and [NEWS](https://github.com/djcb/mu/blob/master/NEWS). Also, note the
|
||||
[mu4e-manual](http://code.google.com/p/mu0/downloads/detail?name%3Dmu4e-manual-0.9.9.pdf) (PDF).
|
||||
- 2012-07-01: released [mu-0.9.8.5](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.5.tar.gz); more fixes, improvements (see
|
||||
the link).
|
||||
- 2012-05-08: released
|
||||
[mu-0.9.8.4](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.4.tar.gz)
|
||||
with even more improvements (the link has all the details)
|
||||
- 2012-04-06: released
|
||||
[mu-0.9.8.3](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.3.tar.gz),
|
||||
with many improvements, fixes. See the link for details. *NOTE*:
|
||||
existing `mu` and `mu4e` users are recommended to execute `mu
|
||||
index --rebuild` after installation.
|
||||
- 2012-03-11: released
|
||||
[mu-0.9.8.2](http://code.google.com/p/mu0/downloads/detail?name=mu-0.9.8.2.tar.gz),
|
||||
with a number of fixes and improvements, see the link for the
|
||||
details.
|
||||
- 2012-02-17: released
|
||||
[mu-0.9.8.1](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.1.tar.gz),
|
||||
which has a number of improvements to the 0.9.8 release: add mark
|
||||
as read/unread, colorize cited message parts, better handling of
|
||||
text-based message parts, documentation fixes, documentation
|
||||
updates and a few fixes here and there
|
||||
- 2012-02-09: moved the mu source code repository
|
||||
[to Github](https://github.com/djcb/mu).
|
||||
- 2012-01-31: finally,
|
||||
[mu-0.9.8](http://mu0.googlecode.com/files/mu-0.9.8.tar.gz) is
|
||||
available. It comes with an emacs-based e-mail client,
|
||||
[mu4e](file:mu4e.html), and much improved
|
||||
[guile bindings](file:mu-guile.html). Furthermore, It adds
|
||||
search for attachment mime type and search inside any text part
|
||||
of a message, more tests, improvements in many parts of the code.
|
||||
- 2011-09-03: mu 0.9.7 is now available; compared to the -pre
|
||||
version there are a few small changes; the most important one is
|
||||
a fix specifically for running mu on MacOS.
|
||||
|
||||
- [Old news](file:old-news.org)
|
||||
|
||||
## Development & download
|
||||
|
||||
<a href="mu4e-splitview.png" border="0"><img src="mu4e-splitview-small.png" align="right" margin="10px"/></a>
|
||||
|
||||
Some Linux-distributions already provide pre-built mu packages; if
|
||||
there's no packagage for your distribution, or if you want the
|
||||
latest release, you can [download mu source packages](http://code.google.com/p/mu0/downloads/list) from Google
|
||||
Code. In case you find a bug, or have a feature requests, please
|
||||
use the [issue tracker](https://github.com/djcb/mu/issues).
|
||||
|
||||
If you'd like to work with the mu source code, you can find it [in Github](https://github.com/djcb/mu);
|
||||
also, see the notes on [HACKING](https://github.com/djcb/mu/blob/master/HACKING) the mu source code.
|
||||
|
||||
There's also a [mailing list](http://groups.google.com/group/mu-discuss).
|
||||
|
||||
## License & Copyright
|
||||
|
||||
*mu* was designed and implemented by Dirk-Jan C. Binnema, and is Free
|
||||
Software, licensed under the GNU GPLv3
|
164
www/mu-guile.md
|
@ -1,164 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
permalink: /code/mu/mu-guile.html
|
||||
---
|
||||
|
||||
# mu-guile
|
||||
|
||||
Starting from version 0.9.7,
|
||||
[GNU/Guile](http://www.djcbsoftware.nl/code/mu][mu]] had experimental
|
||||
bindings for the
|
||||
[[http://www.gnu.org/software/guile/) programming language, which is a version of the [Scheme](http://en.wikipedia.org/wiki/Scheme_(programming_language))
|
||||
programming language, specifically designed for extending existing
|
||||
programs.
|
||||
|
||||
`mu` version 0.9.8 has much improved bindings, and they are
|
||||
[documented](file:mu-guile/index.html), with many examples. You can
|
||||
find more examples in the `guile/examples` directory of the `mu`
|
||||
source package.
|
||||
|
||||
It must be said that Scheme (and in general, languages from the Lisp-family)
|
||||
initially may look a bit 'strange' -- all these parentheses etc.; so please
|
||||
bear with us -- you will get used to it.
|
||||
|
||||
## Some examples
|
||||
|
||||
Here are some examples; we don't provide too much explanation /how/ they do
|
||||
what they do, but the [manual](file:mu-guile/index.html) takes you through that, step-by-step.
|
||||
|
||||
*NOTE (1)*: if you get errors like `ERROR: no code for module (mu)`,
|
||||
`guile` cannot find the `mu` modules. To solve this, you need to set
|
||||
the `GUILE_LOAD_PATH` to the directory with the installed `mu.scm`,
|
||||
e.g.
|
||||
|
||||
``` sh
|
||||
export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.0"
|
||||
```
|
||||
|
||||
(you need to adapt this if you installed `mu` in some non-standard place; but
|
||||
it's always the directory with the installed `mu.scm`).
|
||||
|
||||
*NOTE (2)*: for the graphs (below) to work, you will need to have the `gnuplot`
|
||||
program installed.
|
||||
|
||||
*NOTE (3)*: the examples below assume that you have your messages indexed
|
||||
already using `mu`; see the man pages, or the [mu cheat sheet](http://www.djcbsoftware.nl/code/mu/cheatsheet.html).
|
||||
|
||||
### Messages per weekday
|
||||
|
||||
#!/bin/sh
|
||||
exec guile -s $0 $@
|
||||
!#
|
||||
|
||||
(use-modules (mu) (mu message) (mu stats) (mu plot))
|
||||
(mu:initialize)
|
||||
|
||||
;; create a list like (("Mon" . 13) ("Tue" . 23) ...)
|
||||
(define weekday-table
|
||||
(mu:weekday-numbers->names
|
||||
(sort
|
||||
(mu:tabulate-messages
|
||||
(lambda (msg)
|
||||
(tm:wday (localtime (mu:date msg)))))
|
||||
(lambda (a b) (< (car a) (car b))))))
|
||||
|
||||
(for-each
|
||||
(lambda (elm)
|
||||
(format #t "`a: `a\n" (car elm) (cdr elm)))
|
||||
weekday-table)
|
||||
|
||||
Which outputs something like:
|
||||
|
||||
|
||||
Sun: 2278
|
||||
Mon: 2991
|
||||
Tue: 3077
|
||||
Wed: 2734
|
||||
Thu: 2796
|
||||
Fri: 2343
|
||||
Sat: 1856
|
||||
|
||||
The numbers may be a bit different though... In my case, Saturday
|
||||
seems a particularly slow day for e-mail.
|
||||
|
||||
### Drawing graphs
|
||||
|
||||
We can also draw graphs from this, by adding the following to the script:
|
||||
|
||||
;; plain-text graph
|
||||
(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages" #t)
|
||||
|
||||
;; GUI graph
|
||||
(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages")
|
||||
|
||||
|
||||
This gives us the following:
|
||||
|
||||
### plain text graph
|
||||
|
||||
Messages per weekday
|
||||
Messages
|
||||
3200 ++---+--------+---------+--------+---------+---------+--------+---++
|
||||
| + + "/tmp/filel8NGRf" using 2:xticlabels(1) ****** |
|
||||
3000 ++ * * ++
|
||||
| *********** * |
|
||||
| * ** * |
|
||||
2800 ++ * ** * ********* ++
|
||||
| * ** ************ * |
|
||||
2600 ++ * ** ** ** * ++
|
||||
| * ** ** ** * |
|
||||
| * ** ** ** * |
|
||||
2400 ++ * ** ** ** *********** ++
|
||||
*********** ** ** ** ** * |
|
||||
2200 *+ ** ** ** ** ** * ++
|
||||
* ** ** ** ** ** * |
|
||||
* ** ** ** ** ** * |
|
||||
2000 *+ ** ** ** ** ** * ++
|
||||
* + ** + ** + ** + ** + ** + ***********
|
||||
1800 ********************************************************************
|
||||
Sun Mon Tue Wed Thu Fri Sat
|
||||
Day
|
||||
#### GUI graph
|
||||
|
||||
<img src="graph01.png">
|
||||
|
||||
### Export contacts to `mutt`
|
||||
|
||||
`mu` provides `mu cfind` to get contact information from the database;
|
||||
it's fast, since it uses cached contact data. But sometimes, we may
|
||||
want to get a bit more advanced. For examples, suppose I want a list
|
||||
of names and e-mail addresses of people that were seen at least 20
|
||||
times since 2010, in the `mutt` address book format.
|
||||
|
||||
We could get such a list with something like the following:
|
||||
|
||||
!/bin/sh
|
||||
exec guile -s $0 $@
|
||||
!#
|
||||
|
||||
(use-modules (mu) (mu message) (mu contact))
|
||||
(mu:initialize)
|
||||
|
||||
;; Get a list of contacts that were seen at least 20 times since 2010
|
||||
(define (selected-contacts)
|
||||
(let ((addrs '())
|
||||
(start (car (mktime (car (strptime "%F" "2010-01-01")))))
|
||||
(minfreq 20))
|
||||
(mu:for-each-contact
|
||||
(lambda (contact)
|
||||
(if (and (mu:email contact)
|
||||
(>= (mu:frequency contact) minfreq)
|
||||
(>= (mu:last-seen contact) start))
|
||||
(set! addrs (cons contact addrs)))))
|
||||
addrs))
|
||||
|
||||
(for-each
|
||||
(lambda (contact)
|
||||
(format #t "~a\n" (mu:contact->string contact "mutt-alias")))
|
||||
(selected-contacts))
|
||||
|
||||
|
||||
## License & Copyright
|
||||
|
||||
*mu-guile* was designed and implemented by Dirk-Jan C. Binnema, and is
|
||||
Free Software, licensed under the GNU GPLv3
|
177
www/mu-guile.org
|
@ -1,177 +0,0 @@
|
|||
#+title: mu-guile: guile-bindings for mu
|
||||
#+style: <link rel="stylesheet" type="text/css" href="mu.css">
|
||||
#+options: skip t
|
||||
|
||||
Starting from version 0.9.7, [[http://www.djcbsoftware.nl/code/mu][mu]] had experimental bindings for the [[http://www.gnu.org/software/guile/][GNU/Guile]]
|
||||
programming language, which is a version of the [[http://en.wikipedia.org/wiki/Scheme_(programming_language)][Scheme]] programming language,
|
||||
specifically designed for extending existing programs.
|
||||
|
||||
=mu= version 0.9.8 has much improved bindings, and they are [[file:mu-guile/index.html][documented]], with
|
||||
many examples. You can find more examples in the =guile/examples= directory of
|
||||
the =mu= source package.
|
||||
|
||||
It must be said that Scheme (and in general, languages from the Lisp-family)
|
||||
initially may look a bit 'strange' -- all these parentheses etc.; so please
|
||||
bear with us -- you will get used to it.
|
||||
|
||||
** Some examples
|
||||
|
||||
Here are some examples; we don't provide too much explanation /how/ they do
|
||||
what they do, but the [[file:mu-guile/index.html][manual]] takes you through that, step-by-step.
|
||||
|
||||
*NOTE (1)*: if you get errors like =ERROR: no code for module (mu)=, ~guile~
|
||||
cannot find the ~mu~ modules. To solve this, you need to set the
|
||||
~GUILE_LOAD_PATH~ to the directory with the installed ~mu.scm~, e.g.
|
||||
|
||||
#+begin_src sh
|
||||
export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.0"
|
||||
#+end_src
|
||||
|
||||
(you need to adapt this if you installed =mu= in some non-standard place; but
|
||||
it's always the directory with the installed ~mu.scm~).
|
||||
|
||||
*NOTE (2)*: for the graphs (below) to work, you will need to have the =gnuplot=
|
||||
program installed.
|
||||
|
||||
*NOTE (3)*: the examples below assume that you have your messages indexed
|
||||
already using =mu=; see the man pages, or the [[http://www.djcbsoftware.nl/code/mu/cheatsheet.html][mu cheat sheet]].
|
||||
|
||||
*** Messages per weekday
|
||||
|
||||
#+begin_src scheme
|
||||
#!/bin/sh
|
||||
exec guile -s $0 $@
|
||||
!#
|
||||
|
||||
(use-modules (mu) (mu message) (mu stats) (mu plot))
|
||||
(mu:initialize)
|
||||
|
||||
;; create a list like (("Mon" . 13) ("Tue" . 23) ...)
|
||||
(define weekday-table
|
||||
(mu:weekday-numbers->names
|
||||
(sort
|
||||
(mu:tabulate-messages
|
||||
(lambda (msg)
|
||||
(tm:wday (localtime (mu:date msg)))))
|
||||
(lambda (a b) (< (car a) (car b))))))
|
||||
|
||||
(for-each
|
||||
(lambda (elm)
|
||||
(format #t "~a: ~a\n" (car elm) (cdr elm)))
|
||||
weekday-table)
|
||||
#+end_src
|
||||
|
||||
Which outputs something like:
|
||||
|
||||
#+begin_example
|
||||
Sun: 2278
|
||||
Mon: 2991
|
||||
Tue: 3077
|
||||
Wed: 2734
|
||||
Thu: 2796
|
||||
Fri: 2343
|
||||
Sat: 1856
|
||||
#+end_example
|
||||
|
||||
The numbers may be a bit different though... In my case, Saturday seems a
|
||||
particularly slow day for e-mail.
|
||||
|
||||
*** Drawing graphs
|
||||
|
||||
We can also draw graphs from this, by adding the following to the script:
|
||||
|
||||
#+begin_src scheme
|
||||
;; plain-text graph
|
||||
(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages" #t)
|
||||
|
||||
;; GUI graph
|
||||
(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages")
|
||||
#+end_src scheme
|
||||
|
||||
This gives us the following:
|
||||
|
||||
**** plain text graph
|
||||
#+begin_example
|
||||
Messages per weekday
|
||||
Messages
|
||||
3200 ++---+--------+---------+--------+---------+---------+--------+---++
|
||||
| + + "/tmp/filel8NGRf" using 2:xticlabels(1) ****** |
|
||||
3000 ++ * * ++
|
||||
| *********** * |
|
||||
| * ** * |
|
||||
2800 ++ * ** * ********* ++
|
||||
| * ** ************ * |
|
||||
2600 ++ * ** ** ** * ++
|
||||
| * ** ** ** * |
|
||||
| * ** ** ** * |
|
||||
2400 ++ * ** ** ** *********** ++
|
||||
*********** ** ** ** ** * |
|
||||
2200 *+ ** ** ** ** ** * ++
|
||||
* ** ** ** ** ** * |
|
||||
* ** ** ** ** ** * |
|
||||
2000 *+ ** ** ** ** ** * ++
|
||||
* + ** + ** + ** + ** + ** + ***********
|
||||
1800 ********************************************************************
|
||||
Sun Mon Tue Wed Thu Fri Sat
|
||||
Day
|
||||
#+end_example
|
||||
|
||||
**** GUI graph
|
||||
|
||||
[[file:graph01.png]]
|
||||
|
||||
|
||||
|
||||
*** Export contacts to =mutt=
|
||||
|
||||
=mu= provides =mu cfind= to get contact information from the database; it's
|
||||
fast, since it uses cached contact data. But sometimes, we may want to get a
|
||||
bit more advanced. For examples, suppose I want a list of names and e-mail
|
||||
addresses of people that were seen at least 20 times since 2010, in the
|
||||
=mutt= address book format.
|
||||
|
||||
We could get such a list with something like the following:
|
||||
|
||||
#+begin_src scheme
|
||||
#!/bin/sh
|
||||
exec guile -s $0 $@
|
||||
!#
|
||||
|
||||
(use-modules (mu) (mu message) (mu contact))
|
||||
(mu:initialize)
|
||||
|
||||
;; Get a list of contacts that were seen at least 20 times since 2010
|
||||
(define (selected-contacts)
|
||||
(let ((addrs '())
|
||||
(start (car (mktime (car (strptime "%F" "2010-01-01")))))
|
||||
(minfreq 20))
|
||||
(mu:for-each-contact
|
||||
(lambda (contact)
|
||||
(if (and (mu:email contact)
|
||||
(>= (mu:frequency contact) minfreq)
|
||||
(>= (mu:last-seen contact) start))
|
||||
(set! addrs (cons contact addrs)))))
|
||||
addrs))
|
||||
|
||||
(for-each
|
||||
(lambda (contact)
|
||||
(format #t "~a\n" (mu:contact->string contact "mutt-alias")))
|
||||
(selected-contacts))
|
||||
#+end_src
|
||||
|
||||
** License & Copyright
|
||||
|
||||
*mu-guile* was designed and implemented by Dirk-Jan C. Binnema, and is Free
|
||||
Software, licensed under the GNU GPLv3
|
||||
|
||||
#+html:<hr/><div align="center">© 2011-2012 Dirk-Jan C. Binnema</div>
|
||||
#+begin_html
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("UA-578531-1");
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
#+end_html
|
BIN
www/mu-small.png
Before Width: | Height: | Size: 6.5 KiB |
116
www/mu.css
|
@ -1,116 +0,0 @@
|
|||
/* stylesheet for mu website */
|
||||
|
||||
body {
|
||||
background:#ffffff;
|
||||
margin: 50px;
|
||||
padding: 10px;
|
||||
font-family: arial, Helvetica, 'Bitstream Vera Sans', 'Luxi Sans', Verdana,
|
||||
Sans-Serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin:30px;
|
||||
background: #5fb6de;
|
||||
}
|
||||
|
||||
|
||||
a.menu {font-weight: bold}
|
||||
a.menu:link {color: #ffffff; text-decoration: none; }
|
||||
a.menu:active {color: #ff0000; text-decoration: none; }
|
||||
a.menu:visited {color: #ffffff; text-decoration: none; }
|
||||
a.menu:hover {color: #ff0000; text-decoration: underline; }
|
||||
|
||||
.mine {color: #ffffff; font-weight: bold}
|
||||
|
||||
|
||||
|
||||
|
||||
/* emacs-code -----------------------*/
|
||||
|
||||
/* zenburnesque code blocks in for html-exported org mode */
|
||||
|
||||
|
||||
pre.src {
|
||||
background: #dddddd;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.org-preprocessor {
|
||||
color: #8cd0d3;
|
||||
}
|
||||
|
||||
.org-variable-name {
|
||||
color: #0084C8;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.org-string {
|
||||
color: #4E9A06;
|
||||
}
|
||||
|
||||
.org-type {
|
||||
color: #2F8B58;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.org-function-name {
|
||||
color: #00578E;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.org-keyword {
|
||||
color: #A52A2A;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.org-comment {
|
||||
color: #204A87;
|
||||
}
|
||||
|
||||
.org-doc {
|
||||
color: #afd8af;
|
||||
}
|
||||
|
||||
.org-comment-delimiter {
|
||||
color: #708070;
|
||||
}
|
||||
|
||||
.org-constant {
|
||||
color: #F5666D;
|
||||
}
|
||||
|
||||
.org-builtin {
|
||||
color: #A020F0;
|
||||
}
|
||||
|
||||
|
||||
.warning, .org-warning {
|
||||
color: yellow;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
|
||||
/* emacs other stuff --------------------- */
|
||||
.org-date, .org-org-date {
|
||||
/* org-date */
|
||||
color: #00ffff;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.org-hide, .org-org-hide {
|
||||
/* org-hide */
|
||||
color: #000000;
|
||||
}
|
||||
.org-level-1, .org-org-level-1 {
|
||||
/* org-level-1 */
|
||||
color: #356da0;
|
||||
}
|
||||
.org-level-2,.org-org-level-2 {
|
||||
/* org-level-2 */
|
||||
color: #7685de;
|
||||
}
|
||||
.org-todo,.org-org-todo {
|
||||
/* org-todo */
|
||||
color: #ffc0cb;
|
||||
font-weight: bold;
|
||||
}
|
BIN
www/mu.jpg
Before Width: | Height: | Size: 19 KiB |
BIN
www/mu.png
Before Width: | Height: | Size: 27 KiB |
BIN
www/mu4e-1.png
Before Width: | Height: | Size: 47 KiB |
BIN
www/mu4e-2.png
Before Width: | Height: | Size: 130 KiB |
BIN
www/mu4e-3.png
Before Width: | Height: | Size: 71 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 267 KiB |
59
www/mu4e.md
|
@ -1,59 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
permalink: /code/mu/mu4e.html
|
||||
---
|
||||
|
||||
Starting with version 0.9.8, [mu](http://www.djcbsoftware.nl/code/mu)
|
||||
provides an emacs-based e-mail client which uses `mu` as its back-end:
|
||||
*mu4e*.
|
||||
|
||||
Through `mu`, `mu4e` sits on top of your Maildir (which you update
|
||||
with e.g. [`offlineimap`](http://offlineimap.org/),
|
||||
[`mbsync`](http://isync.sourceforge.net) or
|
||||
[`fetchmail`](http://www.fetchmail.info/)). `mu4e` is designed to
|
||||
enable super-efficient handling of e-mail; searching, reading,
|
||||
replying, moving, deleting. The overall 'feel' is a bit of a mix of
|
||||
[`dired`](http://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html)
|
||||
and [Wanderlust](http://www.gohome.org/wl/).
|
||||
|
||||
Features include:
|
||||
|
||||
- Fully search-based: there are no folders, only queries
|
||||
- UI optimized for speed with quick key strokes for common actions
|
||||
- Fully documented, with example configurations
|
||||
- Asynchronous: heavy actions never block emacs
|
||||
- Write rich-text e-mails using /org-mode/ (experimental)
|
||||
- Address auto-completion based on your messages -- no need for
|
||||
managing address books
|
||||
- Extendable in many places using custom actions
|
||||
|
||||
For all the details, please see the [manual](mu4e/), or
|
||||
check the screenshots below. `mu4e` is part of the normal
|
||||
[mu source package](http://code.google.com/p/mu0/downloads/list) and
|
||||
also [available on Github](https://github.com/djcb/mu).
|
||||
|
||||
# Screenshots
|
||||
|
||||
## The main view
|
||||
<img src="mu4e-1.png">
|
||||
|
||||
## The headers view
|
||||
<img src="mu4e-2.png">
|
||||
|
||||
## The message view
|
||||
<img src="mu4e-3.png">
|
||||
|
||||
## The message/headers split view (0.9.8.4)
|
||||
|
||||
<img src="mu4e-splitview.png">
|
||||
|
||||
The message/headers split view, and speedbar support.
|
||||
|
||||
## View message as pdf (0.9.8.4)
|
||||
|
||||
<img src="mu4egraph.png">
|
||||
|
||||
## License & Copyright
|
||||
|
||||
*mu4e* was designed and implemented by Dirk-Jan C. Binnema, and is
|
||||
Free Software, licensed under the GNU GPLv3
|
Before Width: | Height: | Size: 358 KiB |
BIN
www/mug-full.png
Before Width: | Height: | Size: 564 KiB |
Before Width: | Height: | Size: 43 KiB |
39
www/mug.org
|
@ -1,39 +0,0 @@
|
|||
#+title: Mug
|
||||
#+html:<a href="index.html"><img src="mu-small.png" border="0" align="right"/></a>
|
||||
#+style: <link rel="stylesheet" type="text/css" href="mu.css">
|
||||
|
||||
|
||||
* Mug
|
||||
/Mug/ is a toy/demo user-interface for =mu=. It is not installable, you'll need
|
||||
to run it from its source directory.
|
||||
|
||||
Mug comes in two flavors:
|
||||
- =mug= (in toys/mug), old simple UI, only adding dependency to GTK+
|
||||
- =mug2= (in toys/mug2), the new UI, which requires GTK+, Webkit and a
|
||||
recent GLib.
|
||||
|
||||
The plan for =mug= is to be a testing ground for the widget-code which will
|
||||
slowly evolve into a full-featured UI.
|
||||
|
||||
#+html:<a href="mug-full.png"><img src="mug-thumb.png" border="0" align="center"/></a>
|
||||
|
||||
=mug2= supports:
|
||||
- HTML email
|
||||
- attachments (including in-place opening, drag & drop to desktop)
|
||||
- bookmarks (see the =mu-bookmarks= man page, the UI will load these in the
|
||||
left pane)
|
||||
- view source
|
||||
|
||||
#+html:<hr/><div align="center">© 2011 Dirk-Jan C. Binnema</div>
|
||||
#+begin_html
|
||||
<script type="text/javascript">
|
||||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
||||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
var pageTracker = _gat._getTracker("UA-578531-1");
|
||||
pageTracker._trackPageview();
|
||||
</script>
|
||||
#+end_html
|
||||
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
permalink: code/mu/old-news.html
|
||||
---
|
||||
|
||||
# Old news
|
||||
|
||||
- 2011-07-31: mu *0.9.7-pre* is now available with a number of interesting
|
||||
new features and fixes, many based on user suggestions. `mu` now supports
|
||||
/mail threading/ based on the [JWZ-algorithm](http://www.jwz.org/doc/threading.html); output is now automatically
|
||||
converted to the user-locale; `mu view` can output separators between
|
||||
messages for easier processing, support for X-Label-tags, and last but not
|
||||
least, `mu` now has bindings for the [Guile](http://www.gnu.org/s/guile/) (Scheme) programming language -
|
||||
there is a new toy (`toys/muile`) that allows you to inspect messages and
|
||||
do all kinds of statistics - see the [README](https://gitorious.org/mu/mu/blobs/master/toys/muile/README) for more information.
|
||||
|
||||
- 2011-06-02: after quite a bit of testing, *0.9.6* has been promoted to be
|
||||
the next release -- forget about the 'bèta'. Development continues for
|
||||
the next release.
|
||||
|
||||
- 2011-05-28: *mu-0.9.6* (bèta). A lot of internal changes, but also quite
|
||||
some new features, for example:
|
||||
- wild-card searching for most fields: mu find 'car*'
|
||||
- search for message with certain attachments with 'attach:/a:': mu find
|
||||
'attach:resume*'
|
||||
- color for `mu find`, `mu cfind`, `mu extract` and `mu view`
|
||||
Everything is documented in the man-pages, and there are examples in the [[file:cheatsheet.org][mu
|
||||
cheatsheet]].
|
||||
|
||||
- 2011-04-25: *mu-0.9.5* a small, but important, bugfix in maildir-detection,
|
||||
some small optimizations.
|
||||
|
||||
- 2011-04-12: *mu 0.9.4* released - adds the `cfind` command, to find
|
||||
contacts (name + e-mail); add `flag:unread` which is a synonym for
|
||||
`flag:new OR NOT flag:seen`. Updates to the documentation and some internal
|
||||
updates. This is a *bèta-version*.
|
||||
|
||||
- 2011-02-13: *mu 0.9.3*; fixes a bunch of minor issues in 0.9.2; updated the
|
||||
web page with pages for [mu cheatsheet](file:mug.org][mug]] (the experimental UI) and the [[file:cheatsheet.org).
|
||||
|
||||
- 2011-02-02: *mu 0.9.2* released, which adds support for matching on message
|
||||
size, and various new output format. See [NEWS](http://gitorious.org/mu/mu/blobs/master/NEWS) for all the user-visible
|
||||
changes, also from older releases.
|
||||
|
||||
|
||||
- [2010-12-05] *mu version 0.9.1* released; fixes a couple of issues users
|
||||
found with a missing icon, the unit-tests.
|
||||
- [2010-12-04] *mu version 0.9* released. Compared to the bèta-release, there
|
||||
were a number of improvements to the documentation and the unit
|
||||
tests. Pre-processing queries is a little bit smarter now, making matching
|
||||
e-mail address more eager. Experimental support for Fedora-14.
|
||||
- [2010-11-27] *mu version 0.9-beta* released. New features: searching is now
|
||||
accent-insensitive; you can now search for message priority (`prio:`),
|
||||
time-interval (`date:`) and message flags (`flag:`). Also, you can now store
|
||||
('bookmark') often-used queries. To top it off, there is a simple graphical
|
||||
UI now, called `mug`. Documentation has been update, and all known bugs have
|
||||
been fixed.
|
||||
- [2010-10-30] *mu version 0.8* released, with only some small cosmetic
|
||||
updates compared to 0.8-beta. Hurray!
|
||||
- [2010-10-23] *mu version 0.8-beta* released. The new version brings `mu
|
||||
extract` for getting the attachments from messages, improved searching
|
||||
(matching is a bit more 'greedy'), updated and extended documentation,
|
||||
including the `mu-easy` manpage with simple examples. All known
|
||||
non-enhancement bugs were fixed.
|
||||
- [2010-02-27] *mu version 0.7* released. Compared to the beta version, there
|
||||
are few changes. The maildir-matching syntax now contains a starting `/`, so
|
||||
`~/Maildir/foo/bar/(cur|new)/msg` can be matched with `m:/foo/bar`. The
|
||||
top-level maildir can be matched with `m:/`. Apart from that, there are so
|
||||
small cosmetic fixes and documentation updates.
|
||||
- [2010-02-11] *mu version 0.7-beta* released. A lot of changes:
|
||||
- Automatic database scheme version check, notifies users when an
|
||||
upgrade is needed
|
||||
- Adds the `mu view` command, to view mail message files
|
||||
- Removes the 10K match limit
|
||||
- Support for unattended upgrades - that is, the database can
|
||||
automatically be upgraded (`--autoupgrade`). Also, the log file is
|
||||
automatically cleaned when it gets too big (unless you use
|
||||
`--nocleanup`)
|
||||
- Search for a certain Maildir using the `maildir:`,`m:` search
|
||||
prefixes. For example, you can find all messages located in
|
||||
`~/Maildir/foo/bar/(cur|new)/msg` with `m:foo/bar`. This replaces the
|
||||
search for path/p in 0.6
|
||||
- Fixes for reported issues #17 and #18
|
||||
- A test suite with a growing number of unit tests
|
||||
- Updated documentation
|
||||
- Many internal refactoring and other changes
|
||||
This version has been
|
||||
tagged as `v0.7-beta` in repository, and must be considered a code-complete
|
||||
preview of the upcoming release 0.7. Please report any problems you encounter
|
||||
with it.
|