From: Jani Nikula Date: Fri, 2 Nov 2012 18:53:15 +0000 (+0200) Subject: Re: [PATCH v6 0/9] notmuch search date:since..until query support X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=85358f0599dfc42164d65fd370bd3cf0e228de31;p=notmuch-archives.git Re: [PATCH v6 0/9] notmuch search date:since..until query support --- diff --git a/04/1869679b8df08aea0219b397af9a3c03410d8b b/04/1869679b8df08aea0219b397af9a3c03410d8b new file mode 100644 index 000000000..e0876e887 --- /dev/null +++ b/04/1869679b8df08aea0219b397af9a3c03410d8b @@ -0,0 +1,96 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 88F3F431FAF + for ; Fri, 2 Nov 2012 11:53:24 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id fOho3P75dNbK for ; + Fri, 2 Nov 2012 11:53:23 -0700 (PDT) +Received: from mail-la0-f53.google.com (mail-la0-f53.google.com + [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id DBB20431FAE + for ; Fri, 2 Nov 2012 11:53:22 -0700 (PDT) +Received: by mail-la0-f53.google.com with SMTP id l5so3002321lah.26 + for ; Fri, 02 Nov 2012 11:53:21 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:x-gm-message-state; + bh=usUKd5P3v2Bsq3BtzsKK16Y+etrzrUwTTBUjpmBlcSA=; + b=fi97Tobiw0gJUQAYPje3lGeEzryv/B1Qp6Z+/3uMLLkhvbbcQMANpwAsWQmOhGWFkn + fSqFQuYjYkHAZgqhE7tnMeo9S4A08eL5iPqAA0+5uQS6XpYbrbNSqGS3lbxX2hsGovaE + rUyASid0J3o7ujkZpS+J14IqymKxpKx/Sep99hs2eqaHkoJoIFVPaqW45pH8Hmt/wq7G + 59s2wkr78eST8EepKfqRc45EWgPh6nEO2uH1iBJeQ55QlRccGvqEPAv0v/wBvHe3N1e3 + 4xMAjj8P+AymOpUukitSSsk4tBOfaONuMxak+rTUeQuCkr/SaE5omQd3vX++AQ6qEqzo + hulQ== +Received: by 10.152.104.50 with SMTP id gb18mr2569260lab.9.1351882399818; + Fri, 02 Nov 2012 11:53:19 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. + [80.223.81.27]) + by mx.google.com with ESMTPS id p9sm3456922lbc.3.2012.11.02.11.53.17 + (version=SSLv3 cipher=OTHER); Fri, 02 Nov 2012 11:53:18 -0700 (PDT) +From: Jani Nikula +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH v6 0/9] notmuch search date:since..until query support +In-Reply-To: <87hap76gz9.fsf@steelpick.2x.cz> +References: + <87r4oejstw.fsf@zancas.localnet> <87hap76gz9.fsf@steelpick.2x.cz> +User-Agent: Notmuch/0.14+81~g1924356 (http://notmuchmail.org) Emacs/23.4.1 + (i686-pc-linux-gnu) +Date: Fri, 02 Nov 2012 20:53:15 +0200 +Message-ID: <87d2zv3kh0.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Gm-Message-State: + ALoCoQmgcYEnzoyZwBHr+WVEPdDqtUmBncs1p9OLl68S7UI37ONUYUgVKvg/7dE+czo1lPn6ykNa +Cc: Tomi Ollila +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Fri, 02 Nov 2012 18:53:24 -0000 + +On Fri, 02 Nov 2012, Michal Sojka wrote: +> Just pulled current HEAD and tried +> +> $ notmuch search tag:notmuch and date:"this week" + +> notmuch search tag:notmuch and date:'"this week"' + +> $ notmuch search tag:notmuch and date:"this week.." + +There are two technical limitations at play here, imposed on us by +Xapian. First, Xapian provides us with no way to support the date: +prefix *without* the range operator "..", and worse, AFAICT there's no +way to flag this as an error either. Second, Xapian does not support +spaces in range expression (at least not the last time I checked from +the source) regardless of the amount of quoting or escaping. + +These limitations are documented in the DATE AND TIME SEARCH section of +the notmuch-search-terms(7) man page, and that's unfortunately about as +much as we can do about it at the moment. + +The workaround is to always have .. in the date: search, and replace +spaces with e.g. '-' or '_'. See the man page for details. The search +you are looking for is either date:this-week..this-week or just +date:this-week.. + +HTH, +Jani.