Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 53 / eeae04ae6a6804fe3de798682c5c0ec9fd0606
1 Return-Path: <bremner@pivot.cs.unb.ca>\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 118DB431FBC\r
6         for <notmuch@notmuchmail.org>; Fri,  4 Dec 2009 18:26:55 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id JRAczRZ8ho+Z for <notmuch@notmuchmail.org>;\r
11         Fri,  4 Dec 2009 18:26:54 -0800 (PST)\r
12 Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57])\r
13         by olra.theworths.org (Postfix) with ESMTP id 6601C431FAE\r
14         for <notmuch@notmuchmail.org>; Fri,  4 Dec 2009 18:26:54 -0800 (PST)\r
15 Received: from\r
16         fctnnbsc30w-142167182194.pppoe-dynamic.high-speed.nb.bellaliant.net\r
17         ([142.167.182.194] helo=localhost)\r
18         by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)\r
19         (Exim 4.69) (envelope-from <bremner@pivot.cs.unb.ca>)\r
20         id 1NGkMH-0000bK-Tt; Fri, 04 Dec 2009 22:26:54 -0400\r
21 Received: from bremner by localhost with local (Exim 4.69)\r
22         (envelope-from <bremner@pivot.cs.unb.ca>)\r
23         id 1NGkMC-0008FF-49; Fri, 04 Dec 2009 22:26:48 -0400\r
24 From: david@tethera.net\r
25 To: notmuch@notmuchmail.org\r
26 Date: Fri,  4 Dec 2009 22:26:36 -0400\r
27 Message-Id: <1259979997-31544-2-git-send-email-david@tethera.net>\r
28 X-Mailer: git-send-email 1.6.5.3\r
29 In-Reply-To: <1259979997-31544-1-git-send-email-david@tethera.net>\r
30 References: <1259979997-31544-1-git-send-email-david@tethera.net>\r
31 X-Sender-Verified: bremner@pivot.cs.unb.ca\r
32 Cc: David Bremner <bremner@unb.ca>\r
33 Subject: [notmuch] [PATCH 1/2] notmuch-search-process-filter: add text\r
34         properties for authors and subject to each line\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.12\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Sat, 05 Dec 2009 02:26:55 -0000\r
48 \r
49 From: David Bremner <bremner@unb.ca>\r
50 \r
51 Add functions notmuch-search-find-authors and notmuch-find-subject to\r
52 match notmuch-find-thread-id.  These functions are just a wrapper\r
53 around get-text-property, but in principle that could change.\r
54 ---\r
55  notmuch.el |   12 +++++++++++-\r
56  1 files changed, 11 insertions(+), 1 deletions(-)\r
57 \r
58 diff --git a/notmuch.el b/notmuch.el\r
59 index c504f46..5925907 100644\r
60 --- a/notmuch.el\r
61 +++ b/notmuch.el\r
62 @@ -1133,6 +1133,14 @@ Complete list of currently available key bindings:\r
63    "Return the thread for the current thread"\r
64    (get-text-property (point) 'notmuch-search-thread-id))\r
65  \r
66 +(defun notmuch-search-find-authors ()\r
67 +  "Return the authors for the current thread"\r
68 +  (get-text-property (point) 'notmuch-search-authors))\r
69 +\r
70 +(defun notmuch-search-find-subject ()\r
71 +  "Return the subject for the current thread"\r
72 +  (get-text-property (point) 'notmuch-search-subject))\r
73 +\r
74  (defun notmuch-search-show-thread ()\r
75    "Display the currently selected thread."\r
76    (interactive)\r
77 @@ -1257,7 +1265,9 @@ This function advances the next thread when finished."\r
78                       (goto-char (point-max))\r
79                       (let ((beg (point-marker)))\r
80                         (insert (format "%s %-7s %-40s %s (%s)\n" date count authors subject tags))\r
81 -                       (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id))\r
82 +                       (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id)\r
83 +                       (put-text-property beg (point-marker) 'notmuch-search-authors authors)\r
84 +                       (put-text-property beg (point-marker) 'notmuch-search-subject subject))\r
85                       (set 'line (match-end 0)))\r
86                   (set 'more nil))))))\r
87        (delete-process proc))))\r
88 -- \r
89 1.6.5.3\r
90 \r