[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] order of evaluation upon export: macros are evaluated too soon
From: |
Nicolas Goaziou |
Subject: |
Re: [O] order of evaluation upon export: macros are evaluated too soon |
Date: |
Wed, 07 Jun 2017 21:56:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Hello,
"Charles C. Berry" <address@hidden> 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))
> (org-macro--counter-increment x y))))
> #+END_SRC
>
> #+MACRO: n2 (eval (n-noexport "$1" "$2"))
>
> * heading 1
>
> {{{n2()}}}
>
>
> * heading 2 :noexport:notever:
>
> {{{n2()}}}
>
> * heading 3
> {{{n2()}}}
>
What about simply removing macros in :noexport: trees from
a pre-processing-hook?
Regards,
--
Nicolas Goaziou
Message not available