From 008c110c228ebe20242b3db0e468d979bec32522 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Robert=20K=C3=BCnnemann?= Date: Wed, 10 Jun 2015 17:38:33 +0200 Subject: [PATCH] Syntactic sugar for range syntax --- 10/957d2f39c061240dc41d78fa28b2cb36da0ac9 | 80 +++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 10/957d2f39c061240dc41d78fa28b2cb36da0ac9 diff --git a/10/957d2f39c061240dc41d78fa28b2cb36da0ac9 b/10/957d2f39c061240dc41d78fa28b2cb36da0ac9 new file mode 100644 index 000000000..f64ad9e4b --- /dev/null +++ b/10/957d2f39c061240dc41d78fa28b2cb36da0ac9 @@ -0,0 +1,80 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 6D95B6DE0943 + for ; Wed, 10 Jun 2015 08:57:01 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.001 +X-Spam-Level: +X-Spam-Status: No, score=0.001 tagged_above=-999 required=5 tests=[AWL=0.001, + RCVD_IN_DNSWL_NONE=-0.0001] 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 QBd19kenvG1N for ; + Wed, 10 Jun 2015 08:56:59 -0700 (PDT) +X-Greylist: delayed 1100 seconds by postgrey-1.35 at arlo; + Wed, 10 Jun 2015 08:56:58 PDT +Received: from wp251.webpack.hosteurope.de (wp251.webpack.hosteurope.de + [80.237.133.20]) + by arlo.cworth.org (Postfix) with ESMTPS id F36856DE0244 + for ; Wed, 10 Jun 2015 08:56:58 -0700 (PDT) +Received: from dslb-088-069-220-164.088.069.pools.vodafone-ip.de + ([88.69.220.164] helo=localhost); authenticated + by wp251.webpack.hosteurope.de running ExIM with esmtpsa + (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) + id 1Z2i5J-0001DX-Pn; Wed, 10 Jun 2015 17:38:33 +0200 +Date: Wed, 10 Jun 2015 17:38:33 +0200 +From: Robert =?iso-8859-1?Q?K=FCnnemann?= +To: notmuch@notmuchmail.org +Subject: Syntactic sugar for range syntax +Message-ID: <20150610153833.GA19301@peachum.local> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1; format=flowed +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +User-Agent: Mutt/1.5.23.1 (2014-03-12) +X-bounce-key: webpack.hosteurope.de;robert@kunnemann.de;1433951819;9b1d2141; +X-Mailman-Approved-At: Thu, 11 Jun 2015 04:27:39 -0700 +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Wed, 10 Jun 2015 15:57:01 -0000 + +Hi everyone, + +I've been using notmuch for about a year now (using mutt-kz) and I am +very happy with it. I have, however, a small suggestion about the range +syntax in search queries. Often, I am looking for emails that have +occurred, say, in the last week. The query has the following form: + + date:today-1week..today + +The following syntactic sugar could shorten this kind of queries: + + date:r -> date:r..today, if r is a relative date + date:a -> date:a..a, if a is an absolute date + date:a-r -> date:a-r..a, for combination. + +(If r is interpreted as today-r, the first two transformations are +subsumed by the last.) + +For example: + date:today -> date:today..today + date:-1week -> date:-1week..today + date:24.12.2014-4w -> date:24.12.2014-4w..24.12.2014 + +What do you think about this suggestion? Is this something notmuch would +do, or rather something for xapian? + +With kind regards, Robert Künnemann -- 2.26.2