1 Return-Path: <damien.cassou@gmail.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id D29B2431FBD
\r
6 for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:13 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id gfIKWmw5BCIc for <notmuch@notmuchmail.org>;
\r
17 Fri, 18 Jan 2013 08:04:13 -0800 (PST)
\r
18 Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com
\r
19 [209.85.212.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 1C355431FBF
\r
22 for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:12 -0800 (PST)
\r
23 Received: by mail-wi0-f177.google.com with SMTP id hm2so3161599wib.16
\r
24 for <notmuch@notmuchmail.org>; Fri, 18 Jan 2013 08:04:12 -0800 (PST)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=x-received:from:to:subject:date:message-id:x-mailer;
\r
27 bh=oD39k+oHPwLuX7NeBGvunHXOQ7KRBsL2ELeoOt87vXA=;
\r
28 b=05ljllL8qjSzEAsJvd0Sy94MErhRllw/qpAjPCJamxMrCCjRZkE+sbQHxlYnfCKJwO
\r
29 WIbv4RYQBpW1emHHKrddptiDVQJEbbKfDzKxDKfffY/MFhr2xl+G2T5x93oqlOB9VU3r
\r
30 Nm6fZEYb3g982+FYHjraBeYEGLyBZeWgm4gnrW1GghrEj4lUP397hwlJlwo3ri28Iq8x
\r
31 k5hYJLrg+VPyN4i+C+QOE5JJqSi+uWWHv5XJSOXlyfgXzyb1um8rjFcEkhPjO4uFSzU5
\r
32 ZR/ErrWY4cwWuFOq+EkeNqmFT8AgkXx/oDs1lwbUlkCP9SVPGO7uuZjz37ZSkE5UrNyp
\r
34 X-Received: by 10.194.143.35 with SMTP id sb3mr15063156wjb.30.1358525051726;
\r
35 Fri, 18 Jan 2013 08:04:11 -0800 (PST)
\r
36 Received: from luz3.lille.inria.fr ([193.51.236.44])
\r
37 by mx.google.com with ESMTPS id i2sm4073866wiw.3.2013.01.18.08.04.10
\r
38 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
\r
39 Fri, 18 Jan 2013 08:04:10 -0800 (PST)
\r
40 From: Damien Cassou <damien.cassou@gmail.com>
\r
41 To: notmuch mailing list <notmuch@notmuchmail.org>
\r
42 Subject: emacs: Customize how each tag is displayed
\r
43 Date: Fri, 18 Jan 2013 17:03:54 +0100
\r
44 Message-Id: <1358525039-13569-1-git-send-email-damien.cassou@gmail.com>
\r
45 X-Mailer: git-send-email 1.7.10.4
\r
46 X-BeenThere: notmuch@notmuchmail.org
\r
47 X-Mailman-Version: 2.1.13
\r
49 List-Id: "Use and development of the notmuch mail system."
\r
50 <notmuch.notmuchmail.org>
\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
54 List-Post: <mailto:notmuch@notmuchmail.org>
\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
58 X-List-Received-Date: Fri, 18 Jan 2013 16:04:14 -0000
\r
60 [PATCH 1/4] emacs: Add notmuch-intersperse to notmuch-lib/
\r
61 [PATCH 2/4] emacs: pictures that might be used as icons for tags
\r
62 [PATCH 3/4] emacs: possibility to customize the rendering of tags
\r
63 [PATCH 4/4] emacs: provide convenience functions for notmuch-tagger
\r
66 These patches are the first of an upcoming series whose goal is to
\r
67 integrate notmuch-labeler into notmuch. See the following for more
\r
68 details: https://github.com/DamienCassou/notmuch-labeler
\r
70 Points of discussion:
\r
72 - This series does not have any unit-test to make it smaller and more
\r
73 amenable to comments. I will send a patch when requested.
\r
75 - Patch 3/4 formats tags as mode-line templates so that we can show
\r
76 tags in the header-line in a later series.
\r
78 - Patch 3/4 introduces `notmuch-tagger-formats', a list of pairs (KEY
\r
79 FORMAT) to format a tag matching KEY using a special format.
\r
80 Currently, an example of such a list is:
\r
83 (:propertize "unread" face
\r
84 (:foreground "red")))
\r
86 (:propertize "flagged" display
\r
88 :file ,(notmuch-tagger-image-path "star.svg")
\r
89 :ascent center :mask heuristic))))
\r
91 to set the unread tag to be red and the flagged tag to have a star
\r
92 picture attached. Because this variable is hard to edit without
\r
93 making mistakes, patch 4/4 introduces customization functions that
\r
94 the user can call on their init.el file like this:
\r
96 (notmuch-tagger-propertize "unread" :foreground "red")
\r
97 (notmuch-tagger-image-star "flagged")
\r
99 Nevertheless, implementing a customize interface for this variable
\r
100 is difficult as Emacs does not provide customization widgets for
\r
101 text-property lists. A possible solution could be to change the list
\r
102 value so that it looks like:
\r
104 (("unread" (propertize :foreground "red"))
\r
105 ("flagged" (image-star)))
\r
107 where the FORMAT part of each pair would be the suffix of a
\r
108 notmuch-tagger customization function name (as introduced by patch
\r
109 4/4) and the rest would be parameters to pass to this function
\r
110 (except the KEY parameter that is already in each pair of the
\r
111 `notmuch-tagger-formats' list). This solution would be more amenable
\r
112 to the customization interface, but maybe less powerful.
\r