]> git.cworth.org Git - notmuch-wiki/blob - howto.mdwn
A new howto document, as this is not really emacstips specific
[notmuch-wiki] / howto.mdwn
1 [[!img notmuch-logo.png alt="Notmuch logo" class="left"]]
2 #How to...
3
4 ##<span id="print_filenames">.. print only filenames of a search</span>
5
6 Given you have the python bindings installed (or simply set your PYTHONPATH environment variable to point to the .../bindings/python directory), this script will print the filenames of a matching search:
7
8                                 #!/usr/bin/env python
9                                 import sys
10                                 import notmuch
11                                 
12                                 q = notmuch.Database().create_query(" ".join(sys.argv[1:]))
13                                 for m in q.search_messages(): print m.get_filename()