[PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 98 / dd5c7b8f00cc37dfc27b8c78747a87cd815833
1 Return-Path: <pieter@praet.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 2E7E5431FDE\r
6         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 09:15:50 -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 xwe4KgD-UxxO for <notmuch@notmuchmail.org>;\r
16         Thu,  1 Mar 2012 09:15:49 -0800 (PST)\r
17 Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
18         [209.85.212.181]) (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 1EC76431FAE\r
21         for <notmuch@notmuchmail.org>; Thu,  1 Mar 2012 09:15:49 -0800 (PST)\r
22 Received: by wico1 with SMTP id o1so111449wic.26\r
23         for <notmuch@notmuchmail.org>; Thu, 01 Mar 2012 09:15:48 -0800 (PST)\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
25         10.180.104.137 as permitted sender) client-ip=10.180.104.137; \r
26 Authentication-Results: mr.google.com;\r
27         spf=pass (google.com: domain of pieter@praet.org\r
28         designates 10.180.104.137 as permitted sender)\r
29         smtp.mail=pieter@praet.org\r
30 Received: from mr.google.com ([10.180.104.137])\r
31         by 10.180.104.137 with SMTP id ge9mr12667718wib.20.1330622148037\r
32         (num_hops = 1); Thu, 01 Mar 2012 09:15:48 -0800 (PST)\r
33 Received: by 10.180.104.137 with SMTP id ge9mr10150495wib.20.1330622147981;\r
34         Thu, 01 Mar 2012 09:15:47 -0800 (PST)\r
35 Received: from localhost ([109.131.111.80])\r
36         by mx.google.com with ESMTPS id h19sm43037454wiw.9.2012.03.01.09.15.47\r
37         (version=TLSv1/SSLv3 cipher=OTHER);\r
38         Thu, 01 Mar 2012 09:15:47 -0800 (PST)\r
39 From: Pieter Praet <pieter@praet.org>\r
40 To: David Bremner <david@tethera.net>, Michal Sojka <sojkam1@fel.cvut.cz>\r
41 Subject: Re: [PATCH] emacs: Mention race condition safety in user visible\r
42         documentation\r
43 In-Reply-To: <87wr759gs5.fsf@zancas.localnet>\r
44 References: <1329605059-15358-1-git-send-email-sojkam1@fel.cvut.cz>\r
45         <CAB+hUn907hwS46jM4FY+BAhBTE1VMaMs=q0PFEou3DfWWaDF8g@mail.gmail.com>\r
46         <87y5rzmg5v.fsf@steelpick.2x.cz> <87vcn0tw1f.fsf@qmul.ac.uk>\r
47         <87linwsg2r.fsf@steelpick.2x.cz> <87wr759gs5.fsf@zancas.localnet>\r
48 User-Agent: Notmuch/0.11.1+210~g6afc43e (http://notmuchmail.org) Emacs/23.3.1\r
49         (x86_64-unknown-linux-gnu)\r
50 Date: Thu, 01 Mar 2012 18:13:27 +0100\r
51 Message-ID: <87linkmeh4.fsf@praet.org>\r
52 MIME-Version: 1.0\r
53 Content-Type: text/plain; charset=us-ascii\r
54 X-Gm-Message-State:\r
55  ALoCoQkyLPq+o9a6j8RRkbvAL+nwloySknzNxHuOV7nPRpdV+gT+w1yaH+oC+oJp5SEm4NIpQhBO\r
56 Cc: notmuch@notmuchmail.org\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Thu, 01 Mar 2012 17:15:50 -0000\r
70 \r
71 On Wed, 29 Feb 2012 22:49:46 -0400, David Bremner <david@tethera.net> wrote:\r
72 > On Tue, 21 Feb 2012 10:15:08 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
73 > > -- >8 --\r
74 > > Subject: [PATCH] emacs: Clarify description of thread manipulating functions\r
75 > > \r
76 > > It is not clear whether the term "thread" refers to the thread in the\r
77 > > database or to the thread currently shown in a buffer. Those two\r
78 > > meanings may refer to different sets of messages, e.g. when a new email\r
79 > > is added to the database while the buffer shows the state before the new\r
80 > > email arrived.\r
81\r
82 > (will be) pushed.\r
83\r
84 > For future reference, it's slightly inconvenient for me to use "git am\r
85 > -c". Not a big deal, but a sequence of those would make me cry...\r
86 >\r
87 \r
88 Something like this might help save you some time:\r
89 (assuming you'd rather not leave Emacs to apply patches)\r
90 \r
91   #+begin_src emacs-lisp\r
92     (defvar praet/projects\r
93       '(("notmuch@notmuchmail.org" . "~/src/dev/notmuch/")\r
94         ("foo@bar.org" . "~/src/dev/foobar/")))\r
95 \r
96     (defun praet/notmuch-patch-apply (&optional all-open)\r
97       "Apply a patch from `notmuch-show-mode' using git-am(1).\r
98     If ALL-OPEN is non-nil, (try to) apply all open messages."\r
99       (interactive "P")\r
100       (let* ((msg (notmuch-show-get-message-id t))\r
101              (rcpts (concat (notmuch-show-get-to)\r
102                             (notmuch-show-get-cc)))\r
103              (projs (loop for project in praet/projects\r
104                           if (string-match (car project) rcpts)\r
105                           collect (cdr project)))\r
106              (proj (if (> (length projs) 1)\r
107                        (ido-completing-read "Apply in: " projs)\r
108                      (car projs)))\r
109              (cmd "git am --abort ; git am")\r
110              (optargs '("--signoff" "--3way" "--scissors"))\r
111              (args (read-string "Args: " nil '(optargs . 0))))\r
112         (message "Applying in '%s': '%s' (using '%s %s')"\r
113                  proj msg cmd args)\r
114         (notmuch-show-pipe-message all-open\r
115          (concat "(cd " proj " && (" cmd " " args ")" ")"))))\r
116 \r
117     (define-key notmuch-show-mode-map (kbd "C-c p a")\r
118       'praet/notmuch-patch-apply)\r
119   #+end_src\r
120 \r
121 \r
122 > d\r
123 > _______________________________________________\r
124 > notmuch mailing list\r
125 > notmuch@notmuchmail.org\r
126 > http://notmuchmail.org/mailman/listinfo/notmuch\r
127 \r
128 \r
129 Peace\r
130 \r
131 -- \r
132 Pieter\r