Am Mo., 13. Juni 2022 um 11:31 Uhr schrieb erik colson <e...@ecocode.net>:
>
> Michael J Gruber <michaeljgruber+grubix+...@gmail.com> writes:
>
> > That search works without the macro, but not as a macro: notmuch
> > computes an empty `Query()` for this (as per `NOTMUCH_DEBUG_QUERY=1`).
> > I'm not sure whether this is intended or an artefact of the
> > implementation, since both the macro and the regex need
> > expansion/evaluation before being fed to xapian, and the order
> > matters.
> >
> > Defining `D=(macro (dossier) ((tag ,dossier)))` and calling it with
> > `(D (rx ddddd))` works, btw (but is not what you want, obviously), so
> > something tells me lazy evaluation of macros is not completely lazy ;)
>
> Thanks for checking this out Michael.  I decided to write an emacs lisp
> function which I keybind and which prompts for the variable, and then
> launches notmuch-search with that:
>
> (defun ec/notmuch-search-dossier ()
>   "Zoek mails van een dossier"
>   (interactive
>    (let* ((dossier (read-no-blanks-input "Dossier:"))
>           (zoek (concat "tag:/" dossier "/")))
>           (notmuch-search zoek nil nil nil nil))))
>
> This works like a charm ;) Well, I am of course open to enhancement
> suggestions!
>
> Also I upgraded my OS to fedora36 and now I use the standard notmuch
> package instead of compiling it myself.  So I don't have sexp support
> anymore and therefor I am moving the squeries I added to my notmuch
> config into emacs lisp functions.

FYI: I submitted sfsexp to fedora (review pending), and as soon as
that is in, I will adjust the notmuch package.
(Until then there is copr mjg/notmuch-sfsexp at your own risk ;))

Cheers
Michael
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org

Reply via email to