From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: Reference cannot be resolved without publishing Date: Mon, 14 Dec 2015 13:01:54 +0100 Message-ID: References: <87d1uc11nl.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8RpF-0002lW-Ln for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 07:01:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8RpC-0006if-FO for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 07:01:57 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:48479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8RpC-0006iG-9V for emacs-orgmode@gnu.org; Mon, 14 Dec 2015 07:01:54 -0500 In-Reply-To: <87d1uc11nl.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Sat, 12 Dec 2015 10:01:18 +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: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Nicolas, On 2015-12-12 10:01, Nicolas Goaziou writes: > 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. I see. > 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. It almost works: the generated html uses two '#' instead of one:
  • Mac OS X
  • Should I remove the '#' from the link? Thanks a lot, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO=E2=82=82 (Updated December 13, 2015, Mauna Loa Obs.): 401.3= 1 ppm --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWbq+yAAoJEAQNCjtO0uXH3WgIALF55ZRGbHTYJErJI68eJf+Q y7SSuHEiPxhcEdKcf/6zjCljKKExZK3XS89bV587c0k+LFuxNjTl+K5CO9tUlnTj v+pON1BI9RR3ummQW/fh9990BCJhL1jFjL5DQTR7HkxCJLFcJnWRL6G0he1y3+j3 xa+paI6hFPfWM7X25DeJf/QT0shR+DtnByTigny8H5JJOAO1Y0ksJN+qG9K56+DL proD95p993aa2zlRsV41GjiTX0aOBc/MLzFHo6z0rgXPbnmZqtQ9j8uHDbWhixEt vqaGYmb+2SxGM5dcRwizLpF5/K5c82k+CvOFWEx21MPnZ/8r6AicDyw9xgHFDNQ= =+0D0 -----END PGP SIGNATURE----- --=-=-=--