Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 1d / 79120ba22f5e5325f60f8389a1bfd989f9fc7b
1 Return-Path: <jani@nikula.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 0CC2A429E4D\r
6         for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:46 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 5GhrwkvHuvE4 for <notmuch@notmuchmail.org>;\r
16         Wed, 23 Nov 2011 13:08:45 -0800 (PST)\r
17 Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
18         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 301D8429E4B\r
21         for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:45 -0800 (PST)\r
22 Received: by bkaq10 with SMTP id q10so2250402bka.26\r
23         for <notmuch@notmuchmail.org>; Wed, 23 Nov 2011 13:08:42 -0800 (PST)\r
24 Received: by 10.205.128.138 with SMTP id he10mr25420692bkc.13.1322082522183;\r
25         Wed, 23 Nov 2011 13:08:42 -0800 (PST)\r
26 Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
27         [80.220.92.23])\r
28         by mx.google.com with ESMTPS id i3sm23159675fah.11.2011.11.23.13.08.39\r
29         (version=SSLv3 cipher=OTHER); Wed, 23 Nov 2011 13:08:40 -0800 (PST)\r
30 From: Jani Nikula <jani@nikula.org>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [RFC PATCH 0/2] emacs proof-of-concept: functions in saved searches\r
33 Date: Wed, 23 Nov 2011 23:08:35 +0200\r
34 Message-Id: <cover.1322080622.git.jani@nikula.org>\r
35 X-Mailer: git-send-email 1.7.5.4\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Wed, 23 Nov 2011 21:08:46 -0000\r
49 \r
50 Hi, this is a quick proof-of-concept implementation of an idea by m1lkc0w on IRC\r
51 (transcript below) to allow functions in saved searches. I'm not quite sure\r
52 whether I'm for or against the idea, though it's kind of neat... :)\r
53 \r
54 Patch 1 adds the implementation. The (if (functionp ...)) parts should obviously\r
55 be abstracted, but otherwise there's not much to it.\r
56 \r
57 Patch 2 has a couple of crude example functions (that I just shoved into\r
58 notmuch-hello.el) that might be useful in saved searches. One to match\r
59 everything that the other saved searches don't, another a building block to\r
60 combine existing saved searches.\r
61 \r
62 Comments are welcome, though I don't think I'll be pursuing this much further.\r
63 \r
64 BR,\r
65 Jani.\r
66 \r
67 \r
68 PS. For the original problem of date range searches there's also\r
69 id:"cover.1312964528.git.jani@nikula.org" if you're willing to live with such\r
70 out of tree patches (they won't be merged).\r
71 \r
72 \r
73 [2011-11-23 UTC+2]\r
74  00:43         m1lkc0w   How difficult would it be to allow functions in "saved \r
75                          searches"?\r
76  00:46         m1lkc0w   This could be helpful to define functions for \r
77                          calculating search timestamps\r
78  00:48         bremner   m1lkc0w: personally I'd like to get away from saved \r
79                          searches being emacs specific\r
80  00:48         bremner   for dates, would it solve your problem if notmuch had \r
81                          a sensible date parser?\r
82  00:49         m1lkc0w   bremner: sure.\r
83  00:49         m1lkc0w   bremner: I just thought that in the meantime, I can \r
84                          calculate the timespamps in elisp\r
85  00:50         m1lkc0w   bremner: Just wanted to list last week's email - \r
86                          that's hwo the idea came up\r
87  00:51         bremner   I guess it wouldn't be that hard for someone with \r
88                          elisp skillz to make saved searches have a ("name" . \r
89                          function ) in addition to (name . string)\r
90 \r
91 \r
92 Jani Nikula (2):\r
93   emacs: allow functions as saved searches\r
94   emacs: a couple of example functions that might be useful with saved\r
95     searches\r
96 \r
97  emacs/notmuch-hello.el |   27 +++++++++++++++++++++++++--\r
98  emacs/notmuch-lib.el   |    8 ++++++--\r
99  emacs/notmuch.el       |    9 +++++++--\r
100  3 files changed, 38 insertions(+), 6 deletions(-)\r
101 \r
102 -- \r
103 1.7.5.4\r
104 \r