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

Apply face transformation to item only if cheduled #243

Open deb75 opened 1 year ago

deb75 commented 1 year ago

Hi,

I would like to apply a face transformation to a task, but only when this one is scheduled; so that I can easily figure out which task has been scheduled or not.

I know one can apply face transformations, but I do not know if it can be conditioned by the existence of a schedule like :

* TODO [#A] mytodo
   [10:00-12:00 2023-04-14]  

Would it be possible to perform this with the current implementation of org-super-agenda ?

Regards

alphapapa commented 1 year ago

Hi,

You could use the :transformer selector to do so. You would need to use a function that checks whether the item is scheduled and applies a face if so.

deb75 commented 1 year ago

I tried to do that with :

(org-get-scheduled-time (point))

this works, but I do not know how to do it from an item.

alphapapa commented 1 year ago

I'd suggest studying the source code, e.g. https://github.com/alphapapa/org-super-agenda/blob/f4f528985397c833c870967884b013cf91a1da4a/org-super-agenda.el#L504