From ed7d1adf37cb9ff16d3710cb4b329586dbc5ed9c Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Wed, 19 Feb 2014 20:20:08 +0000 Subject: [PATCH] [PATCH v2 3/7] emacs: tag: add customize for deleted/added tag formats --- 7b/9955187904b59e9ea5f23e2de3a49b969124b8 | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 7b/9955187904b59e9ea5f23e2de3a49b969124b8 diff --git a/7b/9955187904b59e9ea5f23e2de3a49b969124b8 b/7b/9955187904b59e9ea5f23e2de3a49b969124b8 new file mode 100644 index 000000000..36871d824 --- /dev/null +++ b/7b/9955187904b59e9ea5f23e2de3a49b969124b8 @@ -0,0 +1,115 @@ +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 37827431FBD + for ; Wed, 19 Feb 2014 12:20:50 -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 Jnx8p7wCI492 for ; + Wed, 19 Feb 2014 12:20:44 -0800 (PST) +Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com + [74.125.82.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + A7FF4431FCB for ; Wed, 19 Feb 2014 12:20:37 -0800 + (PST) +Received: by mail-wg0-f53.google.com with SMTP id x12so750328wgg.8 + for ; Wed, 19 Feb 2014 12:20:36 -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=2hXmYqW1cqmnyTYGw7XoxeXCuB+24gLlrLC0sCtxzTA=; + b=afH42+EKsc6MgVnTWizEQmFxfEWldyzf0MvDUrpWHdzeA20J/Z8prnGj+kpvbydlY2 + ktOfwWasatScGSIk4ZCxsPMqePiDMEqkIiIXiZzgZx3UO7YrTFjk3mdfz6AgXavNhSIx + mo2nvMOxLa7jV+dR7MRqbGgYkHb63rKmklLbQXKXlcP599q3IRJBCeuF4WKED20opUsT + TOrP6amEp5sexWx1j/W8yVfI52RfJ4FFcDDQNfgLTEp9mhkSFsA59jorUO1f3BC3rn/o + FXG/dVxocsMAwd4UiVg31kOc8AjnFnrwwlxF1GCThX5UbnEMgc7JDdV2YlGG/RtlBEqi + cWYg== +X-Received: by 10.195.13.164 with SMTP id ez4mr30264682wjd.11.1392841236602; + Wed, 19 Feb 2014 12:20:36 -0800 (PST) +Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) + by mx.google.com with ESMTPSA id fo6sm4678534wib.7.2014.02.19.12.20.35 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Wed, 19 Feb 2014 12:20:36 -0800 (PST) +From: Mark Walters +To: notmuch@notmuchmail.org +Subject: [PATCH v2 3/7] emacs: tag: add customize for deleted/added tag + formats +Date: Wed, 19 Feb 2014 20:20:08 +0000 +Message-Id: <1392841212-8494-4-git-send-email-markwalters1009@gmail.com> +X-Mailer: git-send-email 1.7.9.1 +In-Reply-To: <1392841212-8494-1-git-send-email-markwalters1009@gmail.com> +References: <1392841212-8494-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, 19 Feb 2014 20:20:50 -0000 + +Add customize options for deleted/added tag formats. These are not +used yet but will be later in the series. +--- + emacs/notmuch-tag.el | 31 +++++++++++++++++++++++++++++++ + 1 files changed, 31 insertions(+), 0 deletions(-) + +diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el +index 878aaf7..064fbdb 100644 +--- a/emacs/notmuch-tag.el ++++ b/emacs/notmuch-tag.el +@@ -101,6 +101,37 @@ with images." + :group 'notmuch-show + :type 'notmuch-tag-format-type) + ++(defcustom notmuch-tag-deleted-formats ++ '((".*" (propertize tag 'face ++ (if (display-supports-face-attributes-p '(:strike-through "red")) ++ '(:strike-through "red") ++ '(:inverse-video t))))) ++ "Custom formats for tags when deleted. ++ ++For deleted tags the formats in `notmuch-tag-formats` are applied ++first and then these formats are applied on top. ++ ++By default this shows deleted tags with strike-through in red, ++unless strike-through is not available (e.g., emacs is running in ++a terminal) in which case it uses inverse video. To hide deleted ++tags completely set this to ++ '((\"\" nil)) ++ ++See `notmuch-tag-formats' for full documentation." ++ :group 'notmuch-show ++ :type 'notmuch-tag-format-type) ++ ++(defcustom notmuch-tag-added-formats ++ '((".*" (propertize tag 'face '(:underline "green")))) ++ "Custom formats for tags when added. ++ ++For added tags the formats in `notmuch-tag-formats` are applied ++first and then these formats are applied on top. ++ ++See `notmuch-tag-formats' for full documentation." ++ :group 'notmuch-show ++ :type 'notmuch-tag-format-type) ++ + (defun notmuch-tag-format-image-data (tag data) + "Replace TAG with image DATA, if available. + +-- +1.7.9.1 + -- 2.26.2