Re: [PATCH] doc: Allow rst2man.py as an alternative to rst2man
[notmuch-archives.git] / c7 / fd253325db048d14a6451630b746e3386aec42
1 Return-Path: <markwalters1009@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 B3941429E42\r
6         for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:20 -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.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 0MwLyXS1WKGe for <notmuch@notmuchmail.org>;\r
18         Thu, 13 Jun 2013 16:37:13 -0700 (PDT)\r
19 Received: from mail-ee0-f44.google.com (mail-ee0-f44.google.com\r
20  [74.125.83.44])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  F2F84431E62    for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:12 -0700\r
23  (PDT)\r
24 Received: by mail-ee0-f44.google.com with SMTP id c13so5485298eek.3\r
25         for <notmuch@notmuchmail.org>; Thu, 13 Jun 2013 16:37:11 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :mime-version:content-type:content-transfer-encoding;\r
29         bh=HbG7QsR8M+EuFbvv621BfikqtDHpk2uDmulxUiZR8E0=;\r
30         b=tnxWTj8ImPdRURnE9CPZstkTZwGOv3bbgSSnDSFg1g7siic+9E20gEYe4NHuKNwTfK\r
31         bhbn38nRQ4elwsXUlu4BctsygwZKyfWlzXH+Nwzh+PKKrMD7+P9uYGAOoggjXo+fmez5\r
32         zURRj+WnHa2FfVNwfsLNH4EFKw/62ozGRdUaBMV01Wsjdq8+A0/5u2pmtvZYM0hq3Sz4\r
33         k+63SWdrsrKlmd+pjN8pO2HE1q9WNqucJUaj89mHgRt6e2zUBaJ+47RimzKxzurx0uxY\r
34         R7wM/lolMRmC8BtbT03aFGCARrekfDHbnnIly60bnp0JEu3f99uyxA8kesKCmTz+aIZi\r
35         EJqA==\r
36 X-Received: by 10.14.115.9 with SMTP id d9mr3679053eeh.87.1371166631917;\r
37         Thu, 13 Jun 2013 16:37:11 -0700 (PDT)\r
38 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
39         by mx.google.com with ESMTPSA id x4sm13494278eej.9.2013.06.13.16.37.10\r
40         for <multiple recipients>\r
41         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
42         Thu, 13 Jun 2013 16:37:11 -0700 (PDT)\r
43 From: Mark Walters <markwalters1009@gmail.com>\r
44 To: notmuch@notmuchmail.org\r
45 Subject: [PATCH v2 1/2] contrib: pick: add thread based utility functions\r
46 Date: Fri, 14 Jun 2013 00:36:57 +0100\r
47 Message-Id: <1371166618-27196-2-git-send-email-markwalters1009@gmail.com>\r
48 X-Mailer: git-send-email 1.7.9.1\r
49 In-Reply-To: <1371166618-27196-1-git-send-email-markwalters1009@gmail.com>\r
50 References: <1371166618-27196-1-git-send-email-markwalters1009@gmail.com>\r
51 MIME-Version: 1.0\r
52 Content-Type: text/plain; charset=UTF-8\r
53 Content-Transfer-Encoding: 8bit\r
54 X-BeenThere: notmuch@notmuchmail.org\r
55 X-Mailman-Version: 2.1.13\r
56 Precedence: list\r
57 List-Id: "Use and development of the notmuch mail system."\r
58         <notmuch.notmuchmail.org>\r
59 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
61 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
62 List-Post: <mailto:notmuch@notmuchmail.org>\r
63 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
64 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
65         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
66 X-List-Received-Date: Thu, 13 Jun 2013 23:37:21 -0000\r
67 \r
68 Previously notmuch-pick had no thread based functionality. This adds a\r
69 macro to iterate through all messages in a thread. To simplify this it\r
70 adds a text-property marker to the first message of each thread.\r
71 ---\r
72  contrib/notmuch-pick/notmuch-pick.el |   24 ++++++++++++++++++++++++\r
73  1 files changed, 24 insertions(+), 0 deletions(-)\r
74 \r
75 diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
76 index 10a2bf7..8030842 100644\r
77 --- a/contrib/notmuch-pick/notmuch-pick.el\r
78 +++ b/contrib/notmuch-pick/notmuch-pick.el\r
79 @@ -583,6 +583,29 @@ than only the current message."\r
80           (message (format "Command '%s' exited abnormally with code %d"\r
81                            shell-command exit-code)))))))\r
82  \r
83 +(defun notmuch-pick-thread-top ()\r
84 +  (interactive)\r
85 +  (while (not (notmuch-pick-get-prop :first))\r
86 +    (forward-line -1)))\r
87 +\r
88 +(defun notmuch-pick-thread-mapcar (function)\r
89 +  "Iterate through all messages in the current thread\r
90 + and call FUNCTION for side effects."\r
91 +  (save-excursion\r
92 +    (notmuch-pick-thread-top)\r
93 +    (loop collect (funcall function)\r
94 +         do (forward-line)\r
95 +         while (and (notmuch-pick-get-message-properties)\r
96 +                    (not (notmuch-pick-get-prop :first))))))\r
97 +\r
98 +(defun notmuch-pick-get-messages-ids-thread-search ()\r
99 +  "Return a search string for all message ids of messages in the current thread."\r
100 +  (mapconcat 'identity\r
101 +            (notmuch-pick-thread-mapcar 'notmuch-pick-get-message-id)\r
102 +            " or "))\r
103 +\r
104 +;; Functions below here display the pick buffer itself.\r
105 +\r
106  (defun notmuch-pick-clean-address (address)\r
107    "Try to clean a single email ADDRESS for display. Return\r
108  AUTHOR_NAME if present, otherwise return AUTHOR_EMAIL. Return\r
109 @@ -680,6 +703,7 @@ unchanged ADDRESS if parsing fails."\r
110         (push "├" tree-status)))\r
111  \r
112        (push (concat (if replies "┬" "─") "►") tree-status)\r
113 +      (plist-put msg :first (and first (eq 0 depth)))\r
114        (notmuch-pick-goto-and-insert-msg (plist-put msg :tree-status tree-status))\r
115        (pop tree-status)\r
116        (pop tree-status)\r
117 -- \r
118 1.7.9.1\r
119 \r