From 49550b8072d0ab354fc7fbe70ba03b79fb133021 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 18 May 2010 15:14:18 -0700 Subject: [PATCH] A new howto document, as this is not really emacstips specific Signed-off-by: Sebastian Spaeth --- howto.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 howto.mdwn diff --git a/howto.mdwn b/howto.mdwn new file mode 100644 index 0000000..30e8134 --- /dev/null +++ b/howto.mdwn @@ -0,0 +1,13 @@ +[[!img notmuch-logo.png alt="Notmuch logo" class="left"]] +#How to... + +##.. print only filenames of a search + +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: + + #!/usr/bin/env python + import sys + import notmuch + + q = notmuch.Database().create_query(" ".join(sys.argv[1:])) + for m in q.search_messages(): print m.get_filename() -- 2.43.0