org-brain icon indicating copy to clipboard operation
org-brain copied to clipboard

Add org-brain category color feature

Open tumashu opened this issue 4 years ago • 10 comments

截图_2020-07-27_11-01-53

Hello:

I want to let different entries have different color, so I add org-brain group (maybe other name) feature. any suggestion?

tumashu avatar Jul 27 '20 03:07 tumashu

I could see a use-case for this if you want different faces for different topics or similar. Maybe though instead of creating a new org-brain-group thing we could use the built-in org-mode category feature? org-brain already supports adding icons depending on category.

Kungsgeten avatar Jul 27 '20 08:07 Kungsgeten

截图_2020-07-27_16-20-41

tumashu avatar Jul 27 '20 08:07 tumashu

Maybe though instead of creating a new org-brain-group thing we could use the built-in org-mode category feature

The category has a problem, it is hard code inheritance, can it be controled by org-use-property-inheritance ?

Org mode has a few properties for which inheritance is hard-coded, at least for the special applications for which they are used:

CATEGORY

    For agenda view, a category set through a ‘CATEGORY’ property applies to the entire subtree.

tumashu avatar Jul 27 '20 08:07 tumashu

I don't know, but isn't inheritance usually what you want in this case? To me it seems a bit confusing if there's one thing called a "category" and another called a "group". I the only purpose of the group feature is to add colors, then maybe it should be named accordingly (like "color props" or something similar).

Kungsgeten avatar Jul 27 '20 08:07 Kungsgeten

to me it seems a bit confusing if there's one thing called a "category" and another called a "group".

the name "group" is a temp name, for I do not find a better name at the moment :-)

but isn't inheritance usually what you want in this case? 

I will try to test CATEGORY property.

tumashu avatar Jul 27 '20 08:07 tumashu

I have found a way to disable category's inheritance, I will rename group to category

tumashu avatar Jul 27 '20 09:07 tumashu

@Kungsgeten I have rename group to category, please review again, thanks.

tumashu avatar Jul 27 '20 12:07 tumashu

@Kungsgeten ping

tumashu avatar Sep 15 '20 05:09 tumashu

Two more ideas:

  1. obvz is using entries starting with "cls_" as category entries which are only used for selection, thus are not used in any other later visualizations. See its examples on obvz github page.
  2. header tags like :mytag: could be used for coloring, like is done in org-mind-map-write in its .dot export. I like this style as well. So if org-brain could use different faces based on such tags, could be nice. Alone a fixed set of 12 tags would be already better than nothing.

One more extra thought, because related: 3. Different faces could be used for input / output links as well. (Input / output links do not exist in current org-brain yet.)

michaelsjackson avatar Jul 12 '21 14:07 michaelsjackson

How is the coloring caused in above examples?

michaelsjackson avatar Jul 12 '21 14:07 michaelsjackson