[PATCH 4/4] Update NEWS for user.other_name
[notmuch-archives.git] / 3f / 35600c4d8f743f3e8c959e908078787161061a
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 DC872431FAE\r
6         for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:28:19 -0700 (PDT)\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 LR3fzRkPyQSg for <notmuch@notmuchmail.org>;\r
18         Thu, 15 Mar 2012 11:28:19 -0700 (PDT)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.181]) (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 14EFF431FAF\r
23         for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:28:18 -0700 (PDT)\r
24 Received: by werm13 with SMTP id m13so3512908wer.26\r
25         for <notmuch@notmuchmail.org>; Thu, 15 Mar 2012 11:28:16 -0700 (PDT)\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:x-mailer;\r
28         bh=ZEPP1+niIQ4CJ44ok4YueUD5ZDfMP4iyucZnDm7AhDU=;\r
29         b=AHBnfzTIH89Nkxinx5pzg/NhTXLvirY2FEPOVculQvS0LqIN36msUBx8Hod7YQKVx5\r
30         xrX/Hh5lJNdC+TPDt8BL/BCis0t1qYirGpgP585fvPruz+EB0Mi+Ti+QCK1xCKLiyWwx\r
31         MFqLW2Bjv/8RvMAKKChqbMSQNyVIP8lPlLg2Gd0G6Yh5LdQu48BhjveMosmCIYpjE8zU\r
32         ZZfYYwzw5pbaeGHNb6e2fRpnu4IfGMWZJktoX4FzlPhOLPFJFmCpmtvTjx4uh4EV8+ix\r
33         ri21n2w97LMHGwoylTLuvMWA2pZHBlK0EOzQkTic44Zmim8xORyioiGGE+SruzU1kdtT\r
34         nWZw==\r
35 Received: by 10.180.8.164 with SMTP id s4mr18094797wia.6.1331836096383;\r
36         Thu, 15 Mar 2012 11:28:16 -0700 (PDT)\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
38  [94.192.233.223])      by mx.google.com with ESMTPS id\r
39  gg2sm11262494wib.7.2012.03.15.11.28.14 (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Thu, 15 Mar 2012 11:28:15 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs-show: open excluded matches if no other matches\r
44 Date: Thu, 15 Mar 2012 18:28:10 +0000\r
45 Message-Id: <1331836090-30560-1-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 X-BeenThere: notmuch@notmuchmail.org\r
48 X-Mailman-Version: 2.1.13\r
49 Precedence: list\r
50 List-Id: "Use and development of the notmuch mail system."\r
51         <notmuch.notmuchmail.org>\r
52 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
54 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
55 List-Post: <mailto:notmuch@notmuchmail.org>\r
56 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
57 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
59 X-List-Received-Date: Thu, 15 Mar 2012 18:28:20 -0000\r
60 \r
61 Currently emacs show does not open matching but excluded\r
62 messages. This is normally the desired behaviour but is probably not\r
63 ideal if only excluded messages match. This patch opens all the\r
64 matching (necessarily excluded) messages in this case and goes to the\r
65 first one.\r
66 ---\r
67  emacs/notmuch-show.el |   14 ++++++++++++--\r
68  1 files changed, 12 insertions(+), 2 deletions(-)\r
69 \r
70 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
71 index 4a60631..bd4ba0f 100644\r
72 --- a/emacs/notmuch-show.el\r
73 +++ b/emacs/notmuch-show.el\r
74 @@ -1608,6 +1608,11 @@ to show, nil otherwise."\r
75           (notmuch-show-message-adjust))\r
76        (goto-char (point-max)))))\r
77  \r
78 +(defun notmuch-show-open-if-matched ()\r
79 +  "Open a message if it is matched (whether or not excluded)."\r
80 +  (let ((props (notmuch-show-get-message-properties)))\r
81 +    (notmuch-show-message-visible props (plist-get props :match))))\r
82 +\r
83  (defun notmuch-show-goto-first-wanted-message ()\r
84    "Move to the first open message and mark it read"\r
85    (goto-char (point-min))\r
86 @@ -1615,9 +1620,14 @@ to show, nil otherwise."\r
87        (notmuch-show-mark-read)\r
88      (notmuch-show-next-open-message))\r
89    (when (eobp)\r
90 +    ;; There are no matched non-excluded messages so open all matched\r
91 +    ;; (necessarily excluded) messages and go to the first.\r
92 +    (notmuch-show-mapc 'notmuch-show-open-if-matched)\r
93 +    (force-window-update)\r
94      (goto-char (point-min))\r
95 -    (unless (notmuch-show-get-prop :match)\r
96 -      (notmuch-show-next-matching-message))))\r
97 +    (if (notmuch-show-message-visible-p)\r
98 +       (notmuch-show-mark-read)\r
99 +      (notmuch-show-next-open-message))))\r
100  \r
101  (defun notmuch-show-previous-open-message ()\r
102    "Show the previous open message."\r
103 -- \r
104 1.7.9.1\r
105 \r