From e2a39aae7913cb0c0cb492c077271b6a3015071b Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Fri, 14 Feb 2014 09:15:17 +0000 Subject: [PATCH] [WIP Patch 5/7] emacs: show: use orig-tags for tag display --- 53/78507045f3b8d88f7c6dfa0ba17c02f6c2b2e0 | 95 +++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 53/78507045f3b8d88f7c6dfa0ba17c02f6c2b2e0 diff --git a/53/78507045f3b8d88f7c6dfa0ba17c02f6c2b2e0 b/53/78507045f3b8d88f7c6dfa0ba17c02f6c2b2e0 new file mode 100644 index 000000000..ffae047c7 --- /dev/null +++ b/53/78507045f3b8d88f7c6dfa0ba17c02f6c2b2e0 @@ -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 2CF82431FC3 + for ; Fri, 14 Feb 2014 01:15:55 -0800 (PST) +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 MEXtWVQvk3MF for ; + Fri, 14 Feb 2014 01:15:50 -0800 (PST) +Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com + [74.125.82.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 54DAD431FC7 for ; Fri, 14 Feb 2014 01:15:35 -0800 + (PST) +Received: by mail-wg0-f51.google.com with SMTP id n12so184065wgh.18 + for ; Fri, 14 Feb 2014 01:15:34 -0800 (PST) +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=OtljRpbfMX1AXd9Wj2R5ZiDRa0FgMQhq8Gb1mIiq5as=; + b=uOjeBAPB2WoHSDUA7gqwT0V+jANaEJUm3bYazweLeVrHt13rf3JaPKQTBPtKrMNyTa + EpqFV50VfHVnvf+RMBwSEj8n5PPUu7icYkmHGPoSrMCIkgk3UF3iwPTArCJQHUSaf4F3 + 5N41XjmPBS5W734DujK+Kqi+2rPcRcBEvsNBMgBI6502yk6eBBCRdyyHPlKuYOZvHRbi + gTdKdLbByKIKeGtX1oe/oN96uwuTluE2esRbS1gqRE9QrWZvOcfo1uAeD9EV2avLygME + mU7grY5V8yhxS641bPFwVdKhbLxAA6In+XQAqtzBNpPe7w5wxOfeDK6C6F5gsdr7yLWS + PgwA== +X-Received: by 10.194.92.199 with SMTP id co7mr5021686wjb.14.1392369334216; + Fri, 14 Feb 2014 01:15:34 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id de3sm11136384wjb.8.2014.02.14.01.15.33 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Fri, 14 Feb 2014 01:15:33 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org, + Austin Clements +Subject: [WIP Patch 5/7] emacs: show: use orig-tags for tag display +Date: Fri, 14 Feb 2014 09:15:17 +0000 +Message-Id: <1392369319-24508-6-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1392369319-24508-1-git-send-email-markwalters1009@gmail.com> +References: <1392369319-24508-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: Fri, 14 Feb 2014 09:15: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 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el +index 1ce56f9..97243dc 100644 +--- a/emacs/notmuch-show.el ++++ b/emacs/notmuch-show.el +@@ -344,7 +344,7 @@ operation on the contents of the current buffer." + (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) +@@ -1167,6 +1167,8 @@ function is used." + + (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