From: Mark Walters Date: Wed, 12 Mar 2014 04:09:57 +0000 (+0000) Subject: [Patch v3 8/8] emacs: tree: use orig-tags in search X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=762c8b0110f8b98e094083e0b6d6e3e849790d58;p=notmuch-archives.git [Patch v3 8/8] emacs: tree: use orig-tags in search --- diff --git a/9e/b1bec6a05c1f402e99bf184949e4639be528b8 b/9e/b1bec6a05c1f402e99bf184949e4639be528b8 new file mode 100644 index 000000000..62263ba1d --- /dev/null +++ b/9e/b1bec6a05c1f402e99bf184949e4639be528b8 @@ -0,0 +1,109 @@ +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 811A9431FBF + for ; Tue, 11 Mar 2014 21:10:50 -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 3ooBoITfF2sv for ; + Tue, 11 Mar 2014 21:10:45 -0700 (PDT) +Received: from mail-we0-f174.google.com (mail-we0-f174.google.com + [74.125.82.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 44D9B431FC0 + for ; Tue, 11 Mar 2014 21:10:17 -0700 (PDT) +Received: by mail-we0-f174.google.com with SMTP id t60so10683644wes.5 + for ; Tue, 11 Mar 2014 21:10:16 -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 + :mime-version:content-type:content-transfer-encoding; + bh=NGVu9Yk61sUFKDzrpgzvxcxswr3AdVdMXPI/3A/zR28=; + b=y8kPk3Cau+LC2tMQexAeuaMnt9pDfNQEV9sYfmwRNII40xqtdTMp9lhJmXsq06c+/s + 77zAZE2aqVVeSftPvABX2/SS7rVkYocgGPaGiJGa/bpOtBrAcnSUiMGYi2j0M/PC65zm + jpsd7bcNrJJ+vZyMI5vXSp8zv0SKxSn8P5+Psu9OkfB2H+7onlYPBNsoGX8ZHiMFx1Dq + jRa/l28cctHilJ/1btLZeWZgyLj8G8OYeTz8XQkU/xWn6NW9/kHVH/z02AnUUzKUefSE + rGgyS18uoPgSElWB5McWuRxFhZvv/FMe+/t7/h/5SbSXYNG2fYWUtBP8BAhCSpJksZIj + kouQ== +X-Received: by 10.180.89.211 with SMTP id bq19mr5764726wib.58.1394597416081; + Tue, 11 Mar 2014 21:10:16 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id lg9sm22534891wjb.3.2014.03.11.21.10.15 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Tue, 11 Mar 2014 21:10:15 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org, + amdragon@mit.edu +Subject: [Patch v3 8/8] emacs: tree: use orig-tags in search +Date: Wed, 12 Mar 2014 04:09:57 +0000 +Message-Id: <1394597397-8486-9-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com> +References: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +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: Wed, 12 Mar 2014 04:10:50 -0000 + +This uses the recent functionality to show the tag changes in the tree +buffer. Currently this is only used to show changes the tree buffer +makes itself: i.e., it does not make display any changes reflecting +tagging done by other notmuch-buffers. +--- + emacs/notmuch-tree.el | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el +index 8bf2fbc..7d5f475 100644 +--- a/emacs/notmuch-tree.el ++++ b/emacs/notmuch-tree.el +@@ -701,10 +701,11 @@ (defun notmuch-tree-format-field (field format-string msg) + + ((string-equal field "tags") + (let ((tags (plist-get msg :tags)) ++ (orig-tags (plist-get msg :orig-tags)) + (face (if match + 'notmuch-tree-match-tag-face + 'notmuch-tree-no-match-tag-face))) +- (format format-string (notmuch-tag-format-tags tags tags face))))))) ++ (format format-string (notmuch-tag-format-tags tags orig-tags face))))))) + + (defun notmuch-tree-format-field-list (field-list msg) + "Format fields of MSG according to FIELD-LIST and return string" +@@ -766,8 +767,10 @@ (defun notmuch-tree-insert-tree (tree depth tree-status first last) + (push "├" tree-status))) + + (push (concat (if replies "┬" "─") "►") tree-status) +- (plist-put msg :first (and first (eq 0 depth))) +- (notmuch-tree-goto-and-insert-msg (plist-put msg :tree-status tree-status)) ++ (setq msg (plist-put msg :first (and first (eq 0 depth)))) ++ (setq msg (plist-put msg :tree-status tree-status)) ++ (setq msg (plist-put msg :orig-tags (plist-get msg :tags))) ++ (notmuch-tree-goto-and-insert-msg msg) + (pop tree-status) + (pop tree-status) + +-- +1.7.9.1 +