unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* emacs: Customize how each tag is displayed
@ 2013-01-18 16:03 Damien Cassou
  2013-01-18 16:03 ` [PATCH 1/4] emacs: Add notmuch-intersperse to notmuch-lib/ Damien Cassou
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Damien Cassou @ 2013-01-18 16:03 UTC (permalink / raw)
  To: notmuch mailing list

[PATCH 1/4] emacs: Add notmuch-intersperse to notmuch-lib/
[PATCH 2/4] emacs: pictures that might be used as icons for tags
[PATCH 3/4] emacs: possibility to customize the rendering of tags
[PATCH 4/4] emacs: provide convenience functions for notmuch-tagger


These patches are the first of an upcoming series whose goal is to
integrate notmuch-labeler into notmuch. See the following for more
details: https://github.com/DamienCassou/notmuch-labeler

Points of discussion:

- This series does not have any unit-test to make it smaller and more
  amenable to comments. I will send a patch when requested.

- Patch 3/4 formats tags as mode-line templates so that we can show
  tags in the header-line in a later series.

- Patch 3/4 introduces `notmuch-tagger-formats', a list of pairs (KEY
  FORMAT) to format a tag matching KEY using a special format.
  Currently, an example of such a list is:

    (("unread"
         (:propertize "unread" face
                      (:foreground "red")))
     ("flagged"
         (:propertize "flagged" display
                      (image :type svg
                             :file ,(notmuch-tagger-image-path "star.svg")
                             :ascent center :mask heuristic))))

  to set the unread tag to be red and the flagged tag to have a star
  picture attached. Because this variable is hard to edit without
  making mistakes, patch 4/4 introduces customization functions that
  the user can call on their init.el file like this:

  (notmuch-tagger-propertize "unread" :foreground "red")
  (notmuch-tagger-image-star "flagged")

  Nevertheless, implementing a customize interface for this variable
  is difficult as Emacs does not provide customization widgets for
  text-property lists. A possible solution could be to change the list
  value so that it looks like:

    (("unread" (propertize :foreground "red"))
     ("flagged" (image-star)))

  where the FORMAT part of each pair would be the suffix of a
  notmuch-tagger customization function name (as introduced by patch
  4/4) and the rest would be parameters to pass to this function
  (except the KEY parameter that is already in each pair of the
  `notmuch-tagger-formats' list). This solution would be more amenable
  to the customization interface, but maybe less powerful.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-23  2:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 16:03 emacs: Customize how each tag is displayed Damien Cassou
2013-01-18 16:03 ` [PATCH 1/4] emacs: Add notmuch-intersperse to notmuch-lib/ Damien Cassou
2013-01-18 16:03 ` [PATCH 2/4] emacs: pictures that might be used as icons for tags Damien Cassou
2013-01-18 16:03 ` [PATCH 3/4] emacs: possibility to customize the rendering of tags Damien Cassou
2013-01-23  0:17   ` Austin Clements
2013-01-23  2:15     ` Tomi Ollila
2013-01-18 16:03 ` [PATCH 4/4] emacs: provide convenience functions for notmuch-tagger configuration Damien Cassou
2013-01-23  0:24 ` emacs: Customize how each tag is displayed Austin Clements

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).