From: Mark Walters Date: Sat, 18 Jan 2014 23:30:53 +0000 (+0000) Subject: [PATCH 5/7] emacs: show: use orig-tags for tag display X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=905ca1d71c4f89a02a7f97d9acb4af602005ab07;p=notmuch-archives.git [PATCH 5/7] emacs: show: use orig-tags for tag display --- diff --git a/bd/99a2048f8ab5247f1b23fb4793584af950597d b/bd/99a2048f8ab5247f1b23fb4793584af950597d new file mode 100644 index 000000000..62b2b53da --- /dev/null +++ b/bd/99a2048f8ab5247f1b23fb4793584af950597d @@ -0,0 +1,94 @@ +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 03F25431FC3 + for ; Sat, 18 Jan 2014 15:31:22 -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 OV12WNyYDBXR for ; + Sat, 18 Jan 2014 15:31:16 -0800 (PST) +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 BCECE431FC4 + for ; Sat, 18 Jan 2014 15:31:10 -0800 (PST) +Received: by mail-we0-f175.google.com with SMTP id p61so5865417wes.34 + for ; Sat, 18 Jan 2014 15:31:09 -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=uYfp+uml23VVcYJYms5QJw3V1jkl3bbRAoh7RiakDoOT036JhV6TPCGl1GJIMoOmLM + Oed8ygthP3RVUlMc/gdLYSL0ofl8gtZRlEhOv1326LQ7mp3vtKmmLKUeghCb80eDcmwB + 79wQyv8IoQgjHYtN/qwJPC2pIPZBa2g54ss8g9PAORM5fSKlgAAfstrr40LVCR9YMWIG + i84/C7zUyH0nwcKkqFO19Y9Y+m9RquSn9bIb6cIyGm1aW5EJB2xQGdRu5nsXSZNWJwFC + Ci9rf3CENytJLnlr1qeVHuBK9IKKps9QqcQFk2qx0SLPtLEEJgSk9kskBbKWEWfGY7aM + 5BCQ== +X-Received: by 10.180.37.193 with SMTP id a1mr4110802wik.52.1390087869680; + Sat, 18 Jan 2014 15:31:09 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id p1sm10991053wie.1.2014.01.18.15.31.08 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 18 Jan 2014 15:31:09 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH 5/7] emacs: show: use orig-tags for tag display +Date: Sat, 18 Jan 2014 23:30:53 +0000 +Message-Id: <1390087855-26194-6-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1390087855-26194-1-git-send-email-markwalters1009@gmail.com> +References: <1390087855-26194-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, 18 Jan 2014 23:31:22 -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 +