--- /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 arlo.cworth.org (Postfix) with ESMTP id 2F1346DE15DD\r
+ for <notmuch@notmuchmail.org>; Fri, 12 Jun 2015 01:15:48 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.462\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.462 tagged_above=-999 required=5 tests=[AWL=1.032, \r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,\r
+ 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 yz08Rqa6zAqW for <notmuch@notmuchmail.org>;\r
+ Fri, 12 Jun 2015 01:15:46 -0700 (PDT)\r
+Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com\r
+ [209.85.212.174])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 17DC26DE15D8\r
+ for <notmuch@notmuchmail.org>; Fri, 12 Jun 2015 01:15:46 -0700 (PDT)\r
+Received: by wiwd19 with SMTP id d19so10867165wiw.0\r
+ for <notmuch@notmuchmail.org>; Fri, 12 Jun 2015 01:15:42 -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;\r
+ bh=ahHyMKlhQRTuoS6k4VDRz+7QGP5/VPp6h8lt6uUOr7w=;\r
+ b=uRba2Sj9hwVPdOdzy7SRGHneD8rsEkfgp/xQBDVOD5GNJ3i9GtLlGJgeCuRUpcrCs9\r
+ V0BAt5vR/4QNs6kOd3W5anGH3WHHB/u8xKzomWAxgASYZVlncn5vUQi1hXKYYBeO0h0p\r
+ KcRx15R5ltGIEMsHcj5t9BEyk1OCK538zwV13F69D0xBiYVKr73/etIzL2TS6GuHHAMl\r
+ F/JMMeSknbsljRrlvtWin4GRtmXnx6mZwTgJP3Xrd7B1n6IyXU7kONWzRJaF5EVbTLds\r
+ oOWDq/yKr3/9IL3pz/Lx/AB9p3SusdJlXb6P3ipz14Jot48DZKs5CH9xTLYPT7p+fhaz\r
+ DB2Q==\r
+X-Received: by 10.194.62.228 with SMTP id b4mr23865270wjs.2.1434096942263;\r
+ Fri, 12 Jun 2015 01:15:42 -0700 (PDT)\r
+Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162])\r
+ by mx.google.com with ESMTPSA id gh3sm4664041wjb.36.2015.06.12.01.15.41\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Fri, 12 Jun 2015 01:15:41 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] emacs search: stash query\r
+Date: Fri, 12 Jun 2015 09:15:32 +0100\r
+Message-Id: <1434096932-20901-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 2.1.4\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: Fri, 12 Jun 2015 08:15:48 -0000\r
+\r
+Add keybinding c q to stash the current query in search mode.\r
+---\r
+\r
+We could add something similar in show or tree mode but the query is\r
+then partly notmuch generated (in particular the choice of thread) so\r
+it is not so useful there.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+emacs/notmuch.el | 6 ++++++\r
+ 1 file changed, 6 insertions(+)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index f03c2f9..6564816 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -181,6 +181,7 @@ (defvar notmuch-search-mode-map\r
+ (defvar notmuch-search-stash-map\r
+ (let ((map (make-sparse-keymap)))\r
+ (define-key map "i" 'notmuch-search-stash-thread-id)\r
++ (define-key map "q" 'notmuch-stash-query)\r
+ (define-key map "?" 'notmuch-subkeymap-help)\r
+ map)\r
+ "Submap for stash commands")\r
+@@ -191,6 +192,11 @@ (defun notmuch-search-stash-thread-id ()\r
+ (interactive)\r
+ (notmuch-common-do-stash (notmuch-search-find-thread-id)))\r
+ \r
++(defun notmuch-stash-query ()\r
++ "Copy current query to kill-ring."\r
++ (interactive)\r
++ (notmuch-common-do-stash (notmuch-search-get-query)))\r
++\r
+ (defvar notmuch-search-query-string)\r
+ (defvar notmuch-search-target-thread)\r
+ (defvar notmuch-search-target-line)\r
+-- \r
+2.1.4\r
+\r