--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 1A71C431FC7\r
+ for <notmuch@notmuchmail.org>; Sat, 21 Jul 2012 10:37:25 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id ys1EGiQf1q9O for <notmuch@notmuchmail.org>;\r
+ Sat, 21 Jul 2012 10:37:23 -0700 (PDT)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+ [18.7.68.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id 2F8B2431FC4\r
+ for <notmuch@notmuchmail.org>; Sat, 21 Jul 2012 10:37:20 -0700 (PDT)\r
+X-AuditID: 12074422-b7f1f6d00000090b-97-500ae8ce1e6c\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id DF.D1.02315.EC8EA005; Sat, 21 Jul 2012 13:37:18 -0400 (EDT)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q6LHbHl6026352; \r
+ Sat, 21 Jul 2012 13:37:17 -0400\r
+Received: from drake.dyndns.org\r
+ (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com\r
+ [209.6.116.242]) (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q6LHbFue008017\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Sat, 21 Jul 2012 13:37:16 -0400 (EDT)\r
+Received: from amthrax by drake.dyndns.org with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1SsdcB-0001Zo-D9; Sat, 21 Jul 2012 13:37:15 -0400\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v4 5/8] emacs: Replace other search text properties with\r
+ result property\r
+Date: Sat, 21 Jul 2012 13:37:09 -0400\r
+Message-Id: <1342892232-5659-6-git-send-email-amdragon@mit.edu>\r
+X-Mailer: git-send-email 1.7.10\r
+In-Reply-To: <1342892232-5659-1-git-send-email-amdragon@mit.edu>\r
+References: <1341354059-29396-1-git-send-email-amdragon@mit.edu>\r
+ <1342892232-5659-1-git-send-email-amdragon@mit.edu>\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFjrKIsWRmVeSWpSXmKPExsUixG6nrnvuBVeAwdaHShZ79nlZrJ7LY3H9\r
+ 5kxmB2aPu6e5PHbOusvu8WzVLeYA5igum5TUnMyy1CJ9uwSujNf75zEXLJKs6F7+k7mBcbJo\r
+ FyMnh4SAicSv//PYIWwxiQv31rN1MXJxCAnsY5T4eecFI4SzgVFixekVUJlHTBK3j+9lgXDm\r
+ Mkpc7HnDBNLPJqAhsW3/ckYQW0RAWmLn3dmsIDazQJrE9/a3YHFhgQiJBc8egNWzCKhK9HZt\r
+ BbN5BewlVp3axwpxh7zE0/t9bCA2p4CDxKOzB1hAbCGBMonFHYcZJzDyL2BkWMUom5JbpZub\r
+ mJlTnJqsW5ycmJeXWqRrqpebWaKXmlK6iREcWi5KOxh/HlQ6xCjAwajEw+sxizNAiDWxrLgy\r
+ 9xCjJAeTkihv332uACG+pPyUyozE4oz4otKc1OJDjBIczEoivJtOA+V4UxIrq1KL8mFS0hws\r
+ SuK811Ju+gsJpCeWpGanphakFsFkZTg4lCR43YExJCRYlJqeWpGWmVOCkGbi4AQZzgM0XAyk\r
+ hre4IDG3ODMdIn+KUVFKnNcOJCEAksgozYPrhcX+K0ZxoFeEeb89B6riAaYNuO5XQIOZgAZL\r
+ Z4ENLklESEk1MDpMkI44unv6w7uH/A4rPvM/uEFdoPH92of2tdnsW5SiSg6tURP6XJHjNelC\r
+ w/fWJ3r6PdnrhN4UPrg4lXNakopUreF7PmNb/pUN2Ycf8007dZiPI3nh52hByRdvD0YKM3Ye\r
+ 3cQmEeMnXMwu5d6ccFwryOrj7hdHr326sfOil31suFLdWm/7fiWW4oxEQy3mouJEAPH2ws7Y AgAA\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 21 Jul 2012 17:37:25 -0000\r
+\r
+Since the result object contains everything that the other text\r
+properties recorded, we can remove the other text properties and\r
+simply look in the plist of the appropriate result object.\r
+---\r
+ emacs/notmuch.el | 24 ++++++++++--------------\r
+ 1 file changed, 10 insertions(+), 14 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index f79d004..7180b9d 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -465,16 +465,18 @@ BEG."\r
+ (let (output)\r
+ (notmuch-search-foreach-result beg end\r
+ (lambda (pos)\r
+- (push (get-text-property pos property) output)))\r
++ (push (plist-get (notmuch-search-get-result pos) property) output)))\r
+ output))\r
+ \r
+ (defun notmuch-search-find-thread-id ()\r
+ "Return the thread for the current thread"\r
+- (get-text-property (point) 'notmuch-search-thread-id))\r
++ (let ((thread (plist-get (notmuch-search-get-result) :thread)))\r
++ (when thread (concat "thread:" thread))))\r
+ \r
+ (defun notmuch-search-find-thread-id-region (beg end)\r
+ "Return a list of threads for the current region"\r
+- (notmuch-search-properties-in-region 'notmuch-search-thread-id beg end))\r
++ (mapcar (lambda (thread) (concat "thread:" thread))\r
++ (notmuch-search-properties-in-region :thread beg end)))\r
+ \r
+ (defun notmuch-search-find-thread-id-region-search (beg end)\r
+ "Return a search string for threads for the current region"\r
+@@ -482,19 +484,19 @@ BEG."\r
+ \r
+ (defun notmuch-search-find-authors ()\r
+ "Return the authors for the current thread"\r
+- (get-text-property (point) 'notmuch-search-authors))\r
++ (plist-get (notmuch-search-get-result) :authors))\r
+ \r
+ (defun notmuch-search-find-authors-region (beg end)\r
+ "Return a list of authors for the current region"\r
+- (notmuch-search-properties-in-region 'notmuch-search-authors beg end))\r
++ (notmuch-search-properties-in-region :authors beg end))\r
+ \r
+ (defun notmuch-search-find-subject ()\r
+ "Return the subject for the current thread"\r
+- (get-text-property (point) 'notmuch-search-subject))\r
++ (plist-get (notmuch-search-get-result) :subject))\r
+ \r
+ (defun notmuch-search-find-subject-region (beg end)\r
+ "Return a list of authors for the current region"\r
+- (notmuch-search-properties-in-region 'notmuch-search-subject beg end))\r
++ (notmuch-search-properties-in-region :subject beg end))\r
+ \r
+ (defun notmuch-search-show-thread ()\r
+ "Display the currently selected thread."\r
+@@ -790,13 +792,7 @@ non-authors is found, assume that all of the authors match."\r
+ (notmuch-search-insert-field (car spec) (cdr spec) result))\r
+ (insert "\n")\r
+ (notmuch-search-color-line beg (point) (plist-get result :tags))\r
+- (put-text-property beg (point) 'notmuch-search-result result)\r
+- (put-text-property beg (point) 'notmuch-search-thread-id\r
+- (concat "thread:" (plist-get result :thread)))\r
+- (put-text-property beg (point) 'notmuch-search-authors\r
+- (plist-get result :authors))\r
+- (put-text-property beg (point) 'notmuch-search-subject\r
+- (plist-get result :subject)))\r
++ (put-text-property beg (point) 'notmuch-search-result result))\r
+ (when (string= (plist-get result :thread) notmuch-search-target-thread)\r
+ (setq notmuch-search-target-thread "found")\r
+ (goto-char beg)))))\r
+-- \r
+1.7.10\r
+\r