unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Mark Walters <markwalters1009@gmail.com>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] emacs: tree: bind S to run current query in search mode
Date: Wed, 14 Oct 2015 09:38:23 +0100	[thread overview]
Message-ID: <1444811903-16741-3-git-send-email-markwalters1009@gmail.com> (raw)
In-Reply-To: <1444811903-16741-1-git-send-email-markwalters1009@gmail.com>

---
 emacs/notmuch-tree.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 182235e..8d464a9 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -240,6 +240,8 @@ FUNC."
     ;; Override because we want to close message pane first.
     (define-key map [remap notmuch-mua-new-mail] (notmuch-tree-close-message-pane-and #'notmuch-mua-new-mail))
 
+    (define-key map "S" 'notmuch-search-from-tree-current-query)
+
     ;; these use notmuch-show functions directly
     (define-key map "|" 'notmuch-show-pipe-message)
     (define-key map "w" 'notmuch-show-save-attachments)
@@ -402,6 +404,12 @@ Does NOT change the database."
     (notmuch-tree-close-message-window)
     (notmuch-tree query)))
 
+(defun notmuch-search-from-tree-current-query ()
+  "Call notmuch search with the current query"
+  (interactive)
+  (notmuch-tree-close-message-window)
+  (notmuch-search (notmuch-tree-get-query)))
+
 (defun notmuch-tree-message-window-kill-hook ()
   "Close the message pane when exiting the show buffer."
   (let ((buffer (current-buffer)))
-- 
2.1.4

  parent reply	other threads:[~2015-10-14  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14  8:38 [PATCH 0/2] Saved searches in tree view Mark Walters
2015-10-14  8:38 ` [PATCH 1/2] emacs: allow saved searches to select tree-view Mark Walters
2015-10-21 12:18   ` David Bremner
2015-10-14  8:38 ` Mark Walters [this message]
2015-10-21 12:18   ` [PATCH 2/2] emacs: tree: bind S to run current query in search mode David Bremner
2015-10-17  8:04 ` [PATCH 0/2] Saved searches in tree view Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444811903-16741-3-git-send-email-markwalters1009@gmail.com \
    --to=markwalters1009@gmail.com \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).