From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Reference cannot be resolved without publishing Date: Sat, 12 Dec 2015 10:01:18 +0100 Message-ID: <87d1uc11nl.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7g1Y-0006SE-1J for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 03:59:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a7g1W-0005r3-Se for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 03:59:27 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:46906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a7g1W-0005qy-LU for emacs-orgmode@gnu.org; Sat, 12 Dec 2015 03:59:26 -0500 In-Reply-To: (Alan Schmitt's message of "Fri, 11 Dec 2015 08:36:55 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: emacs-orgmode Hello, Alan Schmitt writes: > I have the following files I want to export to html: > > common.org: > #+TITLE: Unison Binaries > #+OPTIONS: toc:nil num:nil > #+HTML_HEAD: > > * 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