From 9c6b896913f2e0162339a2deda0ae4cb76af5f90 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Mon, 13 Feb 2012 01:20:12 +0000 Subject: [PATCH] [RFC PATCH v3 08/11] emacs: add the entry to notmuch-pick to notmuch-show.el --- b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 diff --git a/b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 b/b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 new file mode 100644 index 000000000..3572445a1 --- /dev/null +++ b/b0/22e6cd194f535b32d25a0b6ccecc8af77e56d0 @@ -0,0 +1,102 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 7441B42119C + for ; Sun, 12 Feb 2012 17:19:51 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0.201 +X-Spam-Level: +X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, + RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id dOsD5j3UeWwe for ; + Sun, 12 Feb 2012 17:19:50 -0800 (PST) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 0403941ED71 + for ; Sun, 12 Feb 2012 17:19:29 -0800 (PST) +Received: by mail-we0-f181.google.com with SMTP id p13so3669534wer.26 + for ; Sun, 12 Feb 2012 17:19:29 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; + bh=1ZBpH7GS6wZxNh9949t3+N/mnsAIGYfk08mxtV0qDU8=; + b=EU5pjX08A7pAkhjaVEl7jaLovet/P8Y/L4c+0JYvpKNtUPumGMwHx/ElCTQjBh4jHf + LyYSpQwmNUk4FsM/t5S8GyQjduqnAIXlfXIZkLnRaYwEcxyr/v2EzgCJQCu7Md8SUpK0 + o+E9mCHjOxzuu3Nk24rPTVaphYx8ShCBMZ58Q= +Received: by 10.181.11.231 with SMTP id el7mr10771747wid.0.1329095969768; + Sun, 12 Feb 2012 17:19:29 -0800 (PST) +Received: from localhost (94-192-233-223.zone6.bethere.co.uk. + [94.192.233.223]) by mx.google.com with ESMTPS id + p10sm18695268wic.0.2012.02.12.17.19.28 (version=TLSv1/SSLv3 cipher=OTHER); + Sun, 12 Feb 2012 17:19:29 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [RFC PATCH v3 08/11] emacs: add the entry to notmuch-pick to + notmuch-show.el +Date: Mon, 13 Feb 2012 01:20:12 +0000 +Message-Id: <1329096015-8078-9-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.2.3 +In-Reply-To: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> +References: <1329072579-27340-1-git-send-email-markwalters1009@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Mon, 13 Feb 2012 01:19:52 -0000 + +Add key bindings 'z' to enter a notmuch-pick search and 'Z' to view +the current `show' (i.e. a thread-id with some query) in notmuch-pick. +--- + emacs/notmuch-show.el | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 43408d9..244e18d 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -42,6 +42,7 @@ + (declare-function notmuch-search-next-thread "notmuch" nil) + (declare-function notmuch-search-show-thread "notmuch" nil) + (declare-function notmuch-update-tags "notmuch" (current-tags tag-changes)) ++(declare-function notmuch-pick "notmuch-pick" (query &optional query-context buffer-name)) + + (defcustom notmuch-message-headers '("Subject" "To" "Cc" "Date") + "Headers that should be shown in a message, in this order. +@@ -1158,6 +1159,8 @@ buffer is stored and re-applied after the refresh." + (define-key map (kbd "") 'notmuch-show-previous-button) + (define-key map (kbd "TAB") 'notmuch-show-next-button) + (define-key map "s" 'notmuch-search) ++ (define-key map "z" 'notmuch-pick) ++ (define-key map "Z" 'notmuch-show-pick-current-query) + (define-key map "m" 'notmuch-mua-new-mail) + (define-key map "f" 'notmuch-show-forward-message) + (define-key map "r" 'notmuch-show-reply-sender) +@@ -1565,6 +1568,11 @@ to show, nil otherwise." + (notmuch-show-mark-read) + (notmuch-show-message-adjust)) + ++(defun notmuch-show-pick-current-query () ++ "Call notmuch pick with the current query" ++ (interactive) ++ (notmuch-pick notmuch-show-thread-id notmuch-show-query-context)) ++ + (defun notmuch-show-view-raw-message () + "View the file holding the current message." + (interactive) +-- +1.7.2.3 + -- 2.26.2