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 83BB2431FD6 for ; Fri, 14 Feb 2014 01:15:40 -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 cowItVYj8e4r for ; Fri, 14 Feb 2014 01:15:34 -0800 (PST) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 73A5C431FBF for ; Fri, 14 Feb 2014 01:15:33 -0800 (PST) Received: by mail-wi0-f173.google.com with SMTP id hn9so251816wib.6 for ; Fri, 14 Feb 2014 01:15:32 -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=6cH8DPMz+/w1ZTopCipIo2uGD9loNWXV6WpX5BoTRzg=; b=mi+ZjKu0sk1QBtqrKQRC2ipmVZnhywIjnCl37mTW8Yx2/4kiulgJFLtdssjkUPrlxU +MidnwHDQTedA/ElBxioJ9JsB/zfUBgvH6A1nEzVMZCdc4DzTOAntgJWDCkIrl1LkRkP xmwQOLpHLJ7uB/FAXrgweqEsMUxkjB4CXfTcOA4KPiCNpIosw8TKQH6R8VUqRIbWGCui EDavFQPrftVw04GBb5fhQQUYsj3Av9GdGTgbFXSd2T2gpbu0SzYA5UaD0xC4GbGz79zM XyxUIKoKJTdWkCFQVmEklGLvibHN1eg4dLhTqqGf4uSKFt3YLMZKfOnQ0SsH5yrys+ym lbQg== X-Received: by 10.180.219.66 with SMTP id pm2mr1232811wic.60.1392369330766; Fri, 14 Feb 2014 01:15:30 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id h13sm11128747wjr.22.2014.02.14.01.15.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 01:15:30 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org, Austin Clements Subject: [WIP Patch 3/7] emacs: tag: add customize for deleted/added tag formats Date: Fri, 14 Feb 2014 09:15:15 +0000 Message-Id: <1392369319-24508-4-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:40 -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 | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index f987291..add60a3 100644 --- a/emacs/notmuch-tag.el +++ b/emacs/notmuch-tag.el @@ -106,6 +106,39 @@ with images." :set (lambda (var val) (set-default var val) (notmuch-tag-clear-cache)) :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 + :set (lambda (var val) (set-default var val) (notmuch-tag-clear-cache)) + :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 + :set (lambda (var val) (set-default var val) (notmuch-tag-clear-cache)) + :type 'notmuch-tag-format-type) + (defun notmuch-tag-format-image-data (tag data) "Replace TAG with image DATA, if available. -- 1.7.9.1