Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W3m stgit: refresh to latest mu #1

Open
wants to merge 187 commits into
base: w3m-stgit
Choose a base branch
from
Open
Changes from 16 commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
ab841c5
* mu4e: set overwrite mode to nil in mu4e-headers-mode
djcb May 27, 2013
9e34aec
Fix typos.
sje30 May 28, 2013
a41925a
Merge pull request #229 from sje30/master
djcb May 28, 2013
d66063c
* merge branch 'master' of github.com:djcb/mu
djcb May 28, 2013
08748f2
* mu4e: add mu4e-change-filenames-when-moving customization
djcb May 28, 2013
c0fce88
fix file size in test-mu-guile.scm changed by e97ec2d5
jynnantonix May 29, 2013
a7f7179
Merge pull request #231 from jynnantonix/guile-test
djcb May 29, 2013
b136ca0
* try harder to match special strings
djcb May 29, 2013
b19ab68
* configure.ac: report on guile version
djcb May 30, 2013
e7c63ce
* update some unit tests
djcb May 30, 2013
60f75ee
* minor
djcb May 30, 2013
d57b109
* mu-str: treat '..' in non-range fields differently
djcb Jun 1, 2013
844790a
* lib: mu date: better handling of date fields in newer xapians
djcb Jun 1, 2013
3c67aa6
* mu4e: fix a few compiler warnings / typos
djcb Jun 3, 2013
d6337b7
* mu4e: fix typo in Makefile.am
djcb Jun 3, 2013
13efc74
* mu-query: better handle empty lhs/rhs in date intervals
djcb Jun 3, 2013
34c84a1
* mu4e: fix mu4e-message
djcb Jun 3, 2013
fd990c4
Document what happens if either the left or right part of a date range
sje30 Jun 3, 2013
ff42099
Merge pull request #233 from sje30/master
djcb Jun 3, 2013
60c8427
One small typo; should this file also mention explicitly the way
sje30 Jun 3, 2013
6250137
Small typo.
sje30 Jun 3, 2013
fcbe03e
Fix Typos.
sje30 Jun 3, 2013
59d0fd0
Typos.
sje30 Jun 3, 2013
e40cc41
Typo.
sje30 Jun 3, 2013
4fc104c
Do you mean --quiet rather than --verbose?
sje30 Jun 3, 2013
a98157b
Typos.
sje30 Jun 3, 2013
3d6bd59
Typos; but check also if default logfile location is correct.
sje30 Jun 3, 2013
f424160
Typos.
sje30 Jun 3, 2013
bd12c4b
Merge pull request #234 from sje30/master
djcb Jun 3, 2013
aefa144
handle the case where phrase is empty
Jun 5, 2013
c511ae7
also try to avoid unnecessary quotes when replying (see issue #217)
Jun 5, 2013
2b3b0d0
wrong comment, probably copied from add code. params[0] is remove of …
Jun 5, 2013
d2dd0a8
* guile: add find-dups script, to find duplicate messages
djcb Jun 7, 2013
7180b30
Merge pull request #238 from jhelberg/master
djcb Jun 7, 2013
74feede
* mu4e: check marks in headers context (fixes issue #200)
djcb Jun 8, 2013
5540361
* mu-find.1: small update
djcb Jun 8, 2013
3d38532
* mu4e-draft: fix typo in patch
djcb Jun 8, 2013
03a79fc
* mu4e: fix typo
djcb Jun 8, 2013
59d0a30
* make mu4e-compose-hidden-headers a public defvar; implements issue …
djcb Jun 8, 2013
05bfd23
* guile: make running guile scripts a bit more convenient, document it
djcb Jun 9, 2013
47a63d2
* cosmetics
djcb Jun 9, 2013
bd4f109
* mu-guile.texi: minor change; may fix compilation
djcb Jun 9, 2013
8d3e33e
* mu4e: add note about notmuch conflict to FAQ (thanks to mistrey)
djcb Jun 10, 2013
b57ae66
* mu4e: small tweaks to the manual
djcb Jun 12, 2013
c581468
* mu4e: some minor changes
djcb Jun 13, 2013
fa51443
* merge branch 'master' of github.com:djcb/mu
djcb Jun 13, 2013
ec28eb3
* mu4e: widen before sending messages
djcb Jun 14, 2013
ebc718a
* mu4e: update documentation on queries / bookmarks as bit
djcb Jun 16, 2013
88459d5
* mu4e-view: use e-mail address as string for the display property; f…
djcb Jun 16, 2013
42604fe
* lib: mu-contacts: store frequency
djcb Jun 16, 2013
401f30e
* mu4e: workaround(?) for the issue with '*' in the main action strings
djcb Jun 16, 2013
bfe74d1
* mu: add the backend for freq information for contacts
djcb Jun 16, 2013
ae61280
* mu4e: some updates to the documentation
djcb Jun 16, 2013
76a87de
* mu4e-utils: support the new format for the contacts list
djcb Jun 16, 2013
15936cf
* cosmetics
djcb Jun 16, 2013
6ac32ef
* mu4e: add FAQ about UTF-7-encoded dirs, lack of UTF-8-supported in …
djcb Jun 16, 2013
6783e44
* mu-str: add mu_str_remove_ctrl_in_place
djcb Jun 24, 2013
9790956
* mu-contacts, mu-msg-file: better deal with contacts with control chars
djcb Jun 24, 2013
900fb57
* mu4e-view.el: fixup display of contacts with control chars
djcb Jun 24, 2013
916e0f9
* man: fix mu-view manpage
djcb Jun 24, 2013
7fe3733
* cosmetics
djcb Jun 24, 2013
7e78b6e
added a "untrash" function, perfectly analogous to "unflag", that sim…
Jun 28, 2013
0b76ccc
Merge pull request #245 from jfb/master
djcb Jun 29, 2013
9976842
* mu4e: add 'untrash' to documentation
djcb Jun 29, 2013
06b3142
* mu4e: check marks also when coming from mu4e-main; fixes issue #244
djcb Jun 29, 2013
72e6fb9
* mu4e: make the byte-compiler happy
djcb Jun 29, 2013
59666a7
* mu4e: automatically refresh the contacts list when there are change…
djcb Jun 29, 2013
81eeff1
* mu4e: add note about deprecating org-mode editing to doc
djcb Jun 30, 2013
81c3e11
* mu-flags: add MU_FLAG_LIST, clean-up code a bit
djcb Jul 3, 2013
3eb7487
* mu-msg-file: set the MU_FLAG_LIST flag, if the message looks like a…
djcb Jul 3, 2013
1fcedf7
* mu-mgs-store: support the MU_FLAG_LIST flag
djcb Jul 3, 2013
3c3cd31
* mu-str: fix a leak
djcb Jul 3, 2013
312c3a4
* cosmetic
djcb Jul 3, 2013
4f38863
* document the new flag:list
djcb Jul 3, 2013
c7c1850
* mu4e: update documentation
djcb Jul 6, 2013
b26bd3a
* mu4e: do a better job of trying to show images (without delay)
djcb Jul 6, 2013
36cb8b3
* mu4e: update docs
djcb Jul 6, 2013
da292b7
* mu4e: make sure to clear the 'loading' buffer; fixes issue #170
djcb Jul 6, 2013
e7e38e9
* typo
djcb Jul 6, 2013
b17f265
* mu: unbreak unit test after flag changes (fixes #247)
djcb Jul 7, 2013
5ecbb40
* mu4e: when replying to messages written by self, keep the same to:/cc:
djcb Jul 7, 2013
406e310
* mu4e: prefix thread levels with a single space (rather than two)
djcb Jul 7, 2013
8656f67
* mu4e: complete the new reply-to-your-own-messages behavior + docume…
djcb Jul 17, 2013
b7324d5
* cleanup: drop gmime-2.4 support
djcb Jul 21, 2013
b7219aa
* guile: some update for the output format
djcb Jul 23, 2013
8855547
* mu: some improvement in script handling
djcb Jul 23, 2013
f7eefcf
* cosmetics
djcb Aug 11, 2013
beffb80
* mu4e: add variable mu4e-hide-index-messages
djcb Aug 11, 2013
fa6d63a
* mu4e-utils: fix display of messages only consisting of an image
djcb Aug 11, 2013
80622eb
* fix pmccabe check
djcb Aug 14, 2013
f89447e
* mu_util_fputs_encoded: updated; perhaps helps with freebsd crash?
djcb Aug 14, 2013
6a098c7
* update some comments
djcb Aug 17, 2013
2446b4d
* mu4e.texi: some updates to the docs
djcb Aug 24, 2013
8da4ff3
* mu-find: add the summary-len option
djcb Aug 24, 2013
c30ffee
* small cleanups (macos)
djcb Aug 25, 2013
59b0ae1
* update mu-index manpage (remove the outdate exit codes)
djcb Sep 7, 2013
df58925
* mu4e: update the list of known mailing-lists
djcb Sep 7, 2013
13bad9a
* better error message for some broken queries
djcb Sep 7, 2013
827dfbe
* mu-date: small optimization
djcb Sep 7, 2013
af55f4c
* update mu_date_str_to_time_t for macos
djcb Sep 7, 2013
cdb1af0
* fix the mu_util_fputs_encoded/bsd heisenbug
djcb Sep 7, 2013
97e821b
* update gitignore
djcb Sep 7, 2013
6e8e9ec
New flexible method of customising completing-read
hickinbottoms Sep 12, 2013
2d8bf0d
mu4e: always consider text/calendar message parts as attachments
abend Sep 17, 2013
defca5d
mu4e: add long datetime tooltip to human-date field in headers view.
abend Sep 17, 2013
ecea7de
Merge pull request #268 from hickinbottoms/completing-read-choice
djcb Sep 18, 2013
11e8850
* update doc for mu4e-completing-read-function
djcb Sep 18, 2013
efe775e
Merge pull request #271 from abend/icalendar-as-attachment
djcb Sep 18, 2013
66b0a3a
Merge pull request #272 from abend/long-date-tooltip
djcb Sep 18, 2013
def8094
* mu4e: make the mu4e-headers-long-date-format default a bit more... …
djcb Sep 18, 2013
48ae6bf
fix up a couple of menu entries
zhenya-1007 Sep 24, 2013
d6c01a5
* mu4e-view: fix help-echo for urls
djcb Sep 27, 2013
86e6c6c
Added maxnum argument to mu find.
tmalsburg-test Sep 27, 2013
3dfcb8e
Handle maxnum=0 the same way as in mu server.
tmalsburg-test Sep 27, 2013
a23f1a4
* mu4e: enable showing the message-id in the view (and even the headers)
djcb Sep 28, 2013
a3b3baf
* mu4e: update mu4e-compose-pre-hook documentation
djcb Sep 28, 2013
d5af5a9
* man: remove the non-existent --include-unreadable option (mu-find)
djcb Sep 28, 2013
a9772b4
Merge pull request #276 from zhenya1007/master
djcb Sep 28, 2013
4bdd644
Merge pull request #277 from tmalsburg/master
djcb Sep 28, 2013
0aa1cd5
* mu: small fix for compiler warning
djcb Sep 28, 2013
631e9c2
* mu: fix some problems with the option parser (so e.g. --version wor…
djcb Sep 28, 2013
128a17b
mu4e-actions.el: make git apply patch history aware
stsquad Oct 3, 2013
4b0cb4d
* mu4e: allow for custom header fields (see `mu4e-header-info-custom')
djcb Oct 5, 2013
85309a8
* bump version to 0.9.6-pre2
djcb Oct 5, 2013
a2c9b26
* goes with the previous
djcb Oct 5, 2013
7ea092c
* mu4e: fix docstring
djcb Oct 6, 2013
c898265
* use timegm instead of the tzset hack
djcb Oct 6, 2013
cba8515
* merge branch 'master' of github.com:djcb/mu
djcb Oct 6, 2013
59c74e0
* mu-config: fix typo
djcb Oct 7, 2013
fee25f4
Merge pull request #283 from stsquad/history-aware-git-apply
djcb Oct 8, 2013
7472a3b
* mu4e: mu4e-actions: require 'ido'
djcb Oct 8, 2013
8da15dc
* mu4e/mu4e-main.el (mu4e-interrupt-update-mail): New function to sto…
Oct 8, 2013
4bfaedd
* mu4e/mu4e-utils.el (mu4e-update-mail-and-index): Don't make window …
Oct 8, 2013
ac89861
* mu4e/mu4e-main.el (mu4e-interrupt-update-mail): Move to mu4e-utils.el.
Oct 9, 2013
f707728
* mu4e: don't suggest helm-comp-read for completing-read
djcb Oct 9, 2013
9170341
Merge pull request #285 from thierryvolpiatto/master
djcb Oct 9, 2013
a228429
* guile: update command-line arguments in scripts
djcb Oct 9, 2013
f650eec
* mu4e/mu4e-utils.el (mu4e~update-mail-mode): New mode to use when up…
Oct 10, 2013
7a9fff7
* mu4e/mu4e-view.el: Fix usage of backspace (scroll only).
Oct 10, 2013
3f554f0
* mu4e/mu4e-view.el: Fix, backspace should be scroll-down.
Oct 10, 2013
b0d7d70
Merge pull request #288 from thierryvolpiatto/master
djcb Oct 10, 2013
5634722
* mu4e: don't append to attachment name when retryiing
djcb Oct 12, 2013
347b41c
* cosmetic
djcb Oct 12, 2013
bcc53d2
* mu4e: some updates to the reference doc
djcb Oct 12, 2013
03ae065
* mu4e: some cleanups
djcb Oct 12, 2013
fc54e4a
* toys/mug: remove -DGTK_DISABLE_DEPRECATED for now, since it breaks …
djcb Oct 13, 2013
4401135
* mu4e: mu4e-view-fill-headers to enable/disable header filling
djcb Oct 13, 2013
66ebdf2
* mu4e: don't try to kill the visible window when there is none (than…
djcb Oct 13, 2013
edfdef4
index: improve error message when file does not seem to be an email
djcb Oct 13, 2013
c36030a
* handle message-ids a bit specially, update unit tests
djcb Oct 13, 2013
92158cf
* mu4e: add hooks mu4e-headers-found-hook and mu4e-update-pre-hook, d…
djcb Oct 13, 2013
8be5e92
* mu4e: fix display of images
djcb Oct 13, 2013
9abaf83
* mu4e: don't balk on searches with no results and some cleanups
djcb Oct 13, 2013
b92e2d2
* mu4e: fix some minor things in the main page
djcb Oct 14, 2013
cf4c658
* mu4e: don't list footers as attachments
djcb Oct 14, 2013
020a13d
* cosmetics
djcb Oct 14, 2013
dd83c23
guile: minor updates
djcb Oct 14, 2013
feec45a
* minor
djcb Oct 14, 2013
e1a6461
* mu4e: fix typo
djcb Oct 14, 2013
65fd009
* mu4e/mu4e-headers.el (mu4e-headers-mode): Fix typo.
Oct 15, 2013
0e1efc8
Merge remote-tracking branch 'refs/remotes/upstream/master'
Oct 16, 2013
78ffccf
* mu4e/mu4e-utils.el (mu4e-update-mail-and-index): Don't run a new pr…
Oct 16, 2013
aa7592d
* mu4e/mu4e-compose.el (mu4e~compose-handler): Wait buffer setup befo…
Oct 17, 2013
852ac46
* mu4e: allow mu4e-html2text-command to be a function (thanks to tmal…
djcb Oct 19, 2013
b53d2ec
* mu4e: make the faces a bit more generic
djcb Oct 19, 2013
8669fd8
* mu4e: small improvement in mu4e-headers-found-hook defcustom
djcb Oct 19, 2013
b6dee49
* mu4e-draft: small faces update
djcb Oct 19, 2013
33b5844
Merge pull request #300 from thierryvolpiatto/master
djcb Oct 19, 2013
2df31c8
* mu4e: restore the old update-buffer behaviour
djcb Oct 19, 2013
a92bc97
* mu4e: fix faces in the mu4e-main
djcb Oct 19, 2013
1fca0be
* mu4e: some improvements in the update-mail window behaviour (wip)
djcb Oct 19, 2013
55d6057
* mu4e: some more work on the updating process
djcb Oct 19, 2013
9c8101d
* mu4e: centralize some of the fontification code; cleanup signature …
djcb Oct 20, 2013
c171a61
* mu4e: run mu4e-view-mode only when the marked-as-read message is re…
djcb Oct 20, 2013
9ddb751
* mu: initialize randomness in mu-cmd-server
djcb Oct 20, 2013
86aafa7
* mu4e: don't error out if no empty lines are found
djcb Oct 21, 2013
44e9230
* mu4e: make sure the sent-hook is only defined as *local* in mu4e-co…
djcb Oct 22, 2013
162619f
* mu4e: don't error out on parts without mime-type
djcb Oct 23, 2013
43e8ec5
add w3m html rendering
arbelt Feb 9, 2013
8fd2b7f
some tweaks to org-mu4e to make messages more email-friendly
arbelt Feb 9, 2013
9445c2f
Improve w3m rendering:
arbelt Feb 9, 2013
b6dac49
change display header code to use widgets and insert directly into bu…
arbelt Feb 14, 2013
d01845c
Make widget types for interactive display elements
arbelt Feb 15, 2013
7d18407
add missing mu4e-wash.el file
arbelt Feb 15, 2013
670e680
* added defcustom for wash functions
arbelt May 27, 2013
ca8e87a
* unset w3m-minor-mode when switching to plain text part
arbelt May 28, 2013
88b5f90
* add new files to makefile
arbelt May 28, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 97 additions & 47 deletions guile/mu-guile.texi
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ Documentation License.''

@titlepage
@title @t{mu-guile} - extending @t{mu} with Guile Scheme
@subtitle{version @value{mu-version}}
@subtitle version @value{mu-version}
@author Dirk-Jan C. Binnema

@c The following two commands start the copyright page.
@@ -59,7 +59,7 @@ Welcome to @t{mu-guile}!
@t{mu} is a program for indexing and searching your e-mails. It can search
your messages in many different ways, but sometimes that may not be
enough. If you have very specific queries, or want do generate some
statistics, you need some more power.
statistics, you need some more power.

@t{mu-guile} is made for those cases. @t{mu-guile} exposes the internals of
@t{mu} and its database to the @t{guile} programming language. Guile is the
@@ -80,6 +80,7 @@ Trust me, it's not very hard -- and it it's @emph{fun}!
* Attachments and other parts::
* Statistics::
* Plotting data::
* Writing scripts::

Appendices

@@ -94,29 +95,30 @@ Appendices
* Making sure it works::
@end menu

This chapter walks you through the installation and the basic setup.
This chapter walks you through the installation and the basic setup.

@node Installation
@section Installation

@t{mu-guile} is part of @t{mu} - by installing the latter, the former is
installed as well. At the time of writing, there are no distribution-provided
packaged versions of @t{mu-guile}; so for now, you need to follow the steps
below.
necessarily installed as well. At the time of writing, there are no
distribution-provided packaged versions of @t{mu-guile}; so for now, you need
to follow the steps below.

@subsection Guile 2.x

@t{mu-guile} is built automatically when @t{mu} is built, if you have
@t{guile} installed (@t{mu} checks for this during @t{configure}). Thus, the
first step is to ensure you have @t{guile} installed.
@t{guile} version 2 or higher. (@t{mu} checks for this during
@t{configure}). Thus, the first step is to ensure you have @t{guile}
installed.

On Debian/Ubuntu you can install @t{guile} 2.x using the @t{guile-2.0-dev}
package (and its dependencies):
@example
$ sudo apt-get install guile-2.0-dev
@end example

At the time of write, there are no official packages for
At the time of writing, there are no official packages for
Fedora@footnote{@url{https://bugzilla.redhat.com/show_bug.cgi?id=678238}}. If
you are using Fedora or any other system that does not have packages, you need
to compile @t{guile} from
@@ -139,9 +141,6 @@ $ sudo yum install gnuplot

@subsection mu

At the time of writing, there are no distribution packages for @t{mu-guile},
so we are assuming installation from source packages.

Assuming @t{guile} 2.x is installed correctly, @t{mu} finds it during its
@t{configure}-stage, and creates @t{mu-guile}. Building @t{mu} follows the
normal steps -- please see the @t{mu} documentation for the details.
@@ -227,7 +226,7 @@ Now, copy-paste the following after the prompt:

@noindent
After pressing @key{Enter}, you should get a list of all subjects of messages
that match @t{hello}:
that match @t{hello}:

@verbatim
...
@@ -240,7 +239,7 @@ Subject: When all is lost

@noindent
If all this works, congratulations! @t{mu-guile} is installed now, ready to
serve your every whim!
serve your every searching need!

@node Initializing mu-guile
@chapter Initializing mu-guile
@@ -269,7 +268,7 @@ This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)>
scheme@(guile-user)>
@end verbatim
@end cartouche

@@ -293,7 +292,7 @@ scheme@(guile-user)> (mu:initialize)
This opens the database for reading, using the default location of
@file{~/.mu}@footnote{If you keep your @t{mu} database in a non-standard
place, use @code{(mu:initialize "/path/to/my/mu/")}}

Now, @t{mu-guile} is ready to go. In the next chapter, we go through the
modules and show what you can do with them.

@@ -311,15 +310,15 @@ In this chapter, we discuss searching messages and doing things with them.
@node Finding messages
@section Finding messages
Now we are ready to retrieve some messages from the system. There are two main
functions to do this:
procedures to do this:

@itemize
@item @code{(mu:message-list [<search-expression>])}
@item @code{(mu:for-each-message <function> [<search-expression>])}
@item @code{(mu:for-each-message <procedure> [<search-expression>])}
@end itemize

@noindent
The first function, @code{mu:message-list} returns a list of all messages
The first procedure, @code{mu:message-list} returns a list of all messages
matching @t{<search-expression>}; if you leave @t{<search-expression>} out, it
returns @emph{all} messages. For example, to get all messages with @t{coffee}
in the subject line:
@@ -333,7 +332,7 @@ $1 = (#<<mu:message> 9040640> #<<mu:message> 9040630>
@noindent
Apparently, we have three messages matching @t{subject:coffee}, so we get a
list of three @code{<mu:message>} objects. Let's just use the
@code{mu:subject} function ('method') provided by @code{<mu:message>} objects
@code{mu:subject} procedure ('method') provided by @code{<mu:message>} objects
to retrieve the subject-field (more about methods in the next section).

For your convenience, @t{guile} has saved the result of our last query in a
@@ -346,8 +345,8 @@ $2 = "Re: best coffee ever!"
@end verbatim

@noindent
The second function we mentioned, @code{mu:for-each-message}, executes some
function for each message matched by the search expression (or @emph{all}
The second procedure we mentioned, @code{mu:for-each-message}, executes some
procedure for each message matched by the search expression (or @emph{all}
messages if the search expression is omitted):

@verbatim
@@ -380,7 +379,7 @@ Now that we've seen how to retrieve lists of message objects

@code{<mu:message>} defines the following methods that all take a single
@code{<mu:message>} object as a parameter. We won't go into the exact meanings
for all of these functions here - for the details about various flags /
for all of these procedures here - for the details about various flags /
properties, please refer to the @t{mu-find} man-page.

@itemize
@@ -472,19 +471,19 @@ e-mail corpus.

We can retrieve the sender and recipients of an e-mail message using methods
like @code{mu:from}, @code{mu:to} etc.; @xref{Message methods}. These
functions return the list of recipients as a single string; however, often it
procedures return the list of recipients as a single string; however, often it
is more useful to deal with recipients as separate objects.

@menu
* Contact functions and objects::
* Contact procedures and objects::
* All contacts::
* Utility functions::
* Utility procedures::
* Example - mutt export::
@end menu


@node Contact functions and objects
@section Contact functions and objects
@node Contact procedures and objects
@section Contact procedures and objects

Message objects (@pxref{Messages}) have a method @t{mu:contacts}:

@@ -529,17 +528,17 @@ Sometimes you may want to inspect @emph{all} the different contacts in the
@t{mu} database. This is useful, for instance, when exporting contacts to some
external format that can then be important in an e-mail program.

To enable this, there is the function @code{mu:for-each-contact}, defined as
To enable this, there is the procedure @code{mu:for-each-contact}, defined as

@code{(mu:for-each-contact function [search-expression])}.
@code{(mu:for-each-contact procedure [search-expression])}.

This will aggregate the unique contacts from @emph{all} messages matching
@t{<search-expression>} (when it is left empty, it will match all messages in
the database), and execute @t{function} for each of them.
the database), and execute @t{procedure} for each of them.

The @t{function} receives an object of the type @t{<mu:contact-with-stats>},
The @t{procedure} receives an object of the type @t{<mu:contact-with-stats>},
which is a @emph{subclass} of the @t{<mu:contact>} class discussed in
@xref{Contact functions and objects}. @t{<mu:contact-with-stats>} objects
@xref{Contact procedures and objects}. @t{<mu:contact-with-stats>} objects
expose the following additional methods:

@itemize
@@ -553,11 +552,11 @@ The method assumes an e-mail address is unique for a certain contact; if a
certain e-mail address occurs with different names, it uses the most recent
non-empty name.

@node Utility functions
@section Utility functions
@node Utility procedures
@section Utility procedures

To make dealing with contacts even easier, there are a number of utility
functions that can save you a bit of typing.
procedures that can save you a bit of typing.

For converting contacts to some textual form, there is @code{(mu:contact->string
<mu:contact> format)}, which takes a contact and returns a text string with
@@ -578,8 +577,8 @@ something like:
alias <nick> [<name>] "<" <email> ">"
@end verbatim

Anyway, there is the function @code{(mu:contact->string <mu:contact> format)}
that we can use to do the conversion.
@t{mu guile} provides the procedure @code{(mu:contact->string <mu:contact>
format)} that we can use to do the conversion.

We may want to focus on people with whom we have frequent correspondence; so
we may want to limit ourselves to people we have seen at least 10 times in the
@@ -654,7 +653,7 @@ if there is none.
Then, we may want to save the part to a file; this can be done using either:
@itemize
@item @code{(mu:save part <part>)} - save a part to a temporary file, return the file
name@footnote{the temporary filename is a predictable function of (user-id,
name@footnote{the temporary filename is a predictable procedure of (user-id,
msg-path, part-index)}
@item @code{(mu:save-as <part> <path>)} - save part to file at path
@end itemize
@@ -703,7 +702,7 @@ probably be a bit more elegant.
@node Statistics
@chapter Statistics

@t{mu-guile} offers some convenience functions to determine various statistics
@t{mu-guile} offers some convenience procedures to determine various statistics
about the messages in the database.

@menu
@@ -743,16 +742,16 @@ scheme@@(guile-user)> ;; subject length
scheme@@(guile-user)> (mu:correl mu:size (lambda (msg)
(string-length (mu:subject msg))) "subject:hello")
$5 = -0.10804368622292
scheme@@(guile-user)>
scheme@@(guile-user)>
@end example

@node Tabulating values
@section Tabulating values

@code{(mu:tabulate <function> [<search-expr>])} applies @t{<function>} to each
@code{(mu:tabulate <procedure> [<search-expr>])} applies @t{<procedure>} to each
message matching @t{<search-expr>} (leave empty to match @emph{all} messages),
and returns a associative list (a list of pairs) with each of the different
results of @t{<function>} and their frequencies. For fields that contain lists
results of @t{<procedure>} and their frequencies. For fields that contain lists
of values (such as address-fields), each of the values in the list is added
separately.

@@ -785,7 +784,7 @@ exec guile -s $0 $@
@end lisp


The function @code{weekday-table} uses @code{mu:tabulate-message} to get the
The procedure @code{weekday-table} uses @code{mu:tabulate-message} to get the
frequencies per hour -- this returns a list of pairs:
@verbatim
((5 . 2339) (0 . 2278) (4 . 2800) (2 . 3184) (6 . 1856) (3 . 2833) (1 . 2993))
@@ -826,10 +825,10 @@ something like this:
(sort
(mu:tabulate mu:subject)
(lambda (a b) (> (cdr a) (cdr b))))
10)
10)
@end lisp

If this is not short enough, @t{mu-guile} offers a convenience function to do
If this is not short enough, @t{mu-guile} offers a convenience procedure to do
this: @code{mu:top-n-most-frequent}. For example, to get the top-10 people we
sent mail to most often:

@@ -848,7 +847,7 @@ You can plot the results in the format produced by @code{mu:tabulate} with the
@t{gnuplot}@footnote{@url{http://www.gnuplot.info/}} program to be installed
on your system.

The @code{mu:plot-histogram} function takes the following arguments:
The @code{mu:plot-histogram} procedure takes the following arguments:

@code{(mu:plot-histogram <data> <title> <x-label> <y-label> [<want-ascii>])}

@@ -908,6 +907,57 @@ Frequency
@end verbatim
@end cartouche

@node Writing scripts
@chapter Writing scripts

The @t{mu} program has built-in support for running guile-scripts, and comes
with a number of examples.

You can get a list of all scripts with the @t{mu script} command:
@verbatim
$ mu script
Available scripts (use --verbose for details):
* find-dups: find duplicate messages
* msgs-count: count the number of messages matching some query
* msgs-per-day: graph the number of messages per day
* msgs-per-hour: graph the number of messages per hour
* msgs-per-month: graph the number of messages per month
* msgs-per-year: graph the number of messages per year
* msgs-per-year-month: graph the number of messages per year-month
@end verbatim

You can then execute such a script by its name:
@verbatim
$ mu msgs-per-month --textonly --query=hello


Messages per month matching hello

240 ++-+-----+----+-----+-----+-----+----+-----+-----+-----+----+-----+-++
| + + + + "/tmp/filewi9H0N" using 2:xticlabels(1) ****** |
220 ++ * * ******
| * * * *
200 ++ * * * +*
| * * * *
180 ++ ****** * * * +*
| * * * * * *
160 ****** * * * * * +*
* * * * * * * *
* ******* * * * * ****** * *
140 *+ ** * * * * * * ******** +*
* ** ******* * * * * * ** ** *
120 *+ ** ** ******* * * * * ** ** +*
* ** ** ** * * * ******* ** ** *
100 *+ ** ** ** * * * * ** ** ** +*
* + ** + ** + ** + * + * + + * + * + ** + ** + ** + *
80 **********************************************************************
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
Month
@end verbatim

Please refer to the @t{mu-script} man-page for some details on writing your
own scripts.

@node GNU Free Documentation License
@appendix GNU Free Documentation License

1 change: 0 additions & 1 deletion guile/mu.scm
Original file line number Diff line number Diff line change
@@ -277,7 +277,6 @@ either \"org-contact\", \"mutt-alias\", \"mutt-ab\",
"\""))
(else (error "Unsupported format")))))


;; message parts


3 changes: 2 additions & 1 deletion guile/scripts/Makefile.am
Original file line number Diff line number Diff line change
@@ -22,7 +22,8 @@ EXTRA_DIST= \
msgs-per-hour.scm \
msgs-per-month.scm \
msgs-per-day.scm \
msgs-per-year-month.scm
msgs-per-year-month.scm \
find-dups.scm

muguiledistscriptdir = $(pkgdatadir)/scripts/
muguiledistscript_SCRIPTS = $(EXTRA_DIST)
Loading