Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-10 Thread Eric S Fraga
(Nicolas, forgot to send this to the list so apologies if you get this twice) On Thursday, 8 Jun 2017 at 12:36, Nicolas Goaziou wrote: > Macros are expanded prior to Babel code evaluation—they can make nice > shortcuts for long Babel calls—so they have to obey to the same rules as > Babel code

Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-08 Thread Nicolas Goaziou
Hello, Eric S Fraga writes: > I do wonder, philosophically, about the use cases for macro expansion > and the resulting implementation. My understanding is that macros are > only for export so should they not pay attention to export exclusion > directives? Macros are

Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-08 Thread Eric S Fraga
On Wednesday, 7 Jun 2017 at 19:56, Nicolas Goaziou wrote: [...] > What about simply removing macros in :noexport: trees from > a pre-processing-hook? Hi Nicolas, Thanks for the suggestion. It makes sense but the problem (for me) is the "simply" in the above. ;-) But Charles's solution works

Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-08 Thread Eric S Fraga
On Wednesday, 7 Jun 2017 at 18:43, Charles C. Berry wrote: [...] > Maybe implement somethng like this: > > #+BEGIN_SRC emacs-lisp >(defun n-noexport (x y) > (let ((tags (nth 5 (org-heading-components >(unless (and tags > (string-match ":noexport:" tags)) >

Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-07 Thread Nicolas Goaziou
Hello, "Charles C. Berry" writes: > Maybe implement somethng like this: > > #+BEGIN_SRC emacs-lisp >(defun n-noexport (x y) > (let ((tags (nth 5 (org-heading-components >(unless (and tags > (string-match ":noexport:" tags)) >

Re: [O] order of evaluation upon export: macros are evaluated too soon

2017-06-07 Thread Charles C. Berry
On Wed, 7 Jun 2017, Eric S Fraga wrote: Hello all, I have a document with this (ECM) structure: #+begin_src org ,#+macro: item I{{{n(i)}}}@@latex:}%@@ ,#+options: toc:nil num:nil ,* {{{item()}}} Some topic ,* {{{item()}}} Another topic :noexport: ,*