[notmuch] [PATCH 1/2] notmuch-search-process-filter: add text properties for authors and subject to each line

david at tethera.net david at tethera.net
Fri Dec 4 18:26:36 PST 2009


From: David Bremner <bremner at unb.ca>

Add functions notmuch-search-find-authors and notmuch-find-subject to
match notmuch-find-thread-id.  These functions are just a wrapper
around get-text-property, but in principle that could change.
---
 notmuch.el |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/notmuch.el b/notmuch.el
index c504f46..5925907 100644
--- a/notmuch.el
+++ b/notmuch.el
@@ -1133,6 +1133,14 @@ Complete list of currently available key bindings:
   "Return the thread for the current thread"
   (get-text-property (point) 'notmuch-search-thread-id))
 
+(defun notmuch-search-find-authors ()
+  "Return the authors for the current thread"
+  (get-text-property (point) 'notmuch-search-authors))
+
+(defun notmuch-search-find-subject ()
+  "Return the subject for the current thread"
+  (get-text-property (point) 'notmuch-search-subject))
+
 (defun notmuch-search-show-thread ()
   "Display the currently selected thread."
   (interactive)
@@ -1257,7 +1265,9 @@ This function advances the next thread when finished."
 		      (goto-char (point-max))
 		      (let ((beg (point-marker)))
 			(insert (format "%s %-7s %-40s %s (%s)\n" date count authors subject tags))
-			(put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id))
+			(put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id)
+			(put-text-property beg (point-marker) 'notmuch-search-authors authors)
+			(put-text-property beg (point-marker) 'notmuch-search-subject subject))
 		      (set 'line (match-end 0)))
 		  (set 'more nil))))))
       (delete-process proc))))
-- 
1.6.5.3



More information about the notmuch mailing list