alphapapa / org-super-agenda

Supercharge your Org daily/weekly agenda by grouping items
GNU General Public License v3.0
1.33k stars 107 forks source link

Customize group name ? #229

Open deb75 opened 1 year ago

deb75 commented 1 year ago

Hi,

I would like to customize the name of each group. By default, it just appears in bold characters, is it possible to propertize it : modifying the background/foreground colors, font weight and sizes, underlying ?

I noticed the :face keyword which does this but only to the group body, not its header, as far as I understand.

Regards

alphapapa commented 1 year ago

Hello,

If you use M-x customize-group RET org-super-agenda RET you can find the face that can be customized.

deb75 commented 1 year ago

Thanks, got it.

However, I guess it would set the face for all group names, is there a way to set the header face on a per group basis ? like :face does for the group body.

alphapapa commented 1 year ago

As you can see in the documentation, the group :name is a string, so you may propertize it as you wish.

deb75 commented 1 year ago

Hi,

I tried to replace :name "mygroup" with :name (propertize "mygroup" 'face '(:height 1.2)) but I got the error :

org-super-agenda--group-items: Wrong type argument: buffer-or-string-p, `(propertize "mygroup" 'face '(:height 1.2))

I guess the issue is that the function call (propertize) is not replaced by its result. Excuse my poor elisp knowledge but, how can I do this ?

Regards

alphapapa commented 1 year ago

You will need to make sure the propertize form is evaluated and its value placed into the list. Please see (info "(elisp)Backquote"). If you need more help with Elisp, please ask in an appropriate forum or chat room.

deb75 commented 1 year ago

Yes, it is now evaluated, the string appears but it is not propertized, it seems the properties are overwritten by the org-super-agenda-header face.

alphapapa commented 9 months ago

Yes, it is now evaluated, the string appears but it is not propertized, it seems the properties are overwritten by the org-super-agenda-header face.

Ok, we'll need to apply the faces differently then. I probably won't get to this anytime soon, so patches welcome. Thanks.