Re: [O] Help resolving CUSTOM_ID based links that point to outside current subtree scope

2017-08-01 Thread Nicolas Goaziou
Kaushal Modi writes: > Also, I am working on implementing this in an exporter backend. So what > would be the canonical way to do that in ox-foo.el? I think I would do something like this: in a parse tree filter, find every custom ID link then expand current buffer, find real destination, and re

Re: [O] Help resolving CUSTOM_ID based links that point to outside current subtree scope

2017-08-01 Thread Kaushal Modi
On Tue, Aug 1, 2017, 4:26 AM Nicolas Goaziou wrote: > > I guess you could write a function that changes custom ID links into > external links prior to export, e.g., within > `org-export-before-parsing-hook'. > If I understand correctly, it would mean replacing "[[#link]]" with "[[./current-file

Re: [O] Help resolving CUSTOM_ID based links that point to outside current subtree scope

2017-08-01 Thread Nicolas Goaziou
Hello, Kaushal Modi writes: > Ah! I made a typo in the example above; here's the corrected one: > > * 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 > :E

Re: [O] Help resolving CUSTOM_ID based links that point to outside current subtree scope

2017-07-28 Thread Kaushal Modi
Ah! I made a typo in the example above; here's the corrected one: * 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: ("Link source" and "Link dest" subtrees are at th

[O] Help resolving CUSTOM_ID based links that point to outside current subtree scope

2017-07-28 Thread Kaushal Modi
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 :PROPER