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 2325B421174
\r
6 for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:24 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 fZCi81zetwJ1 for <notmuch@notmuchmail.org>;
\r
18 Sun, 12 Feb 2012 17:19:22 -0800 (PST)
\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
20 [74.125.82.45]) (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 E88D7421193 for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:19 -0800
\r
24 Received: by mail-ww0-f45.google.com with SMTP id dt12so3923384wgb.2
\r
25 for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:19 -0800 (PST)
\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
27 h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;
\r
28 bh=wyQH5qIrPO4XEuMD9aVM3se/EErzfcadjRwkDNsdkXQ=;
\r
29 b=UOhjkQKzwwR5SJ2i6oVlxm+YZBTQzGUY9VzSLfTbYpsszM1youuDDdl7PE3URz6Z35
\r
30 isMSmA6aMEq5NfgVaKEBltEfGSaUQt3RsuAzG7m6UT8+UPUCFvnHveGj27dvQ5VAGHFL
\r
31 Oc0oDQzhIzCD9tbKN/Wprw2Zwxl7hRbVfK+8Q=
\r
32 Received: by 10.180.78.233 with SMTP id e9mr15283162wix.0.1329095959673;
\r
33 Sun, 12 Feb 2012 17:19:19 -0800 (PST)
\r
34 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.
\r
35 [94.192.233.223]) by mx.google.com with ESMTPS id
\r
36 da8sm18415905wib.6.2012.02.12.17.19.18 (version=TLSv1/SSLv3 cipher=OTHER);
\r
37 Sun, 12 Feb 2012 17:19:19 -0800 (PST)
\r
38 From: Mark Walters <markwalters1009@gmail.com>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [RFC PATCH v3 04/11] emacs: add entry to notmuch-pick from
\r
42 Date: Mon, 13 Feb 2012 01:20:08 +0000
\r
43 Message-Id: <1329096015-8078-5-git-send-email-markwalters1009@gmail.com>
\r
44 X-Mailer: git-send-email 1.7.2.3
\r
45 In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>
\r
46 References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>
\r
47 X-BeenThere: notmuch@notmuchmail.org
\r
48 X-Mailman-Version: 2.1.13
\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: Mon, 13 Feb 2012 01:19:24 -0000
\r
61 Add an entry to notmuch-pick from notmuch-hello and bind it to 'z'.
\r
63 emacs/notmuch-hello.el | 10 ++++++++++
\r
64 1 files changed, 10 insertions(+), 0 deletions(-)
\r
66 diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
\r
67 index d17a30f..6d28a7e 100644
\r
68 --- a/emacs/notmuch-hello.el
\r
69 +++ b/emacs/notmuch-hello.el
\r
71 (require 'notmuch-mua)
\r
73 (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))
\r
74 +(declare-function notmuch-pick "notmuch-pick" (query &optional query-context buffer-name))
\r
75 (declare-function notmuch-poll "notmuch" ())
\r
77 (defcustom notmuch-hello-recent-searches-max 10
\r
78 @@ -181,6 +182,14 @@ International Bureau of Weights and Measures."
\r
79 (notmuch-search search notmuch-search-oldest-first nil nil
\r
80 #'notmuch-hello-search-continuation))
\r
82 +(defun notmuch-hello-pick (&optional search)
\r
84 + (unless (null search)
\r
85 + (setq search (notmuch-hello-trim search))
\r
86 + (let ((history-delete-duplicates t))
\r
87 + (add-to-history 'notmuch-search-history search)))
\r
88 + (notmuch-pick search))
\r
90 (defun notmuch-hello-add-saved-search (widget)
\r
92 (let ((search (widget-value
\r
93 @@ -345,6 +354,7 @@ should be. Returns a cons cell `(tags-per-line width)'."
\r
94 (define-key map (kbd "<C-tab>") 'widget-backward)
\r
95 (define-key map "m" 'notmuch-mua-new-mail)
\r
96 (define-key map "s" 'notmuch-hello-search)
\r
97 + (define-key map "z" 'notmuch-hello-pick)
\r
99 "Keymap for \"notmuch hello\" buffers.")
\r
100 (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)
\r