Re: [PATCH] add has: query prefix to search for specific properties
[notmuch-archives.git] / 7b / 140cde62bee9820d1a55bd8f0120d63f3b381a
1 Return-Path: <too@guru-group.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 E7795431FAF\r
6         for <notmuch@notmuchmail.org>; Sun,  5 Aug 2012 04:12:54 -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 O7mEmzNGOa47 for <notmuch@notmuchmail.org>;\r
16         Sun,  5 Aug 2012 04:12:54 -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 43741431FAE\r
19         for <notmuch@notmuchmail.org>; Sun,  5 Aug 2012 04:12:54 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id B59221002A4; Sun,  5 Aug 2012 14:13:04 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH 1/2] test: emacs: call accept-process-output in\r
25         notmuch-test-wait\r
26 Date: Sun,  5 Aug 2012 14:13:01 +0300\r
27 Message-Id: <1344165182-29246-1-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.1\r
29 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Sun, 05 Aug 2012 11:12:55 -0000\r
43 \r
44 notmuch-test-wait called sleep-for in a loop to wait unconditionally 0.1\r
45 seconds while waiting for process to exit.\r
46 accept-process-output returns as soon as there is any data available\r
47 from process, so using it avoids unnecessary fixed delays.\r
48 Both of these functions run process sentinels.\r
49 ---\r
50 \r
51 This 2 patch series is an alternative to \r
52 id:"1344122222-14344-1-git-send-email-tomi.ollila@iki.fi"\r
53 which speeds up execution when Emacs version is not 23.1.\r
54 (so that users of newer emacs doesn't need to suffer the\r
55 workaround made for emacs 23.1 users in second patch in\r
56 this series)\r
57 \r
58 during testing of the feature I had\r
59 +    (accept-process-output nil 10)))\r
60 there -- it did not wait 10 seconds.\r
61 \r
62 I also tested the following function:\r
63 \r
64 (defun notmuch-test-wait () t)\r
65 \r
66 i.e. dropping wait altogether -- this makes tests fail in different ways...\r
67 \r
68  test/test-lib.el |    2 +-\r
69  1 files changed, 1 insertions(+), 1 deletions(-)\r
70 \r
71 diff --git a/test/test-lib.el b/test/test-lib.el\r
72 index 5dd6271..52d9936 100644\r
73 --- a/test/test-lib.el\r
74 +++ b/test/test-lib.el\r
75 @@ -38,7 +38,7 @@\r
76  (defun notmuch-test-wait ()\r
77    "Wait for process completion."\r
78    (while (get-buffer-process (current-buffer))\r
79 -    (sleep-for 0.1)))\r
80 +    (accept-process-output nil 0.1)))\r
81  \r
82  (defun test-output (&optional filename)\r
83    "Save current buffer to file FILENAME.  Default FILENAME is OUTPUT."\r
84 -- \r
85 1.7.1\r
86 \r