[PATCH 2/2] emacs: tree: bind S to run current query in search mode
authorMark Walters <markwalters1009@gmail.com>
Wed, 14 Oct 2015 08:38:23 +0000 (09:38 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:49:44 +0000 (14:49 -0700)
8b/9bb089297bcf8d75354fb2672853445ad77899 [new file with mode: 0644]

diff --git a/8b/9bb089297bcf8d75354fb2672853445ad77899 b/8b/9bb089297bcf8d75354fb2672853445ad77899
new file mode 100644 (file)
index 0000000..3b707d3
--- /dev/null
@@ -0,0 +1,95 @@
+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 arlo.cworth.org (Postfix) with ESMTP id 4F6326DE1789\r
+ for <notmuch@notmuchmail.org>; Wed, 14 Oct 2015 01:38:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.577\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.577 tagged_above=-999 required=5\r
+ tests=[AWL=-0.007, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id lyrti3-XaVGt for <notmuch@notmuchmail.org>;\r
+ Wed, 14 Oct 2015 01:38:49 -0700 (PDT)\r
+Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com\r
+ [209.85.212.170])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id D792D6DE1770\r
+ for <notmuch@notmuchmail.org>; Wed, 14 Oct 2015 01:38:42 -0700 (PDT)\r
+Received: by wieq12 with SMTP id q12so71122889wie.1\r
+ for <notmuch@notmuchmail.org>; Wed, 14 Oct 2015 01:38:41 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+ bh=g8CcAcRhq6DjWNzfxbyeJTwb0toVcWLyc00HO2oUGSI=;\r
+ b=OiCxwA/Pwr8Lne57Ta8EAWPuyWddt/PG3bLkQ95Vwxcm679QY2KcgxUvrfG83MSPlj\r
+ p/jlqMZ1BY73/f1zJvSj7+GGth5J+CfEzL4x5s25TaHX+WsEQFujuEOixHTZgSMGKovB\r
+ Y9Siq6LNnR7yhHFu1O62XXQOJoD+PgFGN8yvgiGCtz6E7qcn4b+BzbZp4cyjLBR2QPOU\r
+ XvH4MYgsKbJ6JIKy9KP/U8goMlHQzUOhcwz2YD0ajNRxNmRkuMa5ynBy6kvY3YBQgsHb\r
+ WAcM+bnbO0J+3q9c5+z/PJcivCYJnPSwyFW1bmZID27yBCWYXAmDt3VR/iSb6x9ioIoZ\r
+ 74xA==\r
+X-Received: by 10.194.6.106 with SMTP id z10mr2442847wjz.104.1444811920858;\r
+ Wed, 14 Oct 2015 01:38:40 -0700 (PDT)\r
+Received: from localhost ([161.23.118.65])\r
+ by smtp.gmail.com with ESMTPSA id ee5sm8559334wjd.17.2015.10.14.01.38.39\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Wed, 14 Oct 2015 01:38:40 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/2] emacs: tree: bind S to run current query in search mode\r
+Date: Wed, 14 Oct 2015 09:38:23 +0100\r
+Message-Id: <1444811903-16741-3-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <1444811903-16741-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1444811903-16741-1-git-send-email-markwalters1009@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Wed, 14 Oct 2015 08:38:51 -0000\r
+\r
+---\r
+ emacs/notmuch-tree.el | 8 ++++++++\r
+ 1 file changed, 8 insertions(+)\r
+\r
+diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el\r
+index 182235e..8d464a9 100644\r
+--- a/emacs/notmuch-tree.el\r
++++ b/emacs/notmuch-tree.el\r
+@@ -240,6 +240,8 @@ FUNC."\r
+     ;; Override because we want to close message pane first.\r
+     (define-key map [remap notmuch-mua-new-mail] (notmuch-tree-close-message-pane-and #'notmuch-mua-new-mail))\r
\r
++    (define-key map "S" 'notmuch-search-from-tree-current-query)\r
++\r
+     ;; these use notmuch-show functions directly\r
+     (define-key map "|" 'notmuch-show-pipe-message)\r
+     (define-key map "w" 'notmuch-show-save-attachments)\r
+@@ -402,6 +404,12 @@ Does NOT change the database."\r
+     (notmuch-tree-close-message-window)\r
+     (notmuch-tree query)))\r
\r
++(defun notmuch-search-from-tree-current-query ()\r
++  "Call notmuch search with the current query"\r
++  (interactive)\r
++  (notmuch-tree-close-message-window)\r
++  (notmuch-search (notmuch-tree-get-query)))\r
++\r
+ (defun notmuch-tree-message-window-kill-hook ()\r
+   "Close the message pane when exiting the show buffer."\r
+   (let ((buffer (current-buffer)))\r
+-- \r
+2.1.4\r
+\r