pages tagged notmuchzack's home pagehttp://upsilon.cc/~zack/tags/notmuch/zack's home pageikiwiki2015-03-09T09:21:47Zinterview for The Setuphttp://upsilon.cc/~zack/blog/posts/2015/03/interview_for_The_Setup/2015-03-09T09:21:47Z2015-03-09T09:21:47Z
<h1>my setup, take #2</h1>
<p>Look Ma, I've been <a href=
"http://stefano.zacchiroli.usesthis.com/">interviewed</a> by
<a href="http://usesthis.com/">The Setup</a>, a popular blog with
<em>"interviews asking people from all walks of life what they use
to get the job done"</em>; so I now sport a fancy <a href=
"http://stefano.zacchiroli.usesthis.com">http://stefano.zacchiroli.usesthis.com</a>
too.</p>
<p>While there is overlap with <a href=
"http://upsilon.cc/~zack/blog/posts/2014/09/interview_for_the_gnu_linux_setup/">my
previous take</a> on my setup, the questions are different so most
of the content is novel. In particular, I quite enjoyed the
question about what would be my "dream setup", and indulged in free
software/hardware desiderata.</p>
<p>Many thanks to Daniel Bogan for running the blog and kudos for
his editing work: while it's just a detail, such an abundance and
quality of link titles is not easy to come by on the Web.</p>
interview for the gnu linux setuphttp://upsilon.cc/~zack/blog/posts/2014/09/interview_for_the_gnu_linux_setup/2014-09-03T14:02:16Z2014-09-03T08:48:14Z
<h1>my setup, take #1</h1>
<p>Among the various things I've catched up with during the summer,
I've finally managed to set aside some time to answer a pending
<a href=
"http://www.mylinuxrig.com/post/96462880004/the-linux-setup-stefano-zacchiroli-former-debian">
interview</a> request for <a href=
"http://www.mylinuxrig.com/setup">The [GNU/]Linux Setup</a>: a blog
run by Steven Ovadia that collects interviews about how people use
GNU/Linux-based desktops.</p>
<p>In the interview I discuss my day to day work-flow, from GNOME
Shell to Mutt, from Emacs to Notmuch, and the various glue code
tools I've written for integrating them.</p>
<p><a href=
"http://www.mylinuxrig.com/post/96462880004/the-linux-setup-stefano-zacchiroli-former-debian">
Enjoy</a>!</p>
<p>Feedback is most welcome.</p>
mutt-notmuch is deadhttp://upsilon.cc/~zack/blog/posts/2012/03/mutt-notmuch_is_dead/2012-03-31T09:39:29Z2012-03-31T09:26:11Z
<h1>long life to notmuch-mutt</h1>
<ul>
<li><em>Bad news</em>: I've <a href=
"https://gitorious.org/mutt-notmuch/mutt-notmuch/commit/c0934762614476f563e9d19d2a8e3d97547d0f1f">
just killed</a> <a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/">mutt-notmuch</a></li>
<li><em>Good news</em>: <strong>mutt-notmuch has been integrated
upstream</strong> as a notmuch <a href=
"http://git.notmuchmail.org/git/notmuch/tree/HEAD:/contrib/notmuch-mutt">
contrib script</a> <strong>under the name
notmuch-mutt</strong><br />
<small>(note the word switch, due to uniformity with other tools of
the notmuch suite)</small></li>
<li><em>Good news</em> (for Debian users): starting with next
notmuch upload <strong>there will be a Debian
<code>notmuch-mutt</code> package</strong>. It will work out of the
box with Mutt, without requiring any <code>~/.muttrc</code>
fiddling</li>
</ul>
<p>As a consequence, no further separate releases of mutt-notmuch
will be made. Future releases (of notmuch-mutt) will happen as part
of notmuch.</p>
<p>In other news, several changes have been implemented in
notmuch-mutt wrt mutt-notmuch 0.2:</p>
<ul>
<li>move cache dir to <code>~/.cache/notmuch/mutt/</code> by
default<br />
<small>(Note: given that, from the point of view of notmuch, the
next one will be the <em>first</em> release, no migration code from
the previous cache location is present. Please switch to the new
version and get rid of <code>~/.mutt-notmuch*</code>
manually.)</small></li>
<li>support for <a href=
"http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">
XDG basedir</a>, allowing to override the cache dir</li>
<li>switch to String::ShellQuote for proper shell escaping in all
notmuch calls</li>
<li>system-wide Mutt configuration snippet for
<code>/etc/Muttrc.d/</code> (Debian-specific) or
<code>/etc/Muttrc</code></li>
</ul>
<hr />
<p>Many thanks to David Bremner (for shepherding my changes in) and
to Ben Boeckel (whose desire to package mutt-notmuch in Fedora made
me kick <a href="http://bugs.debian.org/628018">Debian bug
#628018</a>, this time for real).</p>
mutt-notmuch 0.2http://upsilon.cc/~zack/blog/posts/2012/02/mutt-notmuch_0.2/2012-02-11T14:15:20Z2012-02-11T14:15:20Z
<p>My <a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/">mutt-notmuch
hack</a> seems to be a quite popular way to integrate <a href=
"http://www.mutt.org/">Mutt</a> with <a href=
"http://notmuchmail.org/">notmuch</a>. As a nice consequence, my
(indexed!) inbox attracts patches from mutt-notmuch users eager to
improve it. Collecting some of them, I've just tagged <a href=
"https://gitorious.org/mutt-notmuch/mutt-notmuch/trees/0.2">mutt-notmuch
0.2</a> with the following changes:</p>
<ul>
<li>readline support and query history</li>
<li>support for spaces in mailboxes (use case:
gmail+offlineimap)</li>
<li>a new "tag" action</li>
<li>normalization of <code>=names</code> to support mutt macros
that pass folder names</li>
<li>do not treat <code>+opt</code> as a valid cmdline option (to
ease tagging)</li>
</ul>
<p>Many thanks to Scott Barker, Christine Spang, David Newgas, and
Ryan Kavanagh for the above patches.</p>
<p>While I was at it, I've also moved mutt-notmuch repository
<a href="https://gitorious.org/mutt-notmuch/">to Gitorious</a>. Git
self-hosting is nice, but either you move to something like
gitolite (which I didn't have time to setup and tune ATM) or you're
stuck without merge requests which are quite nice. <small>(Why not
Github? <a href=
"http://mako.cc/writing/hill-free_tools.html">Because.</a>)</small></p>
<p>If you're using mutt-notmuch you might also be interested in the
discussion of <a href=
"http://thread.gmane.org/gmane.mail.notmuch.general/7310">libnotmuch
support in mutt</a>. I'd love to see that landing in mutt and be
able to throw away mutt-notmuch entirely, but that seems a bit
premature as of yet.</p>
how to use Notmuch with Mutthttp://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/2012-03-31T09:29:50Z2011-02-03T18:09:42Z
<h1>Mutt mail indexing on steroids!</h1>
<p><strong>Update 31/03/2012: <a href=
"http://upsilon.cc/~zack/blog/posts/2012/03/mutt-notmuch_is_dead/">mutt-notmuch has
been integrated upstream</a> under the name
notmuch-mutt.</strong></p>
<p>I've been using external mail indexing with <a href=
"http://www.mutt.org">Mutt</a> for quite a while now. Before now I
haven't given <a href="http://notmuchmail.org/">Notmuch</a> a try,
as it seemed <em>too much</em> experimental at the time of my
initial <a href=
"http://upsilon.cc/~zack/blog/posts/2009/10/mail_indexing_for_mutt/">review of mail
indexing tools</a>.</p>
<p>As there is nothing better than a long oversea flight to
perpetrate new hacks, I've now not only tested it, but also
<strong>switched to Notmuch</strong> without looking back at
<a href="http://code.google.com/p/mu0/">maildir-utils</a> for a
split second.</p>
<p>Getting started with Notmuch is trivial:</p>
<ul>
<li>Notmuch is <a href=
"http://packages.debian.org/sid/notmuch">notmuch</a> in Debian (and
maintained by upstream author, thanks!)</li>
<li><code>notmuch setup</code> asks a few questions about the user
and then prepare a template <code>~/.notmuch-config</code>, which
is good enough to start</li>
<li><code>notmuch new</code> does a first run of indexing (which
might take a while, depending on the size of your maildirs)</li>
</ul>
<p>Some performance figures: (1) the size of the index is a bit
larger than the size of the mails (on my laptop: 535 Mb of index vs
375 Mb of mails stored in 60 maildirs); (2) even if the underlying
indexing engine is the same (Xapian) as maildir-utils, Notmuch is
much faster. With my setup it is so fast that I've added it as a
hook triggered by offlineimap at the end of each
synchronization:</p>
<pre><code> zack@usha:~$ grep -B 1 hook .offlineimaprc
[Account Upsilon]
postsynchook = notmuch new
</code></pre>
<p>With the big round of new mail downloaded in the morning, it
hardly takes more than a few seconds to update Notmuch index, while
with other periodic downloads Notmuch almost invariably reports
"... in almost no time" (i.e. less than 1 second).</p>
<h2>Integrating Notmuch with Mutt</h2>
<p>The basic integration I want between Mutt and a mail indexer is
the ability of stating a <strong>search query</strong>
interactively and then jump to a <strong>fresh Maildir containing
search results</strong> only. Additionally, given that Notmuch has
neat <strong>thread reconstruction</strong> abilities, I also want
to be able to reconstruct on the fly the thread corresponding to
the currently highlighted mail: it comes handy when a thread has
been split across different maildirs, archived, or the like.</p>
<p>To that end, I've cooked up a little helper, called <a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/mutt-notmuch">
mutt-notmuch</a>, that enables to trigger mail searches via a Mutt
macro (F8 being my choice) and reconstruct threads via another
(F9). Check the <a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/mutt-notmuch.1.html">
manpage</a> for the 2-liner configuration snippet for your
<code>~/.muttrc</code>.</p>
<p>Arguably, some of the logics of mutt-notmuch could disappear by
adding support for a <code>--output=symlinks</code> flag to
Notmuch. A bug report requesting that is pending: too bad oversea
flights are not as good for accessing the Internet as they are for
perpetrating hacks!</p>
<h3>Download</h3>
<ul>
<li><a href=
"https://gitorious.org/mutt-notmuch/mutt-notmuch/blobs/raw/master/mutt-notmuch">
mutt-notmuch</a> - Notmuch (of a) helper for Mutt</li>
<li><a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/mutt-notmuch.1">
mutt-notmuch.1</a> (<a href=
"http://upsilon.cc/~zack/blog/posts/2011/01/how_to_use_Notmuch_with_Mutt/mutt-notmuch.1.html">html</a>)-
mutt-notmuch manpage</li>
</ul>
<hr />
<p><strong>Update</strong> 10/04/2011: mutt-notmuch code is now
available <a href="https://gitorious.org/mutt-notmuch">via Git</a>.
Resistence to propose your own patches is futile! The above link to
mutt-notmuch has been changed to point to the live Git version.</p>
<p><strong>Update</strong> 11/02/2012: Git repository has been
moved to Gitorious; links updated accordingly</p>