From 646a162cf955c09e90e69325a0dcc800bf7f9010 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Mon, 20 Aug 2012 18:52:49 +1700 Subject: [PATCH] [PATCH 10/11] emacs: add function to toggle showing authors/recipients in search --- c3/ec9e0c79e07a584c3bf5212e2d6878a2ea9a24 | 101 ++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 c3/ec9e0c79e07a584c3bf5212e2d6878a2ea9a24 diff --git a/c3/ec9e0c79e07a584c3bf5212e2d6878a2ea9a24 b/c3/ec9e0c79e07a584c3bf5212e2d6878a2ea9a24 new file mode 100644 index 000000000..625f9d56f --- /dev/null +++ b/c3/ec9e0c79e07a584c3bf5212e2d6878a2ea9a24 @@ -0,0 +1,101 @@ +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 AA263431FAE + for ; Sun, 19 Aug 2012 18:53:09 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -2.3 +X-Spam-Level: +X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_MED=-2.3] 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 a34FcYKEZwXg for ; + Sun, 19 Aug 2012 18:53:09 -0700 (PDT) +Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu + [131.215.239.19]) + by olra.theworths.org (Postfix) with ESMTP id A912E431FBC + for ; Sun, 19 Aug 2012 18:53:07 -0700 (PDT) +Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) + by earth-doxen-postvirus (Postfix) with ESMTP id 71BB666E00DF + for ; Sun, 19 Aug 2012 18:53:07 -0700 (PDT) +X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new +Received: from finestructure.net (unknown [76.89.192.57]) + (Authenticated sender: jrollins) + by earth-doxen-submit (Postfix) with ESMTP id A2AFE66E00E4 + for ; Sun, 19 Aug 2012 18:53:05 -0700 (PDT) +Received: by finestructure.net (Postfix, from userid 1000) + id 0108CCF8; Sun, 19 Aug 2012 18:53:03 -0700 (PDT) +From: Jameson Graef Rollins +To: Notmuch Mail +Subject: [PATCH 10/11] emacs: add function to toggle showing + authors/recipients in search +Date: Sun, 19 Aug 2012 18:52:49 -0700 +Message-Id: <1345427570-26518-11-git-send-email-jrollins@finestructure.net> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1345427570-26518-10-git-send-email-jrollins@finestructure.net> +References: <1345427570-26518-1-git-send-email-jrollins@finestructure.net> + <1345427570-26518-2-git-send-email-jrollins@finestructure.net> + <1345427570-26518-3-git-send-email-jrollins@finestructure.net> + <1345427570-26518-4-git-send-email-jrollins@finestructure.net> + <1345427570-26518-5-git-send-email-jrollins@finestructure.net> + <1345427570-26518-6-git-send-email-jrollins@finestructure.net> + <1345427570-26518-7-git-send-email-jrollins@finestructure.net> + <1345427570-26518-8-git-send-email-jrollins@finestructure.net> + <1345427570-26518-9-git-send-email-jrollins@finestructure.net> + <1345427570-26518-10-git-send-email-jrollins@finestructure.net> +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, 20 Aug 2012 01:53:10 -0000 + +New function, notmuch-search-toggle-tofrom, toggles whether thread +authors or recipients are shown in the 'authors' fields in the search +results. This is bound to the '/' key. +--- + emacs/notmuch.el | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/emacs/notmuch.el b/emacs/notmuch.el +index d05b1e8..ca16583 100644 +--- a/emacs/notmuch.el ++++ b/emacs/notmuch.el +@@ -226,6 +226,7 @@ For a mouse binding, return nil." + (define-key map "m" 'notmuch-mua-new-mail) + (define-key map "s" 'notmuch-search) + (define-key map "o" 'notmuch-search-toggle-order) ++ (define-key map "/" 'notmuch-search-toggle-tofrom) + (define-key map "c" 'notmuch-search-stash-map) + (define-key map "=" 'notmuch-search-refresh-view) + (define-key map "G" 'notmuch-search-poll-and-refresh-view) +@@ -1082,6 +1083,16 @@ search." + (set 'notmuch-search-oldest-first (not notmuch-search-oldest-first)) + (notmuch-search-refresh-view)) + ++(defun notmuch-search-toggle-tofrom () ++ "Toggle showing thread authors or recipients. ++ ++By default, search results display the authors of the threads in ++the \"authors\" field. This command toggles the display of ++thread recipients in that field instead." ++ (interactive) ++ (set 'notmuch-search-show-recipients (not notmuch-search-show-recipients)) ++ (notmuch-search-refresh-view)) ++ + (defun notmuch-search-filter (query) + "Filter the current search results based on an additional query string. + +-- +1.7.10.4 + -- 2.26.2