[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mu for wanderlust



Hi,

Some years ago, I wrote mu[1], a tool for indexing/searching Maildir messages
using Xapian. It worked quite well in combination with 'mutt'. Well, times
have changed, and I'm a quite happy Wanderlust user now[2].

In the last few weeks, I did a major overhaul of mu, and also I wrote a little
elisp glue to use Wanderlust with mu (version 0.6-beta that I just released);
see below; the integration is really nice, just press Q to query; things are
documented reasonably well in the mu manpage.

Anyway, Wanderlust + mu has worked really well for me in the last few weeks,
but admittedly, I am a little biased :). If you use Maildirs, give it a try,
and please tell me about any problems.

Thanks,
Dirk.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar mu-wl-mu-program     "mu")
(defvar mu-wl-search-folder  "search")

(defun mu-wl-search ()
  "search a maildir using `mu', and jump to a folder with the
results"
  (interactive)
  (let* ((muexpr (read-string "Find messages matching: "))
	  (sfldr  (concat elmo-maildir-folder-path "/" mu-wl-search-folder))
	  (cmdline (concat mu-wl-mu-program " find "
		      "--clearlinks --linksdir='" sfldr "' " muexpr)))
    (= 0 (shell-command cmdline))))

(defun mu-wl-search-and-goto ()
  "search and jump to the folder with the results"
  (interactive)
  
  (if (mu-wl-search)
    (wl-summary-goto-folder-subr (concat "." mu-wl-search-folder)
      'force-update nil nil t)
    (message "Query failed")))

(define-key wl-summary-mode-map (kbd "Q") ;; => query
  '(lambda()(interactive)(mu-wl-search-and-goto))) 
(define-key wl-folder-mode-map (kbd "Q") ;; => query
  '(lambda()(interactive)(mu-wl-search-and-goto))) 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Best wishes,
Dirk.


[1] http://www.djcbsoftware.nl/code/mu
    http://gitorious.org/mu/mu-ng

[2] well, there are the problems when using non-ascii on emacs 23

-- 
Dirk-Jan C. Binnema                  Helsinki, Finland
e:djcb@djcbsoftware.nl           w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C