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

Is it possible to reuse blocks of org-super-agenda settings? #246

Open max6166 opened 11 months ago

max6166 commented 11 months ago

I have many different agenda views based which implement org-super-agenda. There are many agenda sections of settings which are common to more than one agenda view.

Currently, when I change one of these sections, I have to manually search for every instance of that section and manually update it with the new change.

I'm pretty certain that a better way exists where I can just define a section once and share those settings across different agendas. Unfortunately, I have been studying elisp and realize it will be a while before I will know enough to come up with my own solution.

Any pointers would be greatly appreciated. Perhaps other users would find this info useful as well.

alphapapa commented 11 months ago

Hello,

Certainly, the org-super-agenda-groups variable is just a sexp, which can be composed from other parts like any other. I'd recommend looking at the Elisp manual, especially the section on backquoting and splicing. That should teach you how to compose a list from multiple other lists. Then you could put common parts of the list into a variable and splice that into the appropriate places.