From 6a64c396c0a371cf9bb6867cf91325badda102d0 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Wed, 12 Mar 2014 04:09:55 +0000 Subject: [PATCH] [Patch v3 6/8] emacs: show: use orig-tags for tag display --- 20/f4e1ad13d6824e7d96e0f247f3d46e641c75a1 | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 20/f4e1ad13d6824e7d96e0f247f3d46e641c75a1 diff --git a/20/f4e1ad13d6824e7d96e0f247f3d46e641c75a1 b/20/f4e1ad13d6824e7d96e0f247f3d46e641c75a1 new file mode 100644 index 000000000..653d086ad --- /dev/null +++ b/20/f4e1ad13d6824e7d96e0f247f3d46e641c75a1 @@ -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 B40C9431FCF + for ; Tue, 11 Mar 2014 21:10:36 -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 CcIPDj3Kujuj for ; + Tue, 11 Mar 2014 21:10:32 -0700 (PDT) +Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com + [209.85.212.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6599C431FD2 + for ; Tue, 11 Mar 2014 21:10:14 -0700 (PDT) +Received: by mail-wi0-f171.google.com with SMTP id hn9so1814215wib.10 + for ; Tue, 11 Mar 2014 21:10:11 -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=E3yuVeWINftbYUwMXsfkhJnWRpCCr0QMCERkfRJsyic=; + b=Y0H+U+PckUAji5GuT60XIs/I0tdH07YnOocpLt2MnZIZv19P9epVfHkRnJLQ07exDF + q0S8hAJ4QhzRQvYw1xZum+1hheDIWG1HmKnaX4h8B3RR5cL/0UidmDZ0QNrqYgJEu6Xp + IbO3CiPQ4RISpLKEkJm0v7WZUAVm1xX4JYh0b5J7eZ3Stws3Xf11Xtv2qsSGGfEbpKnR + 885XaGr69y7W4ty0PqjcAuAkwmTUpos7a5zS+a8ovizAeFlntHcC76PbziCJ+YX9jerO + eu4hmNrMk7z1nqLrePARF7J7W69Jo/5tSumRzBRmW1zmCpV7yGJgoDA47tuPLsfzSdWp + QJRw== +X-Received: by 10.180.189.10 with SMTP id ge10mr5860567wic.47.1394597411844; + Tue, 11 Mar 2014 21:10:11 -0700 (PDT) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id + bm8sm66458039wjc.12.2014.03.11.21.10.10 for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Tue, 11 Mar 2014 21:10:11 -0700 (PDT) +From: Mark Walters +To: notmuch@notmuchmail.org, + amdragon@mit.edu +Subject: [Patch v3 6/8] emacs: show: use orig-tags for tag display +Date: Wed, 12 Mar 2014 04:09:55 +0000 +Message-Id: <1394597397-8486-7-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> +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:36 -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 files changed, 3 insertions(+), 1 deletions(-) + +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.9.1 + -- 2.26.2