Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 6e / e8b314f24e65fb5dbc145ce616d00724c176cb
1 Return-Path: <markwalters1009@gmail.com>\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 12DB3431FD0\r
6         for <notmuch@notmuchmail.org>; Sun,  1 Dec 2013 02:08:13 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id RhPoRkrR3NQE for <notmuch@notmuchmail.org>;\r
18         Sun,  1 Dec 2013 02:08:05 -0800 (PST)\r
19 Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com\r
20         [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id 509BB431FAF\r
23         for <notmuch@notmuchmail.org>; Sun,  1 Dec 2013 02:08:05 -0800 (PST)\r
24 Received: by mail-wi0-f171.google.com with SMTP id ca18so3552693wib.16\r
25         for <notmuch@notmuchmail.org>; Sun, 01 Dec 2013 02:08:04 -0800 (PST)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
28         bh=Zdf/5A4SfScuQ7KaCvHjj0o5xJXio+s4Z7Ht9mWOeNo=;\r
29         b=UpzqM84dLsBXKgehGvy9XF1jeecQ/GeFNdrRrqi+ugdMuV9QVgtR7PA/MoTOqbVZM0\r
30         cOtkxk7cXH3KMcADDjnc+wSLImu4+N/rdZ7wZdSd+DPGC8Yhujap7xjletYJ4w0olbCC\r
31         9wC4/CdHIEOLaQRIUSBwagmaaVJbtQ+ZAz38cqmZ/7+fiRJu5n4wMqcgOP9RdOfWLyBx\r
32         9+pWU3Gxk9kLDd9cHVJFAOFKNOPJiJuCTxdsHMw1sFTA+Yjyt2sIepROeYy9feSvviIz\r
33         iTjnEGqY1AdUmJosokSoxPUhf2783tN6ujwoldiNL5QwwnX3WdLjoe2e2Y+ZAUEoEsj3\r
34         Sk8A==\r
35 X-Received: by 10.180.107.193 with SMTP id he1mr13655896wib.50.1385892152410; \r
36         Sun, 01 Dec 2013 02:02:32 -0800 (PST)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id e10sm88736579wiy.7.2013.12.01.02.02.31\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Sun, 01 Dec 2013 02:02:31 -0800 (PST)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH WIP v2 1/6] emacs: show: add a function to test for unread\r
45 Date: Sun,  1 Dec 2013 10:02:22 +0000\r
46 Message-Id: <1385892147-16994-2-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1385892147-16994-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1385892147-16994-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sun, 01 Dec 2013 10:08:13 -0000\r
63 \r
64 This adds a function which tests for unread. A message is deemed\r
65 unread if applying `notmuch-show-mark-read-tags' would change the\r
66 message's tags.\r
67 ---\r
68  emacs/notmuch-show.el |   11 +++++++++++\r
69  1 files changed, 11 insertions(+), 0 deletions(-)\r
70 \r
71 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
72 index 784644c..a135e79 100644\r
73 --- a/emacs/notmuch-show.el\r
74 +++ b/emacs/notmuch-show.el\r
75 @@ -1510,6 +1510,17 @@ current thread."\r
76    "Are the headers of the current message visible?"\r
77    (notmuch-show-get-prop :headers-visible))\r
78  \r
79 +(defun notmuch-show-unread-p ()\r
80 +  "Return t if current message is unread.\r
81 +\r
82 +Returns t unless applying `notmuch-show-mark-read-tags' would be\r
83 +a no-op"\r
84 +  (when notmuch-show-mark-read-tags\r
85 +    (let* ((current-tags (notmuch-show-get-tags))\r
86 +          (tag-changes (notmuch-tag-change-list notmuch-show-mark-read-tags))\r
87 +          (new-tags (notmuch-update-tags current-tags tag-changes)))\r
88 +      (not (equal current-tags new-tags)))))\r
89 +\r
90  (put 'notmuch-show-mark-read 'notmuch-prefix-doc\r
91       "Mark the current message as unread.")\r
92  (defun notmuch-show-mark-read (&optional unread)\r
93 -- \r
94 1.7.9.1\r
95 \r