[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Feature request: Allow export to convert broken links to plain t
Re: [O] Feature request: Allow export to convert broken links to plain text
Sun, 13 Jan 2019 22:34:18 +0000
> On Jan 13, 2019, at 1:33 PM, Ryan Thompson <address@hidden> wrote:
> This sounds like a good idea, but unfortunately it seems that the
> `broken-links:mark' option doesn't preserve the text of the link. In fact,
> looking at the source, the code that handles broken link errors doesn't even
> have access to the link's text, only the link target, so it's already too
> late once the org-link-broken signal is thrown. This also means that the
> implementation I was considering won't work.
> So, it looks like I need to intercept execution earlier in the export
> process. Any ideas on how to do that?
Looks like your original idea to revise `org-export-data' might be best.
IIUC, you need to add the link text to the SIGNAL-DATA in each of the places
where `org-export-resolve-*-link' functions call `signal', then modify
`org-export-data' to ignore the addition for `mark' and add it back for your
new `mark-with-text' option.