Package: notmuch-mutt Version: 0.13.2-1 Severity: minor Tags: patch
Dear Maintainers, I was about hacking notmuch-mutt to make it possible to restrict the search to the last month only when I discovered in the source code that this was already very possible, but simply badly documented. So, instead of a perl patch, I provide a documentation one. I hope you'll find it useful, Mt
--- /home/mquinson/lab/130128-notmuch-mutt.orig 2013-01-28 10:09:48.722323565 +0100 +++ /usr/bin/notmuch-mutt 2013-01-28 10:29:26.374270563 +0100 @@ -213,13 +213,19 @@ macro index <F6> \ "<enter-command>unset wait_key<enter><pipe-message>notmuch-mutt tag -inbox<enter>" \ "notmuch: remove message from inbox" + macro index <F7> \ + "<enter-command>unset wait_key<enter><shell-escape>notmuch-mutt --prompt search $(date +%s --date='last month')..$(date +%s) <enter><change-folder-readonly>~/.cache/notmuch/mutt/results<enter>" \ + "notmuch: search mail (last month)" The first macro (activated by <F8>) prompts the user for notmuch search terms and then jump to a temporary maildir showing search results. The second macro (activated by <F9>) reconstructs the thread corresponding to the current mail and show it as search results. The third macro (activated by <F6>) removes the tag C<inbox> from the current message; by changing C<-inbox> this macro may be -customised to add or remove tags appropriate to the users notmuch work-flow. +customised to add or remove tags appropriate to the users notmuch work-flow. +The fourth macro demonstrates how notmuch-mutt forwards any additional terms +to notmuch. Here, this is used to limit the search to mails which age is not +more than one month. To keep notmuch index current you should then periodically run C<notmuch new>. Depending on your local mail setup, you might want to do that via cron,