Apparently, terms with a common prefix are *not* connected by implicit "OR"

Jorge P. de Morais Neto jorge+list at
Sun Aug 11 10:20:38 PDT 2019

Hi.  The NOTMUCH-SEARCH-TERMS man page says:

    Each term in the query will be implicitly connected by a logical AND
    if no explicit operator is provided (except that terms with a common
    prefix will be implicitly combined with OR).

However, in practice I get different results:
    $ notmuch count '( OR to:jorge+cp+concurso at'
    $ notmuch count '( to:jorge+cp+concurso at'

I have other examples of this.  I currently use notmuch 0.29.1 privately
backported to Debian buster according to the Debian Wiki [procedure][],
but I already got this problem in earlier notmuch releases, including
the official Debian buster package.  What gives?


My workarund is to always explicit the "OR" operator, as in:
    (to:concurso OR to:dominandoti OR to:cebraspe OR to:gleyson131 OR OR OR OR OR from:gleyson131 OR from:cebraspe OR from:dominandoti OR from:concurso OR is:lists/itaconcursos)

If the OR operator was indeed implicit, the query above would be

- I am Brazilian.  I hope my English is correct and I welcome feedback
- Please adopt free formats like PDF, ODF, Org, LaTeX, Opus, WebM and 7z
- Free/libre software for Android:
- [[][What is free software?]]

More information about the notmuch mailing list