From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id E57CB6DE0287 for ; Sat, 7 Apr 2018 15:10:59 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xAjuSY13vnBy for ; Sat, 7 Apr 2018 15:10:59 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 033E36DE0286 for ; Sat, 7 Apr 2018 15:10:58 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1f4w2z-0003CZ-Vh; Sat, 07 Apr 2018 18:10:58 -0400 Received: (nullmailer pid 15305 invoked by uid 1000); Sat, 07 Apr 2018 22:10:56 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] doc: add a section on quoting to notmuch-search-terms(7) Date: Sat, 7 Apr 2018 19:10:51 -0300 Message-Id: <20180407221051.15260-1-david@tethera.net> X-Mailer: git-send-email 2.16.3 In-Reply-To: <83f18ad4-65df-2e84-587d-04658d371462@gmail.com> References: <83f18ad4-65df-2e84-587d-04658d371462@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Apr 2018 22:11:00 -0000 I think we've diverged enough from the Xapian query parser that we can't rely on that syntax description [1]. As far as I can tell, [1] also only discusses quotes in the context of phrases. [1]: https://xapian.org/docs/queryparser.html --- doc/man7/notmuch-search-terms.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/doc/man7/notmuch-search-terms.rst b/doc/man7/notmuch-search-terms.rst index b4d784a3..a4e5abfc 100644 --- a/doc/man7/notmuch-search-terms.rst +++ b/doc/man7/notmuch-search-terms.rst @@ -273,6 +273,28 @@ Both of these will match a subject "Free Delicious Pizza" while will not. +Quoting +------- + +Double quotes are also used by the notmuch query parser to protect +boolean terms or regular expressions containing spaces or other +special characters, e.g. + +:: + + tag:"a tag" + +:: + + folder:"/^.*/(Junk|Spam)$/" + +As with phrases, you will probably have to protect the double quotes +from the shell e.g. + +:: + + % notmuch search 'folder:"/^.*/(Junk|Spam)$/"' + DATE AND TIME SEARCH ==================== -- 2.16.3