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

diff --git a/b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 b/b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0
new file mode 100644 (file)
index 0000000..3572445
--- /dev/null
@@ -0,0 +1,102 @@
+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 7441B42119C\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:51 -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 dOsD5j3UeWwe for <notmuch@notmuchmail.org>;\r
+       Sun, 12 Feb 2012 17:19:50 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+       [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0403941ED71\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:29 -0800 (PST)\r
+Received: by mail-we0-f181.google.com with SMTP id p13so3669534wer.26\r
+       for <notmuch@notmuchmail.org>; Sun, 12 Feb 2012 17:19:29 -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=1ZBpH7GS6wZxNh9949t3+N/mnsAIGYfk08mxtV0qDU8=;\r
+       b=EU5pjX08A7pAkhjaVEl7jaLovet/P8Y/L4c+0JYvpKNtUPumGMwHx/ElCTQjBh4jHf\r
+       LyYSpQwmNUk4FsM/t5S8GyQjduqnAIXlfXIZkLnRaYwEcxyr/v2EzgCJQCu7Md8SUpK0\r
+       o+E9mCHjOxzuu3Nk24rPTVaphYx8ShCBMZ58Q=\r
+Received: by 10.181.11.231 with SMTP id el7mr10771747wid.0.1329095969768;\r
+       Sun, 12 Feb 2012 17:19:29 -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
+ p10sm18695268wic.0.2012.02.12.17.19.28        (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sun, 12 Feb 2012 17:19:29 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH v3 08/11] emacs: add the entry to notmuch-pick to\r
+       notmuch-show.el\r
+Date: Mon, 13 Feb 2012 01:20:12 +0000\r
+Message-Id: <1329096015-8078-9-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:52 -0000\r
+\r
+Add key bindings 'z' to enter a notmuch-pick search and 'Z' to view\r
+the current `show' (i.e. a thread-id with some query) in notmuch-pick.\r
+---\r
+ emacs/notmuch-show.el |    8 ++++++++\r
+ 1 files changed, 8 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index 43408d9..244e18d 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -42,6 +42,7 @@\r
+ (declare-function notmuch-search-next-thread "notmuch" nil)\r
+ (declare-function notmuch-search-show-thread "notmuch" nil)\r
+ (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes))\r
++(declare-function notmuch-pick "notmuch-pick" (query &optional query-context buffer-name))\r
\r
+ (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date")\r
+   "Headers that should be shown in a message, in this order.\r
+@@ -1158,6 +1159,8 @@ buffer is stored and re-applied after the refresh."\r
+       (define-key map (kbd "<backtab>") 'notmuch-show-previous-button)\r
+       (define-key map (kbd "TAB") 'notmuch-show-next-button)\r
+       (define-key map "s" 'notmuch-search)\r
++      (define-key map "z" 'notmuch-pick)\r
++      (define-key map "Z" 'notmuch-show-pick-current-query)\r
+       (define-key map "m" 'notmuch-mua-new-mail)\r
+       (define-key map "f" 'notmuch-show-forward-message)\r
+       (define-key map "r" 'notmuch-show-reply-sender)\r
+@@ -1565,6 +1568,11 @@ to show, nil otherwise."\r
+   (notmuch-show-mark-read)\r
+   (notmuch-show-message-adjust))\r
\r
++(defun notmuch-show-pick-current-query ()\r
++  "Call notmuch pick with the current query"\r
++  (interactive)\r
++  (notmuch-pick notmuch-show-thread-id notmuch-show-query-context))\r
++\r
+ (defun notmuch-show-view-raw-message ()\r
+   "View the file holding the current message."\r
+   (interactive)\r
+-- \r
+1.7.2.3\r
+\r