help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting org-todo-keyword-faces


From: tomas
Subject: Re: Setting org-todo-keyword-faces
Date: Fri, 11 Dec 2020 22:33:44 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Dec 11, 2020 at 06:10:03PM +0100, daniela-spit@gmx.it wrote:
> I would be grateful to know how I could make the following setup
> more organised.
> 
> (setq org-todo-keyword-faces
>    '(("TODO"        . (:background "black"   :foreground "red"
>                        :weight bold))
>      ("STARTED"     . (:background "black"   :foreground "magenta"
>                        :weight bold))
>      ("WAITING"     . (:background "magenta" :foreground "black"
>                        :weight bold))
>      ("FINALISE"    . (:background "magenta" :foreground "black"
>                        :weight bold))
>      ("DONE"        . (:background "orange"  :foreground "black"
>                        :weight bold))
>      ("CRITICAL"    . (:background "blak"    :foreground "red"
>                        :weight bold))
>      ("CR-STARTED"  . (:background "red"     :foreground "black"
>                        :weight bold))
>      ("CR-WAITING"  . (:background "red"     :foreground "black"
>                        :weight bold))
>      ("CR-FINALISE" . (:background "red"     :foreground "black"
>                        :weight bold))
>      ("CR-DONE"     . (:background "orange"  :foreground "black"

Hm. For me it's tough to understand what you are after. I
get from your other mail that there are two sequences in
there. Their styles aren't "parallel" though.

You want more concise code? The lowest hanging fruit seems
to be the repeated :weight bold, then.

To try to get a hold on possible symmetries, I rearranged
things like so (rows are same background, columns same
foreground):

    | bg \ fg | red      | magenta | black       |
    |---------+----------+---------+-------------|
    | red     |          |         | CR-STARTED  |
    |         |          |         | CR-WAITING  |
    |         |          |         | CR-FINALISE |
    |---------+----------+---------+-------------|
    | magenta |          |         | WAITING     |
    |         |          |         | FINALISE    |
    |---------+----------+---------+-------------|
    | black   | TODO     | STARTED |             |
    |         | CRITICAL |         |             |
    |---------+----------+---------+-------------|
    | orange  |          |         | DONE        |
    |         |          |         | CR-DONE     |

Of the possible 12 combinations, only 5 are used (the diagonal
doesn't make much sense, for obvious reasons). Perhaps name those
five and give them faces? This would depend on whether you're
planning to fill that table more densely or not.

Surely you might make the list more compact with a function
or macro roughly doing

  (sty "black" "magenta") -> '(:background "black" :foreground "magenta"
                               :weight bold)

...but I don't know whether you're after this, either.

In a nutshell, I'm not sure about what you're up to.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]