Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 118DB431FBC for ; Fri, 4 Dec 2009 18:26:55 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JRAczRZ8ho+Z for ; Fri, 4 Dec 2009 18:26:54 -0800 (PST) Received: from pivot.cs.unb.ca (pivot.cs.unb.ca [131.202.240.57]) by olra.theworths.org (Postfix) with ESMTP id 6601C431FAE for ; Fri, 4 Dec 2009 18:26:54 -0800 (PST) Received: from fctnnbsc30w-142167182194.pppoe-dynamic.high-speed.nb.bellaliant.net ([142.167.182.194] helo=localhost) by pivot.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1NGkMH-0000bK-Tt; Fri, 04 Dec 2009 22:26:54 -0400 Received: from bremner by localhost with local (Exim 4.69) (envelope-from ) id 1NGkMC-0008FF-49; Fri, 04 Dec 2009 22:26:48 -0400 From: david@tethera.net To: notmuch@notmuchmail.org Date: Fri, 4 Dec 2009 22:26:36 -0400 Message-Id: <1259979997-31544-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1259979997-31544-1-git-send-email-david@tethera.net> References: <1259979997-31544-1-git-send-email-david@tethera.net> X-Sender-Verified: bremner@pivot.cs.unb.ca Cc: David Bremner Subject: [notmuch] [PATCH 1/2] notmuch-search-process-filter: add text properties for authors and subject to each line X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2009 02:26:55 -0000 From: David Bremner 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