--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 7C147421198\r
+ for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:28 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id IimSLn1iqxdU for <notmuch@notmuchmail.org>;\r
+ Sun, 12 Feb 2012 17:19:27 -0800 (PST)\r
+Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com\r
+ [209.85.212.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 76B8C421171\r
+ for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:27 -0800 (PST)\r
+Received: by mail-wi0-f181.google.com with SMTP id hi8so3615406wib.26\r
+ for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:27 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+ bh=JoVR2Z6W7fGXZ6kRe/dVDRXYwLcmBIEgc1k9q8dCN20=;\r
+ b=r8lIjF79ZYAWcLFk32kFWWniyA4jbP/le1/4RnFVWi5nEzifcq3d9boiPKnVcRjT7J\r
+ oiRJ3x++hF0oOBhbVbPqq7OwFHp4JBRDmCfEG1S0ZKuyCJiOebFSyeWt4SQB/mxhmvrd\r
+ iKtGHUddShu/BWdAiJHcsEje3i8K/OMJ3reFg=\r
+Received: by 10.216.135.76 with SMTP id t54mr5600836wei.14.1329095967213;\r
+ Sun, 12 Feb 2012 17:19:27 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223]) by mx.google.com with ESMTPS id\r
+ ex2sm41853756wib.1.2012.02.12.17.19.25 (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sun, 12 Feb 2012 17:19:26 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH v3 07/11] emacs: add entry to notmuch-pick from notmuch.el\r
+Date: Mon, 13 Feb 2012 01:20:11 +0000\r
+Message-Id: <1329096015-8078-8-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 13 Feb 2012 01:19:29 -0000\r
+\r
+Add bindings 'z' to enter a notmuch-pick search and 'Z' to go straight\r
+to the current search (i.e. the on being viewed in notmuch.el buffer)\r
+in notmuch-pick. Also add binding `M-RET' to view the currently selected\r
+thread with notmuch-pick.\r
+---\r
+ emacs/notmuch.el | 20 ++++++++++++++++++++\r
+ 1 files changed, 20 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 5b4f1c5..28f7953 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -54,6 +54,7 @@\r
+ \r
+ (require 'notmuch-lib)\r
+ (require 'notmuch-show)\r
++(require 'notmuch-pick)\r
+ (require 'notmuch-mua)\r
+ (require 'notmuch-hello)\r
+ (require 'notmuch-maildir-fcc)\r
+@@ -272,6 +273,8 @@ For a mouse binding, return nil."\r
+ (define-key map "R" 'notmuch-search-reply-to-thread)\r
+ (define-key map "m" 'notmuch-mua-new-mail)\r
+ (define-key map "s" 'notmuch-search)\r
++ (define-key map "z" 'notmuch-pick)\r
++ (define-key map "Z" 'notmuch-search-pick-current-query)\r
+ (define-key map "o" 'notmuch-search-toggle-order)\r
+ (define-key map "c" 'notmuch-search-stash-map)\r
+ (define-key map "=" 'notmuch-search-refresh-view)\r
+@@ -284,6 +287,7 @@ For a mouse binding, return nil."\r
+ (define-key map "-" 'notmuch-search-remove-tag)\r
+ (define-key map "+" 'notmuch-search-add-tag)\r
+ (define-key map (kbd "RET") 'notmuch-search-show-thread)\r
++ (define-key map (kbd "M-RET") 'notmuch-search-pick-thread)\r
+ map)\r
+ "Keymap for \"notmuch search\" buffers.")\r
+ (fset 'notmuch-search-mode-map notmuch-search-mode-map)\r
+@@ -1021,6 +1025,22 @@ same relative position within the new buffer."\r
+ (notmuch-search query oldest-first target-thread target-line continuation)\r
+ (goto-char (point-min))))\r
+ \r
++(defun notmuch-search-pick-current-query ()\r
++ "Call notmuch pick with the current query"\r
++ (interactive)\r
++ (notmuch-pick notmuch-search-query-string))\r
++\r
++(defun notmuch-search-pick-thread ()\r
++ "Show the selected thread with notmuch-pick"\r
++ (interactive)\r
++ (notmuch-pick (notmuch-search-find-thread-id)\r
++ notmuch-search-query-string\r
++ (notmuch-prettify-subject (notmuch-search-find-subject)))\r
++ (unless (notmuch-pick-get-match)\r
++ (notmuch-pick-next-message))\r
++ (notmuch-pick-show-message))\r
++\r
++\r
+ (defcustom notmuch-poll-script nil\r
+ "An external script to incorporate new mail into the notmuch database.\r
+ \r
+-- \r
+1.7.2.3\r
+\r