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 AA67C431FC3
\r
6 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 15:11:47 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 rMUCIBvov826 for <notmuch@notmuchmail.org>;
\r
16 Thu, 23 Feb 2012 15:11:46 -0800 (PST)
\r
17 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
18 [74.125.82.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 06400431FCB
\r
21 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 15:11:40 -0800 (PST)
\r
22 Received: by mail-we0-f181.google.com with SMTP id p13so1249384wer.26
\r
23 for <notmuch@notmuchmail.org>; Thu, 23 Feb 2012 15:11:40 -0800 (PST)
\r
24 Received-SPF: pass (google.com: domain of pieter@praet.org designates
\r
25 10.180.106.67 as permitted sender) client-ip=10.180.106.67;
\r
26 Authentication-Results: mr.google.com;
\r
27 spf=pass (google.com: domain of pieter@praet.org
\r
28 designates 10.180.106.67 as permitted sender)
\r
29 smtp.mail=pieter@praet.org
\r
30 Received: from mr.google.com ([10.180.106.67])
\r
31 by 10.180.106.67 with SMTP id gs3mr809222wib.7.1330038700727 (num_hops
\r
32 = 1); Thu, 23 Feb 2012 15:11:40 -0800 (PST)
\r
34 Received: by 10.180.106.67 with SMTP id gs3mr650758wib.7.1330038700667;
\r
35 Thu, 23 Feb 2012 15:11:40 -0800 (PST)
\r
36 Received: from localhost ([109.131.181.26])
\r
37 by mx.google.com with ESMTPS id fw5sm7421493wib.0.2012.02.23.15.11.39
\r
38 (version=TLSv1/SSLv3 cipher=OTHER);
\r
39 Thu, 23 Feb 2012 15:11:40 -0800 (PST)
\r
40 From: Pieter Praet <pieter@praet.org>
\r
41 To: David Bremner <david@tethera.net>,
\r
42 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
43 Subject: [PATCH 5/6] emacs: simplify `notmuch-show-get-messages-ids{,
\r
45 Date: Fri, 24 Feb 2012 00:09:13 +0100
\r
46 Message-Id: <1330038554-10347-5-git-send-email-pieter@praet.org>
\r
47 X-Mailer: git-send-email 1.7.8.1
\r
48 In-Reply-To: <878vjtqhcg.fsf@praet.org>
\r
49 References: <878vjtqhcg.fsf@praet.org>
\r
51 ALoCoQlK1I/msSO+rKBg3S63pxV88eRxeaJ6AF9MWIeW2cM9NVxlnbRWFalfn5YRbNkHvBQmkNDj
\r
52 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Thu, 23 Feb 2012 23:11:48 -0000
\r
67 * emacs/notmuch-show.el
\r
69 (notmuch-show-get-messages-ids):
\r
70 If provided with optional arg SEPARATOR, return a string consisting
\r
71 of all Message-Id's, separated by SEPARATOR. Also improve original
\r
72 docstring wrt default return value.
\r
74 (notmuch-show-get-messages-ids-search):
\r
75 Removed, as its functionality is now in `notmuch-show-get-messages-ids'.
\r
77 (notmuch-show-tag-all):
\r
78 Call `notmuch-show-get-messages-ids' with SEPARATOR arg instead of
\r
79 `notmuch-show-get-messages-ids-search'.
\r
81 emacs/notmuch-show.el | 18 +++++++++---------
\r
82 1 files changed, 9 insertions(+), 9 deletions(-)
\r
84 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
\r
85 index 5fc0e43..4b37c77 100644
\r
86 --- a/emacs/notmuch-show.el
\r
87 +++ b/emacs/notmuch-show.el
\r
88 @@ -1334,17 +1334,17 @@ (defun notmuch-show-get-message-id ()
\r
89 "Return the message id of the current message."
\r
90 (concat "id:\"" (notmuch-show-get-prop :id) "\""))
\r
92 -(defun notmuch-show-get-messages-ids ()
\r
93 - "Return all message ids of messages in the current thread."
\r
94 +(defun notmuch-show-get-messages-ids (&optional separator)
\r
95 + "Return a list of Message-Id's of all messages in the current buffer.
\r
97 +If provided with optional argument SEPARATOR, return a string
\r
98 +instead, consisting of all Message-Id's separated by SEPARATOR."
\r
99 (let ((message-ids))
\r
100 (notmuch-show-mapc t
\r
101 (lambda () (push (notmuch-show-get-message-id) message-ids)))
\r
104 -(defun notmuch-show-get-messages-ids-search ()
\r
105 - "Return a search string for all message ids of messages in the
\r
107 - (mapconcat 'identity (notmuch-show-get-messages-ids) " or "))
\r
109 + (mapconcat 'identity message-ids separator)
\r
112 ;; dme: Would it make sense to use a macro for many of these?
\r
114 @@ -1633,7 +1633,7 @@ (defun notmuch-show-tag-all (&rest tag-changes)
\r
116 TAG-CHANGES is a list of tag operations for `notmuch-tag'."
\r
117 (interactive (notmuch-read-tag-changes nil notmuch-show-thread-id))
\r
118 - (apply 'notmuch-tag (notmuch-show-get-messages-ids-search) tag-changes)
\r
119 + (apply 'notmuch-tag (notmuch-show-get-messages-ids " or ") tag-changes)
\r
120 (notmuch-show-mapc t
\r
122 (let* ((current-tags (notmuch-show-get-tags))
\r