From: Mark Walters Date: Tue, 29 Oct 2013 22:55:36 +0000 (+0000) Subject: [PATCH 09/11] emacs: move search based tree functions to notmuch.el X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5e5f92c06259a397ffef6afc381970bee4defd0e;p=notmuch-archives.git [PATCH 09/11] emacs: move search based tree functions to notmuch.el --- diff --git a/56/f8519d2079f89e9b89f95732ad2383c16c1bea b/56/f8519d2079f89e9b89f95732ad2383c16c1bea new file mode 100644 index 000000000..32c24b4ad --- /dev/null +++ b/56/f8519d2079f89e9b89f95732ad2383c16c1bea @@ -0,0 +1,127 @@ +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 BF11C431FD7 + for ; Tue, 29 Oct 2013 15:56:19 -0700 (PDT) +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 Zinw1BIAKuGY for ; + Tue, 29 Oct 2013 15:56:15 -0700 (PDT) +Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com + [74.125.82.42]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + D0BC5431FC4 for ; Tue, 29 Oct 2013 15:55:59 -0700 + (PDT) +Received: by mail-wg0-f42.google.com with SMTP id n12so5390697wgh.1 + for ; Tue, 29 Oct 2013 15:55:58 -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=nJh0UWR79KCRZjHzzVskA/jaJ8jILtEnM6aPyyFvulE=; + b=B+eVkQcrRv/FSdWTR0Ck3azHFJ+SlevOjP/Loqcb+W1Zrifax5AwN/UeBIlluEy3hx + bGXwrsta7C7gAbZp0NznGXeUYeFX2y/m1RinHXvNiYPKmFPWcrFZpzPTOF9kn66GGV3A + qagrMqQzyxmNqmgP+DuhBbGm7ueyI8kVMWHPueNjk1KnHEOYasY/at9UozLYkbNttQln + L1Y5r/AvUlONQSv9Tu7IxS5coOU20BZ1U3V6JyU+8c1bLOULPAYSrKQPHPzi2YyKqZ8z + c9+cUKrYSMp8UmM3eYmuHGlQZ9SwRlZMKF4cNW8mqVQ/FR2fPWZUy1rUVBk4elaBT4d1 + zfVQ== +X-Received: by 10.194.187.101 with SMTP id fr5mr481563wjc.76.1383087358738; + Tue, 29 Oct 2013 15:55:58 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id b7sm9539338wiz.8.2013.10.29.15.55.58 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Tue, 29 Oct 2013 15:55:58 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 09/11] emacs: move search based tree functions to notmuch.el +Date: Tue, 29 Oct 2013 22:55:36 +0000 +Message-Id: <1383087338-10220-10-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1383087338-10220-1-git-send-email-markwalters1009@gmail.com> +References: <1383087338-10220-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: Tue, 29 Oct 2013 22:56:20 -0000 + +Move a couple of the search mode specifc caller helpers for tree from +tree into notmuch.el. +--- + emacs/notmuch-tree.el | 18 ------------------ + emacs/notmuch.el | 14 ++++++++++++++ + 2 files changed, 14 insertions(+), 18 deletions(-) + +diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el +index ebfb5e7..78b4a57 100644 +--- a/emacs/notmuch-tree.el ++++ b/emacs/notmuch-tree.el +@@ -413,24 +413,6 @@ Does NOT change the database." + notmuch-show-query-context + (notmuch-show-get-message-id))) + +-;; This function should be in notmuch.el but be we trying to minimise +-;; impact on the rest of the codebase. +-(defun notmuch-tree-from-search-current-query () +- "Call notmuch tree with the current query" +- (interactive) +- (notmuch-tree notmuch-search-query-string)) +- +-;; This function should be in notmuch.el but be we trying to minimise +-;; impact on the rest of the codebase. +-(defun notmuch-tree-from-search-thread () +- "Show the selected thread with notmuch-tree" +- (interactive) +- (notmuch-tree (notmuch-search-find-thread-id) +- notmuch-search-query-string +- nil +- (notmuch-prettify-subject (notmuch-search-find-subject)) +- t)) +- + (defun notmuch-tree-message-window-kill-hook () + "Close the message pane when exiting the show buffer." + (let ((buffer (current-buffer))) +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index 418c781..2c9a07c 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -439,6 +439,20 @@ If BARE is set then do not prefix with \"thread:\"" + (concat "*" (truncate-string-to-width subject 30 nil nil t) "*")) + (message "End of search results.")))) + ++(defun notmuch-tree-from-search-current-query () ++ "Call notmuch tree with the current query" ++ (interactive) ++ (notmuch-tree notmuch-search-query-string)) ++ ++(defun notmuch-tree-from-search-thread () ++ "Show the selected thread with notmuch-tree" ++ (interactive) ++ (notmuch-tree (notmuch-search-find-thread-id) ++ notmuch-search-query-string ++ nil ++ (notmuch-prettify-subject (notmuch-search-find-subject)) ++ t)) ++ + (defun notmuch-search-reply-to-thread (&optional prompt-for-sender) + "Begin composing a reply-all to the entire current thread in a new buffer." + (interactive "P") +-- +1.7.9.1 +