[WIP Patch 3/7] emacs: tag: add customize for deleted/added tag formats

Mark Walters markwalters1009 at gmail.com
Fri Feb 14 01:15:15 PST 2014


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



More information about the notmuch mailing list