Re: [PATCH] WIP: regexp matching in 'subject' and 'from'
authorGaute Hope <eg@gaute.vetsj.com>
Fri, 10 Jun 2016 08:38:05 +0000 (08:38 +0000)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:02 +0000 (16:22 -0700)
dc/800152854ef405c1f9dbe22ed183229500f28d [new file with mode: 0644]

diff --git a/dc/800152854ef405c1f9dbe22ed183229500f28d b/dc/800152854ef405c1f9dbe22ed183229500f28d
new file mode 100644 (file)
index 0000000..3bb971e
--- /dev/null
@@ -0,0 +1,114 @@
+Return-Path: <eg@gaute.vetsj.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 557A46DE01BE\r
+ for <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 01:38:19 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.479\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.479 tagged_above=-999 required=5 tests=[AWL=0.241,\r
+  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ZgtPIUEKCYtu for <notmuch@notmuchmail.org>;\r
+ Fri, 10 Jun 2016 01:38:11 -0700 (PDT)\r
+Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com\r
+ [74.125.82.47]) by arlo.cworth.org (Postfix) with ESMTPS id DDDC86DE0130 for\r
+ <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 01:38:10 -0700 (PDT)\r
+Received: by mail-wm0-f47.google.com with SMTP id k204so92077322wmk.0\r
+ for <notmuch@notmuchmail.org>; Fri, 10 Jun 2016 01:38:10 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=gaute-vetsj-com.20150623.gappssmtp.com; s=20150623;\r
+ h=date:from:subject:to:cc:references:in-reply-to:user-agent\r
+ :message-id:mime-version:content-transfer-encoding;\r
+ bh=P21RWLKa/uWEzsk1DFcVa4TUlF8jlM/k7RXiqj2E/J8=;\r
+ b=stSS5iqAkRiiadhozZ+9r6IIDBVT3Sa96C1yzK6GZwPuyQwg+DGFZIGOq0tO5D8Gt6\r
+ upoNmLnSpAl0UvLyDYdvG8849sj3EXCGoxNcgRAA5MAOEDZY08Kwjn16270LDWp5rHSo\r
+ GvfLW7T2QObgOwI6xI57SH8gNvS6AMo7O9H43PIkkNI0iCSAeOiMlLuQsUToeXO6HuyZ\r
+ kceM2MVzxuXozwKSATjsG0gF4i/WmVZtdVMh5f61bLmw8b4tagjZhxA5nXCO7m0vMa2a\r
+ 48hA32Hrv8guS6koRBlBoEEeho5mhAe0h1u1Hj4i69KiYzd2XLIQQX2cOMQW8n5e5bkY\r
+ XmLg==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to\r
+ :user-agent:message-id:mime-version:content-transfer-encoding;\r
+ bh=P21RWLKa/uWEzsk1DFcVa4TUlF8jlM/k7RXiqj2E/J8=;\r
+ b=Lnn07+R1sxWGpfCopDOpU1ArMJIMK08YuM6lrustBcsDSsh2O9fz1fU4mVH4nKvSRw\r
+ 80wjMIi1ozvRtt5wFABEHGBo2HnBfnqZvO8EM9yMaC8LFRMNM6sEDLl1Zr3qiEfXoBFi\r
+ Z5GuR0Zcdwyt4WNXb+u9JYxu8rDk7xhuhAbDUwervFTy1bF1OksyKcOdzIOZ0ziKGJlF\r
+ 30PkxETAhSQMQEHYOnpkdvCYJwtbz4ovFtCIzwpDkq47S33Rqp/rYCwORDtB+UenHRm0\r
+ N2h2bZCBI4ed5DQj7s5ZbEypKBOXgHFD1BeOkU5zgAC+H9nFMuIz6Af123Q3q9UdZhH/\r
+ HDHQ==\r
+X-Gm-Message-State:\r
+ ALyK8tKov1hxyArtskk2sgMpv2/XiqM6CGZTl+9QOI+ToExvxULt0FlnZVKWiPKkPgERAg==\r
+X-Received: by 10.28.176.7 with SMTP id z7mr1435714wme.17.1465547888501;\r
+ Fri, 10 Jun 2016 01:38:08 -0700 (PDT)\r
+Received: from localhost (241.89-20-241.enivest.net. [89.20.241.241])\r
+ by smtp.gmail.com with ESMTPSA id m5sm11180254wji.16.2016.06.10.01.38.06\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 10 Jun 2016 01:38:06 -0700 (PDT)\r
+Date: Fri, 10 Jun 2016 08:38:05 +0000\r
+From: Gaute Hope <eg@gaute.vetsj.com>\r
+Subject: Re: [PATCH] WIP: regexp matching in 'subject' and 'from'\r
+To: David Bremner <david@tethera.net>, Austin Clements\r
+ <aclements@csail.mit.edu>\r
+Cc: sfischme@uwaterloo.ca, notmuch <notmuch@notmuchmail.org>\r
+References: <1465265149-7174-1-git-send-email-david@tethera.net>\r
+ <1465525688-30913-1-git-send-email-david@tethera.net>\r
+In-Reply-To: <1465525688-30913-1-git-send-email-david@tethera.net>\r
+User-Agent: astroid/v0.5-221-g4c2c7173 (https://github.com/gauteh/astroid)\r
+Message-Id: <1465547660-astroid-0-nudmv20lbk-1296@strange>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8; format=flowed\r
+Content-Transfer-Encoding: quoted-printable\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 10 Jun 2016 08:38:19 -0000\r
+\r
+David Bremner writes on juni 10, 2016 4:28:\r
+> the idea is that you can run\r
+>=20\r
+> % notmuch search subject_re:<your-favourite-regexp>\r
+> % notmuch search from_re:<your-favourite-regexp>'\r
+>=20\r
+> or\r
+>=20\r
+> % notmuch search subject:"your usual phrase search"\r
+> % notmuch search from:"usual phrase search"\r
+>=20\r
+> This should also work with bindings, since it extends the query parser.\r
+>=20\r
+> This is trivial to extend for other value slots, but currently the only\r
+> value slots are date, message_id, from, subject, and last_mod. Date is\r
+> already searchable, and message_id is not obviously useful to regex\r
+> match.\r
+> ---\r
+>=20\r
+> This is more or less complete codewise, it fixes the know problems\r
+> with the last version. Names of prefixes are debatable, and of course\r
+> it needs doc and tests.  I don't see any reason not to do this at the mom=\r
+ent,\r
+> since it's basically free; no new terms are added to the database.\r
+\r
+Cool!\r
+\r
+Would it break a lot of things if you just replace the original prefix?\r
+\r
+Could it be made to work on the message body?\r
+\r
+Regards, Gaute\r
+\r
+=\r