Christian Moe <[email protected]> writes:

>
> Great working example!
>

Thanks :)

>
> Note that the included documents include.org and include2.org will also
> be published with the publishing configuration in your MWE, which is
> unlikely to be the intention IRL, since they only store macros. You
> could add `:exclude "include"' to the publishing-project definition to
> exclude them, and publish test.org with no error messages.
>

Ah, of course! I changed the publishing setup to exclude exporting the include 
files like so:

,----
| (setq org-publish-project-alist
|       '(("myproject"
|       :base-directory "~/tmp/myproject/"
|       :publishing-function org-html-publish-to-html
|       :publishing-directory "~/tmp/myproject"
|       :exclude "include.*\.org")))
`----

Then it works perfectly with the lines in my MWE uncommented. So the problem
with my MWE was not from when it was exporting test.org, but that it was also 
exporting the include files when it should not have been. Looking in my test 
directory, I see include.html and include2.html which should have been the 
clue. Oh well.

And yes, of course when I directly export the include files I see the error as 
expected, since as you say, they do not see the macros defined at higher levels 
which are not included.

Thanks for clearing that up for me!

I'm not sure if the original question had the same error as my MWE though. 
Hopefully this resolves their issue too.

Cheers,
Paul.

Reply via email to