--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 58F50431FBC\r
+ for <notmuch@notmuchmail.org>; Sat, 22 Mar 2014 00:47:52 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id LwvCwlMdCfhz for <notmuch@notmuchmail.org>;\r
+ Sat, 22 Mar 2014 00:47:48 -0700 (PDT)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 01D1A431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 22 Mar 2014 00:47:47 -0700 (PDT)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1WRGeb-00039i-Fd; Sat, 22 Mar 2014 07:47:41 +0000\r
+Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1WRGea-0004OQ-SI; Sat, 22 Mar 2014 07:47:41 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Austin Clements <amdragon@MIT.EDU>\r
+Subject: Re: [Patch v3 4/8] emacs: tag: add customize for deleted/added tag\r
+ formats\r
+In-Reply-To: <20140322021609.GB31187@mit.edu>\r
+References: <1394597397-8486-1-git-send-email-markwalters1009@gmail.com>\r
+ <1394597397-8486-5-git-send-email-markwalters1009@gmail.com>\r
+ <20140322021609.GB31187@mit.edu>\r
+User-Agent: Notmuch/0.15.2+615~g78e3a93 (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sat, 22 Mar 2014 07:47:39 +0000\r
+Message-ID: <87ior6oesk.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 93.97.24.31\r
+X-QM-Geographic: According to ripencc,\r
+ this message was delivered by a machine in Britain (UK) (GB).\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 033e6cf192a41b6134c9b330e4d76b83 (of first 20000 bytes)\r
+X-SpamAssassin-Score: 0.0\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored 0.0 points. Summary of the scoring: \r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
+ * domain\r
+ * 0.0 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 22 Mar 2014 07:47:52 -0000\r
+\r
+\r
+Hi\r
+\r
+Many thanks for the review.\r
+\r
+On Sat, 22 Mar 2014, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> Quoth Mark Walters on Mar 12 at 4:09 am:\r
+>> Add customize options for deleted/added tag formats. These are not\r
+>> used yet but will be later in the series.\r
+>> \r
+>> We switch to using `notmuch-apply-face' rather than `propertize' in\r
+>> the defcustom for faces so that the faces for deleted/added tags add\r
+>> to the default face attributes for the tag.\r
+>> \r
+>> We special case deleting the unread tag as that tag is a strong visual\r
+>> cue and we don't need that cue when we are just saying it used to be\r
+>> unread. Thus, we revert to the normal tag face with strikethough for\r
+>> deleted unread tags.\r
+>> ---\r
+>> emacs/notmuch-tag.el | 37 ++++++++++++++++++++++++++++++++++++-\r
+>> 1 files changed, 36 insertions(+), 1 deletions(-)\r
+>> \r
+>> diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el\r
+>> index a4dea39..4698856 100644\r
+>> --- a/emacs/notmuch-tag.el\r
+>> +++ b/emacs/notmuch-tag.el\r
+>> @@ -39,7 +39,7 @@ (define-widget 'notmuch-tag-format-type 'lazy\r
+>> (string :tag "Display as")\r
+>> (list :tag "Face" :extra-offset -4\r
+>> (const :format "" :inline t\r
+>> - (propertize tag 'face))\r
+>> + (notmuch-apply-face tag))\r
+>> (list :format "%v"\r
+>> (const :format "" quote)\r
+>> custom-face-edit))\r
+>> @@ -89,6 +89,41 @@ (defcustom notmuch-tag-formats\r
+>> :group 'notmuch-show\r
+>> :type 'notmuch-tag-format-type)\r
+>> \r
+>> +(defcustom notmuch-tag-deleted-formats\r
+>> + '(("unread" (notmuch-apply-face "unread"\r
+>> + (if (display-supports-face-attributes-p '(:strike-through "red"))\r
+>> + '(:strike-through "red")\r
+>> + '(:inverse-video t))))\r
+>> + (".*" (notmuch-apply-face tag\r
+>> + (if (display-supports-face-attributes-p '(:strike-through "red"))\r
+>> + '(:strike-through "red")\r
+>> + '(:inverse-video t)))))\r
+>\r
+> Aren't the two formatters above the same thing? Is this somehow\r
+> different from just having the .* formatter? The indentation also\r
+> seems a little odd, though that may just be the diff.\r
+\r
+These are not the same because these functions apply to tag which is the\r
+partially formatted tag, not tag itself. Thus the latter applies the\r
+above formatting to the string "unread" rather than `tag' which would be\r
+the string unread with previous formatting applied.\r
+\r
+It might be nice to change the name in the function so a formatter has\r
+access to tag and formatted-tag but that would break people's existing\r
+formats.\r
+\r
+>\r
+>> + "Custom formats for tags when deleted.\r
+>> +\r
+>> +For deleted tags the formats in `notmuch-tag-formats` are applied\r
+>> +first and then these formats are applied on top.\r
+>> +\r
+>> +By default this shows deleted tags with strike-through in red,\r
+>> +unless strike-through is not available (e.g., emacs is running in\r
+>> +a terminal) in which case it uses inverse video. To hide deleted\r
+>> +tags completely set this to\r
+>> + '((\".*\" nil))\r
+>> +\r
+>> +See `notmuch-tag-formats' for full documentation."\r
+>> + :group 'notmuch-show\r
+>> + :type 'notmuch-tag-format-type)\r
+>> +\r
+>> +(defcustom notmuch-tag-added-formats\r
+>> + '((".*" (notmuch-apply-face tag '(:underline "green"))))\r
+>> + "Custom formats for tags when added.\r
+>> +\r
+>> +For added tags the formats in `notmuch-tag-formats` are applied\r
+>> +first and then these formats are applied on top.\r
+>\r
+> Maybe add\r
+>\r
+> To disable special formatting of added tags, set this to ().\r
+>\r
+> to parallel notmuch-tag-deleted-formats?\r
+\r
+Yes this is a good point as it is not obvious what the correct form is\r
+as it is different from the deleted case (here we want to apply no\r
+further formatting to the tag so it shows as normal, there we wanted to\r
+hide the tag)\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+\r
+>\r
+>> +\r
+>> +See `notmuch-tag-formats' for full documentation."\r
+>> + :group 'notmuch-show\r
+>> + :type 'notmuch-tag-format-type)\r
+>> +\r
+>> (defun notmuch-tag-format-image-data (tag data)\r
+>> "Replace TAG with image DATA, if available.\r
+>> \r