From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Help resolving CUSTOM_ID based links that point to outside current subtree scope Date: Fri, 28 Jul 2017 19:17:34 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1142505c386ccc0555658989" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dbAli-00030K-3Q for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 15:17:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dbAlh-0004g8-6x for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 15:17:50 -0400 Received: from mail-lf0-x22f.google.com ([2a00:1450:4010:c07::22f]:38792) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dbAlg-0004ef-V9 for emacs-orgmode@gnu.org; Fri, 28 Jul 2017 15:17:49 -0400 Received: by mail-lf0-x22f.google.com with SMTP id y15so94819895lfd.5 for ; Fri, 28 Jul 2017 12:17:47 -0700 (PDT) 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" To: emacs-org list --001a1142505c386ccc0555658989 Content-Type: text/plain; charset="UTF-8" Hello, Is there a way to make org-export-resolve-id-link look for link resolution outside the current scope? I just threw in a (save-restriction (widen) ..) inside org-export-resolve-id-link, and that of course did not work (and thus this email). Below is a little example: * Link source :PROPERTIES: :EXPORT_FILE_NAME: link-source :END: - Link to [[#link-dest][Link dest]] ** Link dest :PROPERTIES: :EXPORT_FILE_NAME: link-dest :CUSTOM_ID: link-dest :END: - I would like to export just the "Link source" subtree (let's say C-c C-e C-s t A), and have the link resolve to the "link-dest" CUSTOM_ID. - To put this the other way, I want to export just the subtree, but look at the whole buffer for link resolution. I know that does not make sense, but I need that for the Hugo exporter backend. Application: I have one subtree (Hugo post) containing a CUSTOM_ID based internal link to some other subtree (Hugo post), and I want to retain the link reference. Hugo would then figure out the rest. What function could I advice and with what to make this happen? Thanks. -- Kaushal Modi --001a1142505c386ccc0555658989 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

Is there a way to mak= e org-export-resolve-id-link look for link resolution outside the current s= cope?

I just threw in a (save-restriction (widen) = ..) inside org-export-resolve-id-link, and that of course did not work (and= thus this email).

Below is a little example:

* Link source
:PROPERTIES:
:EX= PORT_FILE_NAME: link-source
:END:
- Link to [[#link= -dest][Link dest]]
** Link dest
:PROPERTIES:
= :EXPORT_FILE_NAME: link-dest
:CUSTOM_ID: link-dest
= :END:

- I would like to export just the "Link= source" subtree (let's say C-c C-e C-s t A), and have the link re= solve to the "link-dest" CUSTOM_ID.=C2=A0
- To put this= the other way, I want to export just the subtree, but look at the whole bu= ffer for link resolution.

I know that does not mak= e sense, but I need that for the Hugo exporter backend.=C2=A0
Application: I have one subtree (Hugo post) containing a CUSTOM= _ID based internal link to some other subtree (Hugo post), and I want to re= tain the link reference. Hugo would then figure out the rest.
What function could I advice and with what to make this happen?=

Thanks.
--
=

Kaushal Modi

--001a1142505c386ccc0555658989--