Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4F6326DE1789 for ; Wed, 14 Oct 2015 01:38:51 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.577 X-Spam-Level: X-Spam-Status: No, score=-0.577 tagged_above=-999 required=5 tests=[AWL=-0.007, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lyrti3-XaVGt for ; Wed, 14 Oct 2015 01:38:49 -0700 (PDT) Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by arlo.cworth.org (Postfix) with ESMTPS id D792D6DE1770 for ; Wed, 14 Oct 2015 01:38:42 -0700 (PDT) Received: by wieq12 with SMTP id q12so71122889wie.1 for ; Wed, 14 Oct 2015 01:38:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g8CcAcRhq6DjWNzfxbyeJTwb0toVcWLyc00HO2oUGSI=; b=OiCxwA/Pwr8Lne57Ta8EAWPuyWddt/PG3bLkQ95Vwxcm679QY2KcgxUvrfG83MSPlj p/jlqMZ1BY73/f1zJvSj7+GGth5J+CfEzL4x5s25TaHX+WsEQFujuEOixHTZgSMGKovB Y9Siq6LNnR7yhHFu1O62XXQOJoD+PgFGN8yvgiGCtz6E7qcn4b+BzbZp4cyjLBR2QPOU XvH4MYgsKbJ6JIKy9KP/U8goMlHQzUOhcwz2YD0ajNRxNmRkuMa5ynBy6kvY3YBQgsHb WAcM+bnbO0J+3q9c5+z/PJcivCYJnPSwyFW1bmZID27yBCWYXAmDt3VR/iSb6x9ioIoZ 74xA== X-Received: by 10.194.6.106 with SMTP id z10mr2442847wjz.104.1444811920858; Wed, 14 Oct 2015 01:38:40 -0700 (PDT) Received: from localhost ([161.23.118.65]) by smtp.gmail.com with ESMTPSA id ee5sm8559334wjd.17.2015.10.14.01.38.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2015 01:38:40 -0700 (PDT) From: Mark Walters 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 Message-Id: <1444811903-16741-3-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1444811903-16741-1-git-send-email-markwalters1009@gmail.com> References: <1444811903-16741-1-git-send-email-markwalters1009@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2015 08:38:51 -0000 --- 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