1
0
mirror of https://github.com/djcb/mu.git synced 2024-06-28 07:41:04 +02:00
mu/toys/muile
2011-07-16 19:46:52 +03:00
..
Makefile.am * some more work on the guile bindings; somewhat working, still WIP 2011-07-13 00:54:06 +03:00
mu-stats.scm * update guile-stats functions a bit 2011-07-16 19:46:52 +03:00
muile.cc * some more work on the guile bindings; somewhat working, still WIP 2011-07-13 00:54:06 +03:00
README * add muile/README with some basic instructions 2011-07-15 23:52:39 +03:00

* README

** What is muile?

  `muile' is a little experiment/toy using the equally mu guile bindings, to be
  found in libmuguile/ in the top-level source directory.

  `guile'[1] is an interpreter/library for the Scheme programming language[2],
  specifically meant for extending other programs. It is, in fact, the
  official GNU language for doing so.

  The combination of mu + guile is called `muile', and allows you to write
  little Scheme-programs to query the mu-database, or inspect individual
  messages. It is still in an experimental stage, but useful already.

** How do I get it?

   The git-version and the future 0.9.7 version of mu will automatically build
   muile if you have guile. I've been using guile 2.x from git, but installing
   the 'guile-1.8-dev' package (Ubuntu/Debian) should do the trick (I did not
   test with 1.8 though).

   Then, configure mu. The configure output should tell you about whether guile
   was found (and where). If it's found, build mu, and toys/muile should be
   created, as well.

** What can I do with it?
   
   Go to toys/muile and start muile. You'll end up with a guile-shell where you
   can type scheme [1], it looks something like this (for guile 2.x):

   ,----
   | scheme@(guile-user)>
   `----

  Now, let's load a message (of course, replace with a message on your system):

   ,----
   | scheme@(guile-user)> (define msg (mu:msg:make-from-file "/home/djcb/Maildir/cur/12131e7b20a2:2,S"))                                                                               
   `----

  This defines a variable 'msg', which holds some message on your file
  system. It's now easy to inspect this message:

   ,----
   | scheme@(guile-user)> (define msg (mu:msg:make-from-file "/home/djcb/Maildir/cur/12131e7b20a2:2,S"))                                                                               
   `----

   Now, we can inspect this message a bit:
   ,----
   | scheme@(guile-user)> (mu:msg:subject msg)
   | $1 = "See me in bikini :-)"
   | scheme@(guile-user)> (mu:msg:flags msg)
   | $2 = (attach unread)
   `----
   
   and so on. Note, it's probably easiest to explore the various mu: methods
   using autocompletion; to enable that make sure you have 

     (use-modules (ice-9 readline))
     (activate-readline)

   in your ~/.guile configuration.  
   
** Can I do some statistics on my messages?

   Yes you can. It's pretty easy in guile. See the mu:stats functions.
      



[1] http://www.gnu.org/s/guile/
[2] http://en.wikipedia.org/wiki/Scheme_(programming_language)

# Local Variables:
# mode: org; org-startup-folded: nil
# End: