Has anyone here played with notmuch� in combination with Gnus? I see it
has an Emacs-interface, but I haven't tried it yet.
(It is still indexing my 140k emails :-))
Best regards,
Adam
--
"I'm sorry I sound calm. I assure you that Adam Sj�gren
I am hysterical." as...@koldfront.dk
Hi Adam,
> Has anyone here played with notmuch¹ in combination with Gnus? I see
> it has an Emacs-interface, but I haven't tried it yet.
>
> (It is still indexing my 140k emails :-))
While you are still indexing, I already use it, and it's fantastic. :-)
Bye,
Tassilo
> While you are still indexing, I already use it, and it's fantastic. :-)
With Gnus? Could you share some of your experiences, setup etc.?
Best regards,
Adam
--
"What are you doing?" Adam Sj�gren
"Being 'cool'." as...@koldfront.dk
"You look more like you're being bored."
"The world bores you when you're cool."
Hi Adam,
>> While you are still indexing, I already use it, and it's
>> fantastic. :-)
>
> With Gnus? Could you share some of your experiences, setup etc.?
Sure. I use notmuch as search engine only, and do replying and normal
reading in Gnus. So the most important part is to be able to jump from
a *notmuch-show* buffer to exactly that message in Gnus. Here's the
code that here:
--8<---------------cut here---------------start------------->8---
(require 'notmuch)
(defun th-notmuch-file-to-group (file)
"Calculate the Gnus group name from the given file name.
Example:
IN: /home/horn/Mail/Dovecot/Fastmail/.INBOX.mailinglists.notmuch/cur/1259184569.M4818P3384.localhost,W=6921:2,S
OUT: nnimap+Fastmail:INBOX.mailinglists.notmuch
IN: /home/horn/Mail/Dovecot/Fastmail/cur/1259176906.M17483P24679.localhost,W=2488:2,S
OUT:nnimap+Fastmail:INBOX"
(let ((group (file-name-directory (directory-file-name (file-name-directory file)))))
(setq group (replace-regexp-in-string "/home/horn/Mail/Dovecot/" "" group))
(setq group (replace-regexp-in-string "^\\([^/]+\\)/" "nnimap+\\1:" group t))
(setq group (replace-regexp-in-string "/$" "" group))
(if (string-match ":$" group)
(concat group "INBOX")
(replace-regexp-in-string ":\\." ":" group))))
(defun th-notmuch-goto-message-in-gnus ()
"Open a summary buffer containing the current notmuch
article."
(interactive)
(let ((group (th-notmuch-file-to-group (notmuch-show-get-filename)))
(message-id (replace-regexp-in-string
"^id:" "" (notmuch-show-get-message-id))))
(if (and group message-id)
(org-gnus-follow-link group message-id)
(message "Couldn't get relevant infos for switching to Gnus."))))
(define-key notmuch-show-mode-map (kbd "C-c C-c") 'th-notmuch-goto-message-in-gnus)
--8<---------------cut here---------------end--------------->8---
The code assumes that one has his mails in a Maildir. (I use a local
Dovecot IMAP client, which uses Maildir as default-backend.)
Additionally, it assumes that the Gnus server names (Fastmail and Uni)
equal the top-level maildir directories.
So most users will need to write an own version of
th-notmuch-file-to-group, but th-notmuch-goto-message-in-gnus should be
general.
The quintessence is that it uses org-gnus-follow-link, which comes with
org-mode and is also included in emacs 23.1 and newer.
Bye,
Tassilo
I've played around with it, and while I really like the concept, I'll
stick with mairix for the time being. Since I've written nnmairix, this
is probably not a big surprise, though. ;-)
Basically, at the moment it seems a bit too slow for me. I have about
40k mails on an Intel Dualcore:
notmuch search "from:de...@randomsample.de"
0.74s user 0.41s system 7% cpu 14.650 total
Granted, subsequent (but identical!) searches are much faster:
notmuch search "from:de...@randomsample.de"
0.41s user 0.11s system 99% cpu 0.521 total
But still, with mairix I get
mairix -t -r "f:de...@randomsample.de"
0.01s user 0.01s system 12% cpu 0.123 total
I know that notmuch supports tagging and Xapian supports much more
sophisticated searches than mairix, but I do not currently need that.
(If I have missed something in the configuration which would make
searching much faster, I'd love to hear about it.)
-David