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 A7DC5429E29 for ; Sun, 3 Jul 2011 23:52:37 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 tXjV-STdy9VJ for ; Sun, 3 Jul 2011 23:52:37 -0700 (PDT) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 02D81429E27 for ; Sun, 3 Jul 2011 23:52:36 -0700 (PDT) Received: by wwj40 with SMTP id 40so3858165wwj.2 for ; Sun, 03 Jul 2011 23:52:35 -0700 (PDT) Received: by 10.227.154.6 with SMTP id m6mr5034155wbw.73.1309762355792; Sun, 03 Jul 2011 23:52:35 -0700 (PDT) Received: from localhost ([109.131.160.67]) by mx.google.com with ESMTPS id fu18sm4222090wbb.61.2011.07.03.23.52.34 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 23:52:35 -0700 (PDT) From: Pieter Praet To: Austin Clements Subject: [PATCH 1/5] emacs: add property "matched-msgids" to each search result Date: Mon, 4 Jul 2011 08:51:54 +0200 Message-Id: <1309762318-4530-2-git-send-email-pieter@praet.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309762318-4530-1-git-send-email-pieter@praet.org> References: <20110703171743.GL15901@mit.edu> <1309762318-4530-1-git-send-email-pieter@praet.org> Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Mon, 04 Jul 2011 06:52:37 -0000 Signed-off-by: Pieter Praet --- emacs/notmuch.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index f11ec24..674deb7 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -801,13 +801,14 @@ non-authors is found, assume that all of the authors match." (while more (while (and (< line (length string)) (= (elt string line) ?\n)) (setq line (1+ line))) - (if (string-match "^\\(thread:[0-9A-Fa-f]*\\) \\([^][]*\\) \\(\\[[0-9/]*\\]\\) \\([^;]*\\); \\(.*\\) (\\([^()]*\\))$" string line) + (if (string-match "^\\(thread:[0-9A-Fa-f]*\\) \\([^][]*\\) \\(\\[[0-9/]*\\]\\) \\([^;]*\\); \\(.*\\) (\\([^()]*\\)) \\(.*\\)$" string line) (let* ((thread-id (match-string 1 string)) (date (match-string 2 string)) (count (match-string 3 string)) (authors (match-string 4 string)) (subject (match-string 5 string)) (tags (match-string 6 string)) + (matched-msgids (match-string 7 string)) (tag-list (if tags (save-match-data (split-string tags))))) (goto-char (point-max)) (if (/= (match-beginning 1) line) @@ -816,6 +817,7 @@ non-authors is found, assume that all of the authors match." (notmuch-search-show-result date count authors subject tags) (notmuch-search-color-line beg (point-marker) tag-list) (put-text-property beg (point-marker) 'notmuch-search-thread-id thread-id) + (put-text-property beg (point-marker) 'notmuch-search-matched-msgids matched-msgids) (put-text-property beg (point-marker) 'notmuch-search-authors authors) (put-text-property beg (point-marker) 'notmuch-search-subject subject) (if (string= thread-id notmuch-search-target-thread) -- 1.7.5.4