emacs-orgmode
[Top][All Lists]
Advanced

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

[O] overlay showing computed value of macro?


From: Matt Price
Subject: [O] overlay showing computed value of macro?
Date: Thu, 22 Nov 2018 13:19:05 -0500

I use macros in my course syllabi to automate creation of timestamps It looksl ike this:

# see bottom of this email for the defn of ~get-ts~
#+MACRO: ts (eval (get-ts+7))


** Week {{{n}}} ({{{ts}}}): Time Scales in Rivers, Geology, and Human Relationships
* Week {{{n}}} ({{{ts}}}): +READING WEEK: NO CLASS
** Week {{{n}}} ({{{ts}}}): Communities, States, and Water Governance

This makes it much easier for me to re-arrange headings while I'm planning schedules.  But it's a little hard to tell, for instance, if I have the right number of class meetings, or if the University holidays are in the right place, etc. 

It would be nice for me to overlay the macro invocations with the values that they will evaluate to on export. I guess I would have to figure out when to trigger recalculation of the values (maybe not too often, say only when the macro is first created, when it's edited or deleted/deformed, and perhaps on structure editing.  

I do not understand emacs overlays very well so this feels a little daunting to me.  Does anyone out there have ideas about how to do it effectively?

Thanks as always!


reply via email to

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