all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@ucsd.edu>
To: Ryan Thompson <rct@thompsonclan.org>
Cc: Org-Mode List <emacs-orgmode@gnu.org>
Subject: Re: Feature request: Allow export to convert broken links to plain text
Date: Sun, 13 Jan 2019 22:34:18 +0000	[thread overview]
Message-ID: <6C73C452-CA9E-45A0-8529-61BDCDA0B580@ucsd.edu> (raw)
In-Reply-To: <CAHCt_aaQSNcuRoE7jmriabS0ULOsB_wgDKTTHQSFZhNvntAFGw@mail.gmail.com>



> On Jan 13, 2019, at 1:33 PM, Ryan Thompson <rct@thompsonclan.org> wrote:
> 
> Hi,
> 
> 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.

HTH,

Chuck

  reply	other threads:[~2019-01-13 22:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-12 20:38 Feature request: Allow export to convert broken links to plain text Ryan Thompson
2019-01-12 20:42 ` Ryan Thompson
2019-01-13 17:50 ` Berry, Charles
2019-01-13 21:33   ` Ryan Thompson
2019-01-13 22:34     ` Berry, Charles [this message]
2023-09-10  4:13       ` Ryan C. Thompson
2023-09-11 17:12         ` Berry, Charles
  -- strict thread matches above, loose matches on Subject: below --
2023-04-13 22:55 Janek Fischer
2023-04-15  6:50 ` Hanno Perrey
2023-04-17 13:56 ` Ihor Radchenko
2019-01-05 20:57 Ryan Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6C73C452-CA9E-45A0-8529-61BDCDA0B580@ucsd.edu \
    --to=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=rct@thompsonclan.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.