emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Reference cannot be resolved without publishing


From: Nicolas Goaziou
Subject: Re: [O] Reference cannot be resolved without publishing
Date: Sat, 12 Dec 2015 10:01:18 +0100

Hello,

Alan Schmitt <address@hidden> writes:

> I have the following files I want to export to html:
>
> common.org:
> #+TITLE: Unison Binaries
> #+OPTIONS: toc:nil num:nil
> #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style.css" />
>
> * sidebar
>   :PROPERTIES:
>   :CUSTOM_ID: sidebar
>   :HTML_CONTAINER_CLASS: container-sidebar
>   :END:
>
> - [[file:index.org::#OSX][Mac OS X]]
>
> index.org (extract)
> #+INCLUDE: "common.org"
>
> * body
>   :PROPERTIES:
>   :CUSTOM_ID: mainbody
>   :HTML_CONTAINER_CLASS: container-mainbody
>   :END:
>
> ** Unison Binaries
>
> *** Mac OS X
>     :PROPERTIES:
>     :CUSTOM_ID: OSX
>     :END:
>
> When I try to export index.org to index.html, I get:
>
> Reference "#OSX" in file "index.org" cannot be resolved without
> publishing
>
> What does it mean? And why can't the reference be resolved? Should I not
> use CUSTOM_ID for relative links?

Usually, Org cannot resolve an external link if it doesn't know about
the external file, i.e., if it doesn't publish it.

HTML export is a special case because resolving custom-id links is
trivial (the back-end doesn't alter them). So I guess we can use that to
make it work in this special case, even though it will fail in other
back-ends.

I pushed the change in master. Let me know if it works for you.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]