* #+include: with ``adjustable'' path (separately defined, like macro expansion)
@ 2015-11-14 7:31 Martin Steffen
2015-11-14 8:34 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Martin Steffen @ 2015-11-14 7:31 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I'd like to achieve something like the following (which does not work)
#+MACRO: custompath ~/some/place/where/the/code/resides
#+include: "{{{custompath}}}src/example.code"
Macro-expansion generally works, but not in those circumstances. I also
seens that there's the
#+LINK: customurl
which conceptually does such macro expansion but it seems intended for
linking in stuff, not for "embedding" pieces of code.
Is there a way to achieve what I want, which I overlooked?
Thanks, Martin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: #+include: with ``adjustable'' path (separately defined, like macro expansion)
2015-11-14 7:31 #+include: with ``adjustable'' path (separately defined, like macro expansion) Martin Steffen
@ 2015-11-14 8:34 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2015-11-14 8:34 UTC (permalink / raw)
To: Martin Steffen; +Cc: emacs-orgmode
Hello,
Martin Steffen <msteffen@ifi.uio.no> writes:
> I'd like to achieve something like the following (which does not work)
>
> #+MACRO: custompath ~/some/place/where/the/code/resides
> #+include: "{{{custompath}}}src/example.code"
>
> Macro-expansion generally works, but not in those circumstances.
I think the manual is pretty clear about the locations where macros are
expected to work. In this case, as you noticed, they won't.
> Is there a way to achieve what I want, which I overlooked?
You can expand such INCLUDE keyword using some markup of your own and
a function within `org-export-before-processing-hook'. However, it will
not work for nested INCLUDE keywords.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-14 8:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-14 7:31 #+include: with ``adjustable'' path (separately defined, like macro expansion) Martin Steffen
2015-11-14 8:34 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.