|Lars Haalck c882c106cc adds option to specfiy config as command line argument||3 months ago|
|.gitignore||6 years ago|
|.ycm_extra_conf.py||6 years ago|
|CHANGELOG.md||10 months ago|
|Makefile||5 years ago|
|README.md||8 months ago|
|notmuch-addrlookup.c||3 months ago|
The one and only feature is accepting a string as first argument, and it will use the Notmuch database to output the names and e-mail addresses of the people you have exchanged e-mails with, most used ones first. This works neatly as address completer for the Notmuch Emacs interface.
One more thing: I plan to keep the tool up-to-date when new Notmuch releases change the API of the library. Precisely the reasons why this small project was started are:
Starting with version 0.19 a new
notmuch address subcommand is available,
which can be used to search for e-mail addresses as well. While similar,
notmuch-addrlookup-c may still be preferred because:
The output format can be set to Mutt-compatible, which many existing tools know how to handle.
It automatically searches for addresses in the
From: message headers, and sorts them out by most frequently seen.
This usually renders more relevant results.
Make sure you have the following installed, plus their development packages:
libnotmuch— Included with Notmuch.
Then just build and install it:
make sudo cp notmuch-addrlookup /usr/local/bin
You can check that the program works by invoking from a shell. The only argument it takes is a string, which is searched for in the e-mail addresses contained in the headers of the messages indexed by Notmuch. Example output (names and addresses are not real):
% notmuch-addrlookup peter Peter Jones <email@example.com> John Peters <firstname.lastname@example.org> Peter Tosh <email@example.com> Noren Petersen <firstname.lastname@example.org> %
The plug-in vim-notmuch-addrlookup adds completion of e-mail addresses via
notmuch-addrlookup-c (by default by hitting
<Ctrl-X><Ctrl-O>) when composing an e-mail.
The Emacs Notmuch UI can be configured to use the tool for completing addresses when composing.
The Mutt UA can be configured to use
notmuch-addrlookup by setting the following options:
set query_command="notmuch-addrlookup --mutt '%s'"
The alot MUA can be configured to use
notmuch-addrlookup, using an
[accounts] section in the configuration
file similar to this:
[accounts] [[youraccountname]] realname = Your Name address = email@example.com ... [[[abook]]] type = shellcommand regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' command = notmuch-addrlookup --mutt ignorecase = True
This software is distributed under the terms of the MIT license:
Copyright (c) 2014 Adrian Perez de Castro <firstname.lastname@example.org> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.