Re: [O] overlay showing computed value of macro?

2018-11-23 Thread Eric S Fraga
On Friday, 23 Nov 2018 at 07:49, Matt Price wrote: > ah. no stupid searching backwards through the buffer. just track > everyting in a variable. > > that... is smarter. I hadn't looked to see how it was done but I do know that I can usually learn something from what Nicolas has done! -- Eric S

Re: [O] overlay showing computed value of macro?

2018-11-23 Thread Matt Price
On Fri, Nov 23, 2018 at 4:32 AM Eric S Fraga wrote: > Matt, > > you might like to have a look at how the n() macro was implemented as it > has some similar goals. Check out org-macro-initialize-templates and > org-macro--counter-increment. > ah. no stupid searching backwards through the buffer

Re: [O] overlay showing computed value of macro?

2018-11-23 Thread Eric S Fraga
Matt, you might like to have a look at how the n() macro was implemented as it has some similar goals. Check out org-macro-initialize-templates and org-macro--counter-increment. -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.14-1035-gfeb442

Re: [O] overlay showing computed value of macro?

2018-11-23 Thread Matt Price
OH man, I know this is a lot of replies to my own thread. Sorry for the noise. I just wanted to point out something I somehow failed to see as I was pretending to cook Thanksgiving dinner while working on this project (!!) -- my code does just fine producing overlays, which might be useful to some

Re: [O] overlay showing computed value of macro?

2018-11-22 Thread Matt Price
On Thu, Nov 22, 2018 at 4:06 PM Matt Price wrote: > > > On Thu, Nov 22, 2018 at 1:19 PM Matt Price wrote: > >> 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

Re: [O] overlay showing computed value of macro?

2018-11-22 Thread Matt Price
On Thu, Nov 22, 2018 at 1:19 PM Matt Price wrote: > 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

[O] overlay showing computed value of macro?

2018-11-22 Thread Matt Price
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: