[PATCH 06/10] cli: Introduce "notmuch address" command
[notmuch-archives.git] / 3e / a3d596311cc1bc78f5fc2687a1f9abafc0f16a
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 92220431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 24 Apr 2012 16:16:51 -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: 2.7\r
10 X-Spam-Level: **\r
11 X-Spam-Status: No, score=2.7 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         FREEMAIL_REPLY=2.499, 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 BiqpRm+Bg+Wo for <notmuch@notmuchmail.org>;\r
18         Tue, 24 Apr 2012 16:16:51 -0700 (PDT)\r
19 Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com\r
20  [74.125.82.41])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  E89DC431FAE    for <notmuch@notmuchmail.org>; Tue, 24 Apr 2012 16:16:50 -0700\r
23  (PDT)\r
24 Received: by wgbds1 with SMTP id ds1so4445369wgb.2\r
25         for <notmuch@notmuchmail.org>; Tue, 24 Apr 2012 16:16:48 -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=Augww/GqItfyElilXAbAqyeCsMsUBtKj38ke0K3+RkE=;\r
29         b=WhLPUXc2g856unzjF1Y3uxpY3KyIttghrAfqsvOEFsXTGajf4oOu8Ko6rqQyhKBTfi\r
30         ZkIIFFtASb7mh0iP/GfaXv8PPmELIFi0HHHNvBRkjy2lPpgNCdiX/82tT4k4cp+u9QKU\r
31         6XBVtlm6euBtH6qmiaVnNjLGM259Ik3PIkGQ0TC97+KUActnnphwWauDr9kvN4oNwX+Z\r
32         XcwfAhqyx/+sXRtvV6J7BFODSk5fMxyXXZ2P+k2CwofnQj8jILljMq++fCXFs5/kKt/4\r
33         CIb4WoIkz53yQFLTOOYYnL6LNwGA+7fIBe4i8y2/0OvfB5vKp37ytbzr6jm29Vqo6Gv4\r
34         EkEQ==\r
35 Received: by 10.180.77.4 with SMTP id o4mr931533wiw.17.1335309408298;\r
36         Tue, 24 Apr 2012 16:16:48 -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  u9sm33087681wix.0.2012.04.24.16.16.45  (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Tue, 24 Apr 2012 16:16:47 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH] emacs: add a filter option to show\r
44 Date: Wed, 25 Apr 2012 00:17:01 +0100\r
45 Message-Id: <1335309421-18893-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: Tue, 24 Apr 2012 23:16:51 -0000\r
60 \r
61 Show the current thread with a different filter (i.e., open messages\r
62 in the thread matching the new query).\r
63 \r
64 Currently bound to 'F'.\r
65 \r
66 Note that it is not the same as filter in search as it replaces the\r
67 existing query rather than ANDing with it (but it does keep the\r
68 threadid part of the query).\r
69 ---\r
70 \r
71 I think filtering (i.e. refining current query) is not ideal as one\r
72 might want to remove some aspects of the query. Hence this patch\r
73 replaces the query-context. \r
74 \r
75 Note does not fully work with excludes pending\r
76 id:"1331836090-30560-1-git-send-email-markwalters1009@gmail.com"\r
77 \r
78 Best wishes\r
79 \r
80 Mark\r
81 \r
82  emacs/notmuch-show.el |    8 ++++++++\r
83  1 files changed, 8 insertions(+), 0 deletions(-)\r
84 \r
85 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
86 index 30b26d1..4a5b8b1 100644\r
87 --- a/emacs/notmuch-show.el\r
88 +++ b/emacs/notmuch-show.el\r
89 @@ -42,6 +42,7 @@\r
90  (declare-function notmuch-search-next-thread "notmuch" nil)\r
91  (declare-function notmuch-search-show-thread "notmuch" nil)\r
92  (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))\r
93 +(declare-function notmuch-read-query "notmuch" (prompt))\r
94  \r
95  (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
96    "Headers that should be shown in a message, in this order.\r
97 @@ -1157,6 +1158,7 @@ reset based on the original query."\r
98         (define-key map "s" 'notmuch-search)\r
99         (define-key map "m" 'notmuch-mua-new-mail)\r
100         (define-key map "f" 'notmuch-show-forward-message)\r
101 +       (define-key map "F" 'notmuch-show-filter-thread)\r
102         (define-key map "r" 'notmuch-show-reply-sender)\r
103         (define-key map "R" 'notmuch-show-reply)\r
104         (define-key map "|" 'notmuch-show-pipe-message)\r
105 @@ -1399,6 +1401,12 @@ current thread."\r
106    "Mark the current message as read."\r
107    (notmuch-show-tag-message "-unread"))\r
108  \r
109 +(defun notmuch-show-filter-thread ()\r
110 +  "Show the current thread with a different filter"\r
111 +  (interactive)\r
112 +  (setq notmuch-show-query-context (notmuch-read-query "Filter thread: "))\r
113 +  (notmuch-show-refresh-view t))\r
114 +\r
115  ;; Functions for getting attributes of several messages in the current\r
116  ;; thread.\r
117  \r
118 -- \r
119 1.7.9.1\r
120 \r