Semi-ready saved search

Tomas Nordin tomasn at posteo.net
Sun Jun 4 08:48:06 PDT 2017


David Bremner <david at tethera.net> writes:
> One approach would be to define a function like this
>
> (defun last-days-search(arg)
>   (interactive "p")
>   (notmuch-search (format "date:%dd.. and tag:inbox" arg)))
>
> Then you can pass a numeric argument in the usual emacs way, e.g. if
> that function is bound to C-c d, ESC 2 C-c d will give you two days.

Thank you. I could easily re-shape this to behave as I want:

(defun non-list-for-days-search(arg)
  (interactive "nNon-list mails during this many days: ")
  (notmuch-search (format "date:%dd.. and not tag:rfile" arg)))

(define-key notmuch-hello-mode-map (kbd "S") 'non-list-for-days-search)


More information about the notmuch mailing list