Re: Semi-ready saved search

2017-06-04 Thread Tomas Nordin
David Bremner  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)
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Re: Semi-ready saved search

2017-05-30 Thread David Bremner
Tomas Nordin  writes:

> Hello Notmuchers
>
> What is a good way (with emacs) to hook into the search to modify only a
> part of a search term. I find myself often doing this:
>
> date:2d.. not is:rfile
>
> rfile is my tag for mails that i archive locally. I am looking for a way
> to query myself only for the number of days in the minibuffer. I use
> this search to filter off all mailing list stuff from a search. So, in
> the above example I would only have to answer 2 .

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.

___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch


Semi-ready saved search

2017-05-13 Thread Tomas Nordin
Hello Notmuchers

What is a good way (with emacs) to hook into the search to modify only a
part of a search term. I find myself often doing this:

date:2d.. not is:rfile

rfile is my tag for mails that i archive locally. I am looking for a way
to query myself only for the number of days in the minibuffer. I use
this search to filter off all mailing list stuff from a search. So, in
the above example I would only have to answer 2 .

Sunny regards
--
Tomas
___
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch