dpkg-source is the program that generates the Debian source package when a new package version is built. It offers many interesting command-line options but they are often not used because people don t know how to ensure that they are used every time the package is built. Let s fill that gap!
It is possible to forward some options to dpkg-source by typing them on the dpkg-buildpackage command line but you d have to remember to type them every time. You could create a shell alias to avoid typing them but then you can t have different options for different packages. Not very practical.
The proper solution has been implemented last year (in dpkg 1.15.5). It is now possible to put options in debian/source/options. Any long option (those starting with -- ) can be put in that file, one option per line with the leading -- stripped.
Here s an example:
# Bzip2 compression for debian.tar compression = "bzip2" compression-level = 7 # Do not generate diff for changes in config.(sub guess) extend-diff-ignore = "(^ /)config.(sub guess)$"Notice that spaces around the equal sign are possible contrary on the command line. You can use quotes around the value but it s not required. The
debian/source/options file is part of the source package so if someone else grabs the resulting source package and rebuilds everything, they will use the options that you defined in that file.
You can also use debian/source/local-options but this time the file will not be included in the resulting source package. This is interesting for options that you want to use when you build from the VCS (Version Control Repository, aka git/svn/bzr/etc.) but that people downloading the resulting source package should not have. Some options (like --unapply-patches) are only allowed in that file to ensure a consistent experience for users of source packages.
You can learn more about the existing options in the dpkg-source manual page. Read it, I m sure you ll learn something. Did you know that you can tell dpkg-source to abort if you have upstream changes not managed by an existing patch in debian/patches? It s --abort-on-uptream-changes and it s only allowed in debian/source/local-options.
Be sure to subscribe to the RSS feed or to the email newsletter to not miss useful documentation for Debian contributors!
---
class:
Debian::Dep5:
class_description: >
Machine-readable debian/copyright
accept:
name_match: X-.*
type: leaf
value_type: string
element:
Format-Specification:
mandatory: 1
type: leaf
value_type: uniline
description: >-
URI of the format specification, such as ...
Name:
type: leaf
value_type: uniline
Files:
type: hash
index_type: string
ordered: 1
cargo:
type: node
config_class_name: Debian::Dep5::Content
And the full model of Dep-5 can be also read on Config::Model repository:
(The models are biggish because they include help text taken from DEP-5 documentation)
Now some explanation is required on how is performed the License validation.
The trick is that each License used must be listed in Dep5 s license parameter which is specified this way (in YAML syntax):
License:
type: hash
index_type: string
allow_keys_matching: '^(?i:Apache Artistic BSD etc... other)[\d\.\-]*\+?$'
cargo:
type: leaf
value_type: string
So this License element contains the list of licenses with their full text and only Licenses whose name matches the regular expression are accepted.
Now, let s explain how the files are tied to the declaredlicenses. The Debian::Dep5::Content class had a License element that represent the relation between the files and the License(s). This bond is represented by Debian::Dep5::License configuration class. The abbrev and full_license elements are fairly obvious.
The abbrev element is another matter. Here s its declaration (minus the description and help):
abbrev: type: leaf value_type: uniline default: otherSo far, so good. Now the meaty part: the validation requirement based on Parse::RecDescent
grammar: "license (oper license)(s?)
oper: 'and' 'or'
license: /[\\w\\-\\.\\+]+/i\n
# PRD action to check if the license text is provided
$return = $arg[0]->grab('! License')->defined($item[0]);
"
This grammar specifies:
[Nothing related to Debian here, move on if you don't care about my recurring obsession with the end of the world, Cassandra pains, or Big Phat Living Room Revolution yearnings].[Emphasis mine]
At what point does human culture depart from the Natural? With the invention of computers? TV? Cars? The cotton gin? Electricity? Taco stands? Gunpowder? The printing press? Written language? Shoes? Crop cultivation? Yurts? The wheel? Did humans become unnatural when the good old days of picturesque, endless agrarian toil, feudal oppression, unchecked disease, ignorance, and death from dysentery at 35 turned into the bad new days of urban post-industrial capitalism where a pound of fair-trade organic coffee costs $12.99 and your email inbox is full of spam?
ah. Everything humans do, or have ever done, is natural. We can t do anything else. The idea that modern culture is un-natural is nostalgic and inaccurate. Living off the grid in a yurt is good in some absolute sense, whereas driving an SUV from a suburban bungalow to the stripmall is bad ? Come on. This a romantic, but misguided view. The cosmic reaction to a 20 Ford Expedition is the same as to a sanctimonious Prius: bupkis. The universe doesn t give a fuck about you or your lifestyle choices. It doesn t give a fuck about the economy, oil spills, or civil unrest in Blargistan. It doesn t give a fuck about katydids. Eventually our whole planet will be erased from space, and the galaxy won t bat an eye. The inevitable extinction of our species (imminent, according to research here at Spinster Laboratories) via the exhaustion of available resources is as natural as a fresh-picked peach. As Andre 3000 and other dude philosophers have observed, nothing is forever.
Yes, yes, when people use the word natural what they really mean is free of chemical additives and maybe some of the assorted hippie concepts that go with that narrative. Barter economies, home furnishings made from bamboo, vegan cookbooks, living in the country. While I would argue that it is just as natural for people to put chemical additives in things as it is to not put chemical additives in things, I admit that it is appealing to fantasize that the source of human misery is an unnatural isolation from Nature, and that doing yoga on an organic rubber mat and drinking organic spinach smoothies will put me back in sync with the cosmos.
But alas, I m already in sync with the cosmos, and so are you. In other words, this is it. This is what we ve become, and this is what we get. Which is not to say that a person can t fantasize about a verdant paradise full of songbirds and polar bears and Bengal tigers, untouched by human influence. Only, that world isn t a world we could actually live in. The minute you add contented children, lazy from a carefree day at the swimming hole, eating ripe plums on the porch at sunset to that scenario, natural history changes, and it s right back to our scorched-earth dystopia. Our giant brains use up resources, it s as simple as that.
As long as we re still here, though, we might as well try to make the best of it.
http://blog.iblamethepatriarchy.com/2010/06/19/heads-up-art-week-starts-on-monday/
At some point in the past my bookmarks broke in such a way that I wasn't able anymore to alter in any way the bookmarks, deletions, additions, reorganisation, nothing worked.XPC.mfasl
XUL.mfasl
cookies.sqlite
localstore.rdf
places.sqlite
pluginreg.dat
urlclassifier3.sqlite
Second Sunday in September -- time for the annual
Chicago Half Marathon now in
its fourteenth edition
(and I have been running it in
2003,
2004,
2005,
2006,
2007,
2008
and
2009
making this and the
JPM
Chase Corporate Challenge the races I've run most often).
And the course was altered this year, alongside with an earlier start as the Bears
have their season home opener today. So we started north towards 57th, then
running down to 67th, turning east towards the lake at around three miles ---
and having the remaining ten miles along the lakefront running up to 31st
(the usual turn) and back down to 63rd. I like this course better; let's
hope it sticks.
Race conditions were fantastic. We had a rainy and gray day yesterday but
today is pure bliss. Temperatures around 60 degrees at the 7:00am start, no wind,
sunshine and not a cloud in the sky.
The race itself went well. I had a pretty brutal running year suffering most
of the time from some archilles tendon inflammation. It has gotten better in
the last few weeks possibly thanks to some heel cups I now put in the
shoes. But I had exactly one run longer than ten miles since the
Boston Marathon.
So I lost a lot of speed, as well as endurance and was a little nervous as to
how I'd do. And considering all this, it went pretty well. I fininished in 1;41:50
or a 7:47 pace. While is easily the slowest half in a number of years, at
least I got to run it evenly, pain free and with a negative split (== faster
second half) and some gas left for a fast last half mile or so. So maybe I
don't have to retire from running just yet. We'll see if I get some speed back in 2011.
A lot is being said on how Ruby is packaged in Debian and Ubuntu. In this post, I m trying to go through the most common myths and give my position as a Debian Ruby maintainer. Note that those are my views, not necessarily those of the other Debian Ruby maintainers.
Myth: Ruby is completely outdated in Debian and Ubuntu
There s a culture in the Ruby community of always using the latest bleeding-edge version. There s also a culture (though this one has recessed a bit, I think) that it s perfectly fine to change APIs in incompatible ways if it makes the software slightly better.
In Debian (and Ubuntu) stable releases, we try to provide a rock-solid version of Ruby that won t be allowed to change API during the support lifetime of a release. Bugfixes for important bugs can be applied, but that s basically all. So it s not surprising that Ruby in released versions of Debian and Ubuntu is behind the latest upstream version.
In development branches, we are following the latest upstream versions quite closely. Debian 6.0 squeeze , to be released by the end of the year, includes Ruby 1.8.7-p302, and will include 1.9.2-p0 (the currently of Ruby 1.9.2 in squeeze is currenty a SVN snapshot from beginning of august).
There are people interested in installing a packaged Ruby that just works, and other people interested in installing their own version of Ruby (through RVM and such). People in the Ruby community tend to forget about the first category, and consider that, because they install Ruby from source or with RVM, that should be the solution for everybody.
We need the Ruby community to respect that different people have different ways of using Ruby, and to stop recommending that everyone using Debian and Ubuntu should install Ruby from source.
We also need to leverage the backports services for both Debian and Ubuntu to provide a way to install the latest upstream version on stable releases. The only reason why we are not doing it yet is lack of time.
Myth: Ruby is split into a myriad of packages in Debian
In the past (pre-2005), a decision was made to split some libraries from the standard library into separate packages. This was motivated by:
gem update --sytem is disabled in the Debian package, because that would replace code from the Rubygems Debian package with code downloaded from the Internet, and can break your system in subtle ways. We have changed this (in SVN, not in any package in the archive yet) to allow gem update --system if a specific environment variable is set, which gives us the opportunity to display a warning message.
Myth: Ruby is slow on Debian
Ruby is built with the pthread threading code, because not using it breaks many native Ruby libraries (Ruby-gnome2, for example). And other Linux distributions are doing the same.
There are some very old benchmark results floating around in some blogs that show that the pthread code has a performance impact of about 20%. There are been patches for that for a long time (applied in Ruby Enterprise Edition), but they were never properly sent back. Actually, all the discussions about this issue were rumors and blog posts, and there wasn t even a bug report about it!
After the bug was reported properly, it was fixed in a timely manner. The fix is not yet included in the Ruby 1.8.7, but is being applied as a patch to the Debian package since 1.8.7.299-2. (So the Debian package is actually newer and faster than upstream Ruby in that regard).
What makes Ruby so difficult to maintain in Debian?
The main problems we have with Ruby are portability issues. The only officially supported platform for Ruby is IA32 (i386 in Debian), and everything else is best effort. It means that it is not even supported officially on x86_64/amd64! Debian supports a dozen of architectures, and the Ruby package has to work on each of them. Ruby 1.8 is mostly OK nowadays thanks to the help of Debian porters, but we still have serious problems with 1.9.2, since the test suite fails on sparc, hppa, ia64 and Debian GNU/kFreeBSD.
Why doesn t Ruby use the alternatives system on Debian?
The alternatives system provides a way to switch between different software providing the same functionality. Currently, if you want to use Ruby 1.9.2, you need to use the ruby1.9.1 executable (1.9.1 = ruby compatibility version here). The alternatives system would allow to switch ruby to ruby1.9.1 on a system-wide basis.
However, the situation of applications and libraries working only with Ruby 1.8 should be clarified: those should use /usr/bin/ruby1.8 instead of /usr/bin/ruby. Another problem is that the way to specify packages dependencies still need to be determined. There s nothing impossible to do about that, it just needs someone to do the work.
Where do we go from here?
The Ruby developers (or expert users) community is generally very hostile towards Debian. Many harsh words and insults are used in discussions mentioning Debian in the ruby-core@ mailing list, and there are frequent recommendations to avoid the Debian packages and install from sources, which is quite demotivating (Actually, what prompted that blog post is someone calling Debian-specific changes unforgivable).
This atmosphere makes it hard to recruit people, and the Debian Ruby teams are completely understaffed, which is clearly the major blocker to improving the situation further. We are 3 co-maintainers for the interpreter packages, and I m the only Debian Developer that is really active on a regular basis in the pkg-ruby-extras team (that does libraries and applications packaging). We desperately need help, but at the same time I have no time to improve our documentation and make it easier to join the team.
While I haven t reached a final decision yet, I am also likely to stop doing Ruby work in Debian after squeeze is released, as I am getting increasingly tired and demotivated.
In the spur of the moment, I cycled over to Dominican,
one of the two small colleges in town, to see if I could snag a remaining ticket to see
Billy Bragg perform.
Turned out I could, and it became a nice evening out.
Darren Hanlon started up the
evening as the opener for a good half hour, and was quite decent; somewhat
charming in a good natured way, not taking himself too too seriously. I'd
gladlt see him again.
After a longer-than-needed break
Billy Bragg came on stage and played for
two straight hours, alternating between an electric and acoustic guitar. And also
alternating between some newer material and (especially towards the end and
the encore) some old crowd-pleasure. I don't know his material all that well
but have of course know of his career over these last 25 years and am quite
glad I went to see him. Nice way to end the week.
The unofficial rc bug tracker
currently knows about the following bugs:
| In Total: | 420 |
|---|---|
| Affecting Squeeze: | 301 |
| Squeeze only: | 66 |
| Remaining to be fixed in Squeeze: | 235 |
| Pending in Squeeze: | 16 |
|---|---|
| Patched in Squeeze: | 53 |
| Duplicates in Squeeze: | 26 |
| Contrib or non-free in Squeeze: | 10 |
| Claimed in Squeeze: | 2 |
| Delayed in Squeeze: | 8 |
| Can fixed in a security Update: | 15 |
| Otherwise fixed in Squeeze: | 19 |
Squeezereleased. However, with the view of the Release Managers, 254 need to be dealt with for the release to happen. Please see my older post for an explanation of the different numbers.
Watching the Star Wars Trilogies (both old and new) has finally closed one of the major (in at least some of my collegues' view) holes in my cinematographic education. (I've seen some of the new trilogy when it came out, but not all.) Oh well ... while it's quite enjoyable to watch, it's probably at least as important to have seen them just to spot the references all over the place.
Repo Man was where I found myself literally laughing out loudly all by myself. And not only because of the vintage special effects (1984).
The Straight Story (Lynch) is just beautiful. Alvin Straight is your proverbial old uncle who may be a bit funny in the head but you just have to like him...
If you like mind control stories, The Manchurian Candidate is for you. Now that would be a way for Debian to achieve world domination. Worth thinking about?
Speaking of american politics, this reminds me of All the President's Men, which I've seen (and liked) a long time ago. I don't know enough about history to tell how close it is to reality, but it's at least a well made political thriller. Based On A True Story is the term usually used, isn't it?
omlet (or here) is a vim extension for writing OCaml code.
In my opinion, it has a better indentation than the standard OCaml vim support. Unfortunately, it has a cost: the indentation vim code is more complex. And it has a few bugs :-(
The main bug is that it doesn't like unbalanced comment opening "(*" and closing "*)" tags. From time to time, it enters an infinite (or very long) loop when there such a tag left in your file. It can be very far away from the point you are editing.
It isn't too problematic, because unbalanced tags are a syntax error. But the problem is that it matches these tags inside strings also. So whenever you start using regular expression like "(.*)" the whole indentation fails.
But there is a very ugly solution to this problem!
Problematic code:
let parse_rgxp =
Pcre.regexp ~flags:[ CASELESS]
"^(?<license>[A-Z0-9\\-]*[A-Z0-9]+)\
(?<version>-[0-9\\.]+)?(?<later>\\+)?\
( *with *(?<exception>.*) *exception)?$"
Solution, add ignore"(*":
let parse_rgxp =
ignore "(*";
Pcre.regexp ~flags:[ CASELESS]
"^(?<license>[A-Z0-9\\-]*[A-Z0-9]+)\
(?<version>-[0-9\\.]+)?(?<later>\\+)?\
( *with *(?<exception>.*) *exception)?$"
Very very ugly coder: you balance comment tags in dead code -- very very bad ;-)
ps: another solution when the plugin enters the infinite loop, hit Ctrl-C. This will stop it and let you define your own indentation.
Backlight control is one of those things that you'd think would be simple, but ha ha this is computing so of course it's an utter disaster and everything is a huge mess. There's three main classes of backlight control in the x86 world, all of which have drawbacks:
* I was thinking to move out of as many as non-free (FaiF) web services after reading mako s this post and now zack wrote about it with good explanations and reasons.
What things I m using? And its replacement:
- GMail [and related stuffs] (I don t own server/email setup, may be next year s plan?)
The last few months have been busier than I expected, resulting in various failures to get stuff done. The good news is that things are a little more relaxed now and I'm gradually catching up, but if you've emailed me and I haven't replied then you should probably do so again.
Please, those of you who send me emails, remember the following:-
Another week, another Emacs extension! I had (once again) a wonderful idea: what if I could have the weather forecasts in my Org agenda? Wouldn't that be wonderful? My quest started by looking for a service offering a good weather forecast API. I found nothing simple as the hidden Google Weather API, which is nice, but not documented. Not at all. Not a single line. Nah. Then, I wrote a google-weather extension, implementing a basic Emacs Lisp API to retrieve data from the Google service:
ELISP> (google-weather-data->forecast (google-weather-get-data "Paris")) (((9 8 2010) (low "53") (high "63") (icon "http://www.google.com/ig/images/weather/rain.gif") (condition "Rain")) ((9 9 2010) (low "53") (high "69") (icon "http://www.google.com/ig/images/weather/chance_of_rain.gif") (condition "Scattered Showers")) ((9 10 2010) (low "54") (high "72") (icon "http://www.google.com/ig/images/weather/partly_cloudy.gif") (condition "Partly Cloudy")) ((9 11 2010) (low "55") (high "75") (icon "http://www.google.com/ig/images/weather/partly_cloudy.gif") (condition "Partly Cloudy")))My API even implements data caching, which is nice to speed up the agenda display. By the way, I think my next job will be to hack on the url-cache feature of Emacs, which is utterly buggy and has probably never be used. But that's another topic. Finally, I just had to write another module on top of that to export the forecasts to Org. A screen shot is probably better than a long and boring explanation, so here's the result.
My only regret is that the icons provided by Google are ugly squares, so I
did not want to use them. On the other hand, I did not found any icon set
that would have all the icons Google provides (around 20). So I felt back on
the icon naming specification to map the Google images to standard images.
Any better idea would be welcome, of course.
All the information can be found on the
Google Weather for Emacs extension homepage.
There was a feature missing in darcs-monitor which I wanted: to send the e-mail to multiple recipients when a new patch arrives. I tried using:
apply posthook darcs-monitor --charset=UTF-8 email addr1@example.com,addr2@example.com
But it didn't worked. I also tried "addr1@example.com, addr2@example.com", but it also didn't worked. So I included this feature in darcs-monitor and released a new version. I also updated my e-mail address and darcs repository address.
While I was working at the debian package, I noticed a bug in 0.3.8-1, and made a upload of 0.3.8-2 to fix it. I also uploaded the new 0.4.0 to experimental.
I'm another one using flattr now. I've created my blog as a thing:
I also created a thing for darcs-monitor:
A long time ago, when I was first introduced to email, I was using the
Mail program from Unix. I quickly converted to Elm, then Mutt, which
were both better in terms of interface. Then I found out about Gnus,
and I wouldn't dream of letting it go now. However, Gnus has started
showing its age several times, and several times have I needed to
upgrade the way I was using it: first because I needed to sort and
split email, then because I took the sorting out of Gnus and into
Procmail for more advanced filtering (including spam filtering), then
because I switched to storing the emails on an IMAP server so I could
read them remotely from several computers. My setup as of a few days
ago was functional, but since I have grown over time to splitting
emails into several hundred folders, checking for new messages was
becoming more and more boring.
So it's time to jump in with all the cool kids and switch to a modern
solution: still Gnus of course, but with Dovecot, OfflineIMAP for
synchronisation, and let's add email searches into the mix while we're
at it. My web searches didn't turn up a simple step-by-step HOWTO,
but I assembled bits from different places, and here's my attempt at
documenting my new setup.
Goals
aptitude install dovecot-imapd on Debian systems
and related).ENABLED=0 in /etc/default/dovecot.$HOME/Maildir.aptitude install offlineimap, or similar.~/.offlineimaprc file, with contents based on the
following example:[general] accounts = MyAccount pythonfile = .offlineimap.py [Account MyAccount] localrepository = LocalIMAP remoterepository = RemoteIMAP # autorefresh = 5 # postsynchook = notmuch new [Repository LocalIMAP] type = IMAP preauthtunnel = MAIL=maildir:$HOME/Maildir /usr/lib/dovecot/imap holdconnectionopen = yes [Repository RemoteIMAP] type = IMAP remotehost = mail.example.com remoteuser = jsmith remotepass = swordfish ssl = yes nametrans = lambda name: re.sub('^INBOX.', '', name) # folderfilter = lambda name: name in [ 'INBOX.important', 'INBOX.work' ] # folderfilter = lambda name: not (name in [ 'INBOX.spam', 'INBOX.commits' ]) # holdconnectionopen = yes maxconnections = 3 # foldersort = lld_cmp
remotehost, remoteuser
and remotepass values with your own. If you want to synchronize
only a subset of the IMAP folders, uncomment and adapt one of the
folderfilter lines; the lambda can be any Python code you like, I
guess.offlineimap. See the emails coming in and being replicated
to your local store.MAIL=maildir:$HOME/Maildir /usr/lib/dovecot/imap. You should
get * PREAUTH [CAPABILITY ... STATUS] Logged in as your-login.
Type * LIST "" * in there. You should see a list of all the
folders..offlineimaprc mentions a .offlineimap.py, which is where
we're going to store some additional code used by OfflineIMAP.
Here's a sample:The first part of this file adds a new flag that OfflineIMAP will propagate back and forth. By default, only the standard IMAP flags are propagated; we also want to synchronize the# Propagate gnus-expire flag from offlineimap import imaputil def lld_flagsimap2maildir(flagstring): flagmap = '\\seen': 'S', '\\answered': 'R', '\\flagged': 'F', '\\deleted': 'T', '\\draft': 'D', 'gnus-expire': 'E' retval = [] imapflaglist = [x.lower() for x in flagstring[1:-1].split()] for imapflag in imapflaglist: if flagmap.has_key(imapflag): retval.append(flagmap[imapflag]) retval.sort() return retval def lld_flagsmaildir2imap(list): flagmap = 'S': '\\Seen', 'R': '\\Answered', 'F': '\\Flagged', 'T': '\\Deleted', 'D': '\\Draft', 'E': 'gnus-expire' retval = [] for mdflag in list: if flagmap.has_key(mdflag): retval.append(flagmap[mdflag]) retval.sort() return '(' + ' '.join(retval) + ')' imaputil.flagsmaildir2imap = lld_flagsmaildir2imap imaputil.flagsimap2maildir = lld_flagsimap2maildir # Grab some folders first, and archives later high = ['^important$', '^work$'] low = ['^archives', '^spam$'] import re def lld_cmp(x, y): for r in high: xm = re.search (r, x) ym = re.search (r, y) if xm and ym: return cmp(x, y) elif xm: return -1 elif ym: return +1 for r in low: xm = re.search (r, x) ym = re.search (r, y) if xm and ym: return cmp(x, y) elif xm: return +1 elif ym: return -1 return cmp(x, y)
gnus-expire flag
that Gnus uses to mark expirable articles. It's a hack, but it works
for now (maybe someday OfflineIMAP will propagate all the flags it
finds?).
The second part of that file can be dispensed with (and won't be used
unless the foldersort option is uncommented in .offlineimaprc):
it's only there to ensure that some important folders are propagated
first, and some others go last. I don't know exactly how they are
sorted by default, but I'd like the most important ones to come first,
so I can start reading them while the archives and the spam are still
being fetched.
Gnus configuration
nnimap, the address can be whatever you like (it's
just a name anyway), and you only need two options: nnimap-stream,
set to shell, and imap-shell-program, which you set to
"MAIL=maildir:$HOME/Maildir /usr/lib/dovecot/imap".offlineimap from a terminal, so you get the
new messages, delete the old ones, and so on.autorefresh option in
.offlineimaprc. The value is the duration (in minutes) between
two runs.offlineimap.el to
the rescue! Grab it, put it where Emacs will find it, and add the
following to your .emacs:Bonus: email searches The simple way:(require 'offlineimap) (add-hook 'gnus-before-startup-hook 'offlineimap)
This goes in your(require 'nnir)
.gnus. Then your group buffer will get a new
command. Mark some folders with #, then M-x
gnus-group-make-nnir-group (or use the G G shortcut), and type in a
set of keywords. This search is performed by the IMAP server
(Dovecot), which may or may not be very efficient, especially if you
select many folders.
Bonus+: email searches, faster
The real cool kids use Notmuch nowadays, at least for email indexing
and searching. It's fast, it allows complex queries, and it's
generally cool. The downside is that it uses up quite some disk space
for its indices, in addition to the actual emails. For that reason
I'll keep it to my main computer, and I'll stick to nnir on my
laptop (which has the same setup apart from that).
aptitude install notmuch, yada yada.notmuch setup, tell it where you stored your Maildir. If you're
only going to use Notmuch for searches, I suggest setting tags= to
an empty value in .notmuch-config afterwards. We don't want
Notmuch to intrude.notmuch new will get it indexing the messages you already have.postsynchook line from .offlineimaprc.(require 'notmuch) to your .gnus. Also (define-key
gnus-group-mode-map "GG" 'notmuch-search), for the shortcut..gnus,
based on
Tassilo Horn's configuration.
Do a Notmuch search, enter one of the results, type C-c C-c,
you'll get transported to the folder where that message was, with
the context. Note this requires code from org-mode, so you might
need to install that.Wrap-up This setup can be replicated on several computers, of course. I have it on two, and there's no reason I couldn't have more. The flags do get propagated back and forth, including the Gnus-specific expirable flag. Accessing the local Dovecot is much faster than going through the DSL to the master IMAP server, and I'm pretty convinced that OfflineIMAP and its multi-threading is also faster than Gnus is, even talking to the same remote server. The email searching with Notmuch is a nice bonus, especially since they're fast too (and this despite my 8-year-old computer). There are a few minor glitches. I can live with them, but I should let you know anyway.(require 'notmuch) (add-hook 'gnus-group-mode-hook 'lld-notmuch-shortcut) (require 'org-gnus) (defun lld-notmuch-shortcut () (define-key gnus-group-mode-map "GG" 'notmuch-search) ) (defun lld-notmuch-file-to-group (file) "Calculate the Gnus group name from the given file name. " (let ((group (file-name-directory (directory-file-name (file-name-directory file))))) (setq group (replace-regexp-in-string ".*/Maildir/" "nnimap+local:" group)) (setq group (replace-regexp-in-string "/$" "" group)) (if (string-match ":$" group) (concat group "INBOX") (replace-regexp-in-string ":\\." ":" group)))) (defun lld-notmuch-goto-message-in-gnus () "Open a summary buffer containing the current notmuch article." (interactive) (let ((group (lld-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) (progn (switch-to-buffer "*Group*") (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") 'lld-notmuch-goto-message-in-gnus)
offlineimap.el keeps an OfflineIMAP process running (if using
autorefresh), which causes Emacs to complain about when you want
to exit.offlineimap.el, Procmail, and so on).
Let's see how many years I'll keep that system!
Next.