emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Help resolving CUSTOM_ID based links that point to outside current subtree scope
@ 2017-07-28 19:17 Kaushal Modi
  2017-07-28 19:19 ` Kaushal Modi
  0 siblings, 1 reply; 5+ messages in thread
From: Kaushal Modi @ 2017-07-28 19:17 UTC (permalink / raw)
  To: emacs-org list

[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1589 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-01 16:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-28 19:17 Help resolving CUSTOM_ID based links that point to outside current subtree scope Kaushal Modi
2017-07-28 19:19 ` Kaushal Modi
2017-08-01  8:25   ` Nicolas Goaziou
2017-08-01 11:08     ` Kaushal Modi
2017-08-01 16:46       ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).