Re: Linking a privately built -lxapian
[notmuch-archives.git] / 26 / 05ba0c30ca06fc1d56590d54f7618ced287fd7
1 Return-Path: <dmitry.kurochkin@gmail.com>\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 463C1431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 22:00:18 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id PlDK9Cdm2WKO for <notmuch@notmuchmail.org>;\r
17         Fri, 27 Jan 2012 22:00:17 -0800 (PST)\r
18 Received: from mail-bk0-f53.google.com (mail-bk0-f53.google.com\r
19         [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 951F4431FAE\r
22         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 22:00:17 -0800 (PST)\r
23 Received: by bkbzt19 with SMTP id zt19so2289195bkb.26\r
24         for <notmuch@notmuchmail.org>; Fri, 27 Jan 2012 22:00:16 -0800 (PST)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=from:to:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=Xd7jtBqqqLhCHd8k0SN51BQ/VYr8IoXHNAu6YVKxuQw=;\r
28         b=tR8vVR5GKHbOlrUQ83JzRD7PSgdASn4tqwgkNpxS5pfjVPLv7DHmU5Gja2M2UXWIGz\r
29         RxKUBXHyi0ViDokKN6HgMT7QDZ9EuEOzD0XEtYctmW4nX7eqGdyxYkcVrTPTtB/JIvge\r
30         PZ3Siju56aJnQy9DN37atSZ17atu3RRomMDF4=\r
31 Received: by 10.205.137.4 with SMTP id im4mr4612109bkc.136.1327730416251;\r
32         Fri, 27 Jan 2012 22:00:16 -0800 (PST)\r
33 Received: from localhost ([91.144.186.21])\r
34         by mx.google.com with ESMTPS id x20sm5831668bka.9.2012.01.27.22.00.15\r
35         (version=TLSv1/SSLv3 cipher=OTHER);\r
36         Fri, 27 Jan 2012 22:00:15 -0800 (PST)\r
37 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH 8/6] emacs: use message ids instead of thread id in\r
40         `notmuch-show-operate-all'\r
41 Date: Sat, 28 Jan 2012 09:59:07 +0400\r
42 Message-Id: <1327730348-6466-1-git-send-email-dmitry.kurochkin@gmail.com>\r
43 X-Mailer: git-send-email 1.7.8.3\r
44 In-Reply-To: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
45 References: <1327725684-5887-1-git-send-email-dmitry.kurochkin@gmail.com>\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sat, 28 Jan 2012 06:00:18 -0000\r
59 \r
60 Before the change, `notmuch-show-operate-all' used thread id for\r
61 "notmuch tag" search.  This could result in tagging unexpected\r
62 messages that were added to the thread after the notmuch-show buffer\r
63 was created.  The patch changes `notmuch-show-operate-all' to use ids\r
64 of shown messages to fix this.\r
65 ---\r
66  emacs/notmuch-show.el |   23 ++++++++++++++++++++++-\r
67  1 files changed, 22 insertions(+), 1 deletions(-)\r
68 \r
69 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
70 index 2ca4d92..e606224 100644\r
71 --- a/emacs/notmuch-show.el\r
72 +++ b/emacs/notmuch-show.el\r
73 @@ -1170,6 +1170,15 @@ All currently available key bindings:\r
74      (notmuch-show-move-to-message-top)\r
75      t))\r
76  \r
77 +(defun notmuch-show-mapc (function)\r
78 +  "Iterate through all messages with\r
79 +`notmuch-show-goto-message-next' and call `function' for side\r
80 +effects."\r
81 +  (save-excursion\r
82 +    (goto-char (point-min))\r
83 +    (loop do (funcall function)\r
84 +         while (notmuch-show-goto-message-next))))\r
85 +\r
86  ;; Functions relating to the visibility of messages and their\r
87  ;; components.\r
88  \r
89 @@ -1222,6 +1231,18 @@ Some useful entries are:\r
90    "Return the message id of the current message."\r
91    (concat "id:\"" (notmuch-show-get-prop :id) "\""))\r
92  \r
93 +(defun notmuch-show-get-messages-ids ()\r
94 +  "Return all message ids of currently shown messages."\r
95 +  (let ((message-ids))\r
96 +    (notmuch-show-mapc\r
97 +     (lambda () (push (notmuch-show-get-message-id) message-ids)))\r
98 +    message-ids))\r
99 +\r
100 +(defun notmuch-show-get-messages-ids-search ()\r
101 +  "Return a search string for all message ids of currently shown\r
102 +messages."\r
103 +  (mapconcat 'identity (notmuch-show-get-messages-ids) " or "))\r
104 +\r
105  ;; dme: Would it make sense to use a macro for many of these?\r
106  \r
107  (defun notmuch-show-get-filename ()\r
108 @@ -1496,7 +1517,7 @@ i.e. a list of tags to change with '+' and '-' prefixes."\r
109  `Changed-tags' is a list of tag operations for \"notmuch tag\",\r
110  i.e. a list of tags to change with '+' and '-' prefixes."\r
111    (interactive (notmuch-select-tags-with-completion nil notmuch-show-thread-id))\r
112 -  (apply 'notmuch-tag notmuch-show-thread-id changed-tags)\r
113 +  (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) changed-tags)\r
114    (save-excursion\r
115      (goto-char (point-min))\r
116      (loop do (let* ((current-tags (notmuch-show-get-tags))\r
117 -- \r
118 1.7.8.3\r
119 \r