[RFC PATCH v3 04/11] emacs: add entry to notmuch-pick from notmuch-hello.el
authorMark Walters <markwalters1009@gmail.com>
Mon, 13 Feb 2012 01:20:08 +0000 (01:20 +0000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:25 +0000 (09:44 -0800)
3b/4d661ce112f1cb6693b90df54715f61ca7f1ee [new file with mode: 0644]

diff --git a/3b/4d661ce112f1cb6693b90df54715f61ca7f1ee b/3b/4d661ce112f1cb6693b90df54715f61ca7f1ee
new file mode 100644 (file)
index 0000000..77654d5
--- /dev/null
@@ -0,0 +1,103 @@
+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 2325B421174\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:24 -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 fZCi81zetwJ1 for <notmuch@notmuchmail.org>;\r
+       Sun, 12 Feb 2012 17:19:22 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45])       (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
+ certificate requested)        by olra.theworths.org (Postfix) with ESMTPS id\r
+ E88D7421193   for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:19 -0800\r
+ (PST)\r
+Received: by mail-ww0-f45.google.com with SMTP id dt12so3923384wgb.2\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:19 -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=wyQH5qIrPO4XEuMD9aVM3se/EErzfcadjRwkDNsdkXQ=;\r
+       b=UOhjkQKzwwR5SJ2i6oVlxm+YZBTQzGUY9VzSLfTbYpsszM1youuDDdl7PE3URz6Z35\r
+       isMSmA6aMEq5NfgVaKEBltEfGSaUQt3RsuAzG7m6UT8+UPUCFvnHveGj27dvQ5VAGHFL\r
+       Oc0oDQzhIzCD9tbKN/Wprw2Zwxl7hRbVfK+8Q=\r
+Received: by 10.180.78.233 with SMTP id e9mr15283162wix.0.1329095959673;\r
+       Sun, 12 Feb 2012 17:19:19 -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
+ da8sm18415905wib.6.2012.02.12.17.19.18        (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 12 Feb 2012 17:19:19 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH v3 04/11] emacs: add entry to notmuch-pick from\r
+       notmuch-hello.el\r
+Date: Mon, 13 Feb 2012 01:20:08 +0000\r
+Message-Id: <1329096015-8078-5-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:24 -0000\r
+\r
+Add an entry to notmuch-pick from notmuch-hello and bind it to 'z'.\r
+---\r
+ emacs/notmuch-hello.el |   10 ++++++++++\r
+ 1 files changed, 10 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el\r
+index d17a30f..6d28a7e 100644\r
+--- a/emacs/notmuch-hello.el\r
++++ b/emacs/notmuch-hello.el\r
+@@ -27,6 +27,7 @@\r
+ (require 'notmuch-mua)\r
\r
+ (declare-function notmuch-search "notmuch" (query &optional oldest-first target-thread target-line continuation))\r
++(declare-function notmuch-pick "notmuch-pick" (query &optional query-context buffer-name))\r
+ (declare-function notmuch-poll "notmuch" ())\r
\r
+ (defcustom notmuch-hello-recent-searches-max 10\r
+@@ -181,6 +182,14 @@ International Bureau of Weights and Measures."\r
+   (notmuch-search search notmuch-search-oldest-first nil nil\r
+                 #'notmuch-hello-search-continuation))\r
\r
++(defun notmuch-hello-pick (&optional search)\r
++  (interactive)\r
++  (unless (null search)\r
++    (setq search (notmuch-hello-trim search))\r
++    (let ((history-delete-duplicates t))\r
++      (add-to-history 'notmuch-search-history search)))\r
++  (notmuch-pick search))\r
++\r
+ (defun notmuch-hello-add-saved-search (widget)\r
+   (interactive)\r
+   (let ((search (widget-value\r
+@@ -345,6 +354,7 @@ should be. Returns a cons cell `(tags-per-line width)'."\r
+     (define-key map (kbd "<C-tab>") 'widget-backward)\r
+     (define-key map "m" 'notmuch-mua-new-mail)\r
+     (define-key map "s" 'notmuch-hello-search)\r
++    (define-key map "z" 'notmuch-hello-pick)\r
+     map)\r
+   "Keymap for \"notmuch hello\" buffers.")\r
+ (fset 'notmuch-hello-mode-map notmuch-hello-mode-map)\r
+-- \r
+1.7.2.3\r
+\r