Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / ac / 519f9d121303c914c31b8f58d0af2e89d73015
1 Return-Path: <tomi.ollila@iki.fi>\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 B748A431FC7\r
6         for <notmuch@notmuchmail.org>; Sun, 25 May 2014 08:54:26 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 j5PUhvxToiNk for <notmuch@notmuchmail.org>;\r
16         Sun, 25 May 2014 08:54:18 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 8F804431FAF\r
19         for <notmuch@notmuchmail.org>; Sun, 25 May 2014 08:54:18 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id B10F410008F;\r
22         Sun, 25 May 2014 18:54:08 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Jani Nikula <jani@nikula.org>, Charles Celerier <cceleri@cs.stanford.edu>,\r
25         notmuch@notmuchmail.org\r
26 Subject: Re: [RFC PATCH] configure: Create sh.config based on\r
27         Makefile.config data\r
28 In-Reply-To: <87tx8ei7xj.fsf@nikula.org>\r
29 References: <1399802816-29521-1-git-send-email-tomi.ollila@iki.fi>\r
30         <87tx8ei7xj.fsf@nikula.org>\r
31 User-Agent: Notmuch/0.18+12~g9d41f94 (http://notmuchmail.org) Emacs/24.3.1\r
32         (x86_64-unknown-linux-gnu)\r
33 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
34         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
35         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
36 Date: Sun, 25 May 2014 18:54:08 +0300\r
37 Message-ID: <m2lhtphn1b.fsf@guru.guru-group.fi>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain\r
40 X-BeenThere: notmuch@notmuchmail.org\r
41 X-Mailman-Version: 2.1.13\r
42 Precedence: list\r
43 List-Id: "Use and development of the notmuch mail system."\r
44         <notmuch.notmuchmail.org>\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
48 List-Post: <mailto:notmuch@notmuchmail.org>\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
52 X-List-Received-Date: Sun, 25 May 2014 15:54:26 -0000\r
53 \r
54 On Sun, May 25 2014, Jani Nikula <jani@nikula.org> wrote:\r
55 \r
56 > On Sun, 11 May 2014, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
57 >> Read Makefile.config and when line matches var = val assignment\r
58 >> create _var='val' from it. var must match [a-zA-Z_][a-zA-Z0-9_]*\r
59 >> and val [^'\]* ('\' usually meaning multiline assignments).\r
60 >>\r
61 >> Write these lines to sh.config.\r
62 >>\r
63 >> sh.config can then be used e.g. in test scripts.\r
64 >\r
65 > I like the general idea here much better than [1] or the symlinks that\r
66 > we have now. However I'm wary of the sed magic and the various ways it\r
67 > might trip over. The resulting file has way more info than we need, but\r
68 > then it also misses the multiline settings (which we luckily don't\r
69 > need).\r
70 >\r
71 > At the risk of duplicating stuff, I'd go with manually generated config\r
72 > for shell with minimal amount of information. For now, we'd only need\r
73 > this for HAVE_XAPIAN_COMPACT and HAVE_MAN (the latter of which could\r
74 > also be dropped from Makefile.config).\r
75 \r
76 I agree with this. It looks simpler and cleaner to an outside observer.\r
77 I don't think the duplication of (one variable now) stuff is of any issue\r
78 here (now or in foreseeable future).\r
79 \r
80 >\r
81 > BR,\r
82 > Jani.\r
83 >\r
84 >\r
85 > [1] id:1399737224-79348-1-git-send-email-cceleri@cs.stanford.edu\r
86 \r
87 In any case, this sh.config to be useful sourcing of it needs to be\r
88 added to test/test-lib.sh and then used in the followup patch of\r
89 the above...\r
90 \r
91 Tomi\r
92 \r
93 \r
94 >> ---\r
95 >>  configure | 5 +++++\r
96 >>  1 file changed, 5 insertions(+)\r
97 >>\r
98 >> diff --git a/configure b/configure\r
99 >> index 9bde2eb72b0e..feb0e480f86a 100755\r
100 >> --- a/configure\r
101 >> +++ b/configure\r
102 >> @@ -935,3 +935,8 @@ CONFIGURE_CXXFLAGS = -DHAVE_GETLINE=\$(HAVE_GETLINE) \$(GMIME_CFLAGS)    \\\r
103 >>  \r
104 >>  CONFIGURE_LDFLAGS =  \$(GMIME_LDFLAGS) \$(TALLOC_LDFLAGS) \$(ZLIB_LDFLAGS) \$(XAPIAN_LDFLAGS)\r
105 >>  EOF\r
106 >> +\r
107 >> +# Create sh.config based on Makefile.config values.\r
108 >> +# Output will be _var='val', val not containing ' nor \ (skipping multiline).\r
109 >> +sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\) *= *\([^\\'\'']*\)$/_\1='\''\2'\''/p' \\r
110 >> +    Makefile.config > sh.config\r
111 >> -- \r
112 >> 1.8.0\r
113 >>\r
114 >> _______________________________________________\r
115 >> notmuch mailing list\r
116 >> notmuch@notmuchmail.org\r
117 >> http://notmuchmail.org/mailman/listinfo/notmuch\r
118 > _______________________________________________\r
119 > notmuch mailing list\r
120 > notmuch@notmuchmail.org\r
121 > http://notmuchmail.org/mailman/listinfo/notmuch\r