From 92819729c24a660a6f1b6e91bf72d8b6965b5e51 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 11 Mar 2014 22:37:14 +2000 Subject: [PATCH] Re: [PATCH v2 3/7] emacs: tag: add customize for deleted/added tag formats --- 86/25c9a8525e03c37e2f3ff76b7b527b7b62ece9 | 147 ++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 86/25c9a8525e03c37e2f3ff76b7b527b7b62ece9 diff --git a/86/25c9a8525e03c37e2f3ff76b7b527b7b62ece9 b/86/25c9a8525e03c37e2f3ff76b7b527b7b62ece9 new file mode 100644 index 000000000..7a9d742e1 --- /dev/null +++ b/86/25c9a8525e03c37e2f3ff76b7b527b7b62ece9 @@ -0,0 +1,147 @@ +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 83762431FBD + for ; Mon, 10 Mar 2014 19:37:23 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 9lwvAK3KhCoO for ; + Mon, 10 Mar 2014 19:37:18 -0700 (PDT) +Received: from dmz-mailsec-scanner-8.mit.edu (dmz-mailsec-scanner-8.mit.edu + [18.7.68.37]) + (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5E72E431FBC + for ; Mon, 10 Mar 2014 19:37:18 -0700 (PDT) +X-AuditID: 12074425-f79906d000000cf9-6b-531e76dd9f00 +Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) + (using TLS with cipher AES256-SHA (256/256 bits)) + (Client did not present a certificate) + by dmz-mailsec-scanner-8.mit.edu (Symantec Messaging Gateway) with SMTP + id 26.51.03321.DD67E135; Mon, 10 Mar 2014 22:37:17 -0400 (EDT) +Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) + by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s2B2bGuX005856; + Mon, 10 Mar 2014 22:37:17 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s2B2bFwE018144 + (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); + Mon, 10 Mar 2014 22:37:16 -0400 +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80) + (envelope-from ) + id 1WNCZ8-0008SN-UJ; Mon, 10 Mar 2014 22:37:14 -0400 +From: Austin Clements +To: Mark Walters , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 3/7] emacs: tag: add customize for deleted/added tag + formats +In-Reply-To: <1392841212-8494-4-git-send-email-markwalters1009@gmail.com> +References: <1392841212-8494-1-git-send-email-markwalters1009@gmail.com> + <1392841212-8494-4-git-send-email-markwalters1009@gmail.com> +User-Agent: Notmuch/0.17~rc2+14~g06f47e0 (http://notmuchmail.org) Emacs/23.4.1 + (i486-pc-linux-gnu) +Date: Mon, 10 Mar 2014 22:37:14 -0400 +Message-ID: <8761nl31gl.fsf@awakening.csail.mit.edu> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFrrPIsWRmVeSWpSXmKPExsUixCmqrXu3TC7Y4PxFJYvVc3ksrt+cyezA + 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZdxb85Ol4L1wxYeTrA2MswW6GDk5JARMJM53 + fGGBsMUkLtxbz9bFyMUhJDCbSeLm1JUsEM5GRonT59+wgVQJCZxmkjiwQgwisYRRYtn7E2AJ + NgENiW37lzOC2CICrhJPv31mBrGFBYIltu+9xw5icwp4SrRM6IWa2soocXHCD7BmUYEkidNT + f7N2MXJwsAioSvy/4AwS5gU6r+15JyuELShxcuYTsFOZBbQkbvx7yTSBUWAWktQsJKkFjEyr + GGVTcqt0cxMzc4pTk3WLkxPz8lKLdC30cjNL9FJTSjcxgsKR3UV1B+OEQ0qHGAU4GJV4eAN8 + 5YKFWBPLiitzDzFKcjApifLWlgCF+JLyUyozEosz4otKc1KLDzFKcDArifCetgDK8aYkVlal + FuXDpKQ5WJTEefvOSgQLCaQnlqRmp6YWpBbBZGU4OJQkeMVAhgoWpaanVqRl5pQgpJk4OEGG + 8wANZy0DGV5ckJhbnJkOkT/FqCglzltUCpQQAElklObB9cLSxStGcaBXhHllQNp5gKkGrvsV + 0GAmoMHNx6VABpckIqSkGhg1U0vlV3wM7P9RcZjPMuLM6Qvy1Q6H6laLW0hWPinqOarEXP6a + MfLKdoWDi8+8uuXondu4sHPv7HCRZxqiJ6y+TuE+xOywSObE4doZ/bO2Kp3ZzHiSq1F4p39s + bQCjokn2GTvBlTMlny9SWyD6KNrdkENluVso45dTC/zufZ3mkW67ZK2xwxclluKMREMt5qLi + RACHOsRe8gIAAA== +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: Tue, 11 Mar 2014 02:37:23 -0000 + +On Wed, 19 Feb 2014, Mark Walters wrote: +> 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 + +It occurs to me that `propertize' is problematic here, since it replaces +the face property of the tag wholesale. If we really want this to apply +in addition to a face added by notmuch-tag-formats, I don't think +there's any way to massage things so that `propertize' works (short of +horrible hackery). `notmuch-combine-face-text-property-string' does +exactly what we need here, but maybe needs a shorter name? +`notmuch-apply-face'? Or maybe there's some solution I'm not thinking +of? + +> + (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 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2