From 4f2b8a35d05f04ead9675d043c7a9be270b139b5 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Sat, 22 Mar 2014 11:51:10 +0000 Subject: [PATCH] [Patch v4 6/8] emacs: show: use orig-tags for tag display --- 8c/5ca8a76b63eafa04ba195d4c460e84c2f2e54d | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 8c/5ca8a76b63eafa04ba195d4c460e84c2f2e54d diff --git a/8c/5ca8a76b63eafa04ba195d4c460e84c2f2e54d b/8c/5ca8a76b63eafa04ba195d4c460e84c2f2e54d new file mode 100644 index 000000000..61c62631e --- /dev/null +++ b/8c/5ca8a76b63eafa04ba195d4c460e84c2f2e54d @@ -0,0 +1,95 @@ +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 0FBF1431FC7 + for ; Sat, 22 Mar 2014 04:51:55 -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 MXltGxo2jWzY for ; + Sat, 22 Mar 2014 04:51:49 -0700 (PDT) +Received: from mail-we0-f175.google.com (mail-we0-f175.google.com + [74.125.82.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id E8738431FC0 + for ; Sat, 22 Mar 2014 04:51:33 -0700 (PDT) +Received: by mail-we0-f175.google.com with SMTP id q58so2282323wes.34 + for ; Sat, 22 Mar 2014 04:51:32 -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=subdr1sC+0aneoETdoVjAvwXcw8DVfgtcwz+ecYh2+A=; + b=cHf0Yf7Qx6Uz5N9wcuiMqgyzKvVndjGQ4o8oVxDKapIgQAQsK1XjLdGLpdrWyuwhZ1 + s1kNggJAuAErCOCTIg5hS7jBVpRWnx9buvn5uL+EKM3mKGzlTkcmn32TP3+Gq4Omthj+ + TXtvPlowF85an4a7tzfSxwZY0hDtruAof7cb+Sz9Zm736XCKehqWlJoGtyJy9neObGsO + zxjOvUXCOq39UaME0y67EvGD3pAanwppjNZpsJugQZQxgqq+DtBCgHAABOb/A1Ke8Ury + ljDc3mCQ6twwEnPE1twD0Kuro8eYcIvkfrmGuc2PLL3duOsuzFJnggk+XKwlZ7vM7KO3 + VcGg== +X-Received: by 10.180.164.107 with SMTP id yp11mr3078750wib.37.1395489092894; + Sat, 22 Mar 2014 04:51:32 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id n3sm16209144wix.10.2014.03.22.04.51.31 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 22 Mar 2014 04:51:32 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org, + amdragon@mit.edu +Subject: [Patch v4 6/8] emacs: show: use orig-tags for tag display +Date: Sat, 22 Mar 2014 11:51:10 +0000 +Message-Id: <1395489072-19001-7-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1395489072-19001-1-git-send-email-markwalters1009@gmail.com> +References: <1395489072-19001-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: Sat, 22 Mar 2014 11:51:55 -0000 + +This uses the previous patch to show the tag changes that have occured +in the show buffer since it was last loaded/refreshed. +--- + emacs/notmuch-show.el | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 5492be4..f6ca827 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -344,7 +344,7 @@ (defun notmuch-show-update-tags (tags) + (if (re-search-forward "(\\([^()]*\\))$" (line-end-position) t) + (let ((inhibit-read-only t)) + (replace-match (concat "(" +- (notmuch-tag-format-tags tags tags) ++ (notmuch-tag-format-tags tags (notmuch-show-get-prop :orig-tags)) + ")")))))) + + (defun notmuch-clean-address (address) +@@ -1168,6 +1168,8 @@ (defun notmuch-show-build-buffer () + + (jit-lock-register #'notmuch-show-buttonise-links) + ++ (notmuch-show-mapc (lambda () (notmuch-show-set-prop :orig-tags (notmuch-show-get-tags)))) ++ + ;; Set the header line to the subject of the first message. + (setq header-line-format (notmuch-sanitize (notmuch-show-strip-re (notmuch-show-get-subject)))) + +-- +1.7.10.4 + -- 2.26.2