From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Feature request: Allow export to convert broken links to plain text Date: Sun, 13 Jan 2019 22:34:18 +0000 Message-ID: <6C73C452-CA9E-45A0-8529-61BDCDA0B580@ucsd.edu> References: <6DD23F17-400A-468E-B637-5E2A9C7995DD@ucsd.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gioKy-000540-Ad for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 17:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gioKw-0007WV-Fb for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 17:34:36 -0500 Received: from iport-bcv4-out.ucsd.edu ([132.239.0.122]:2036) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1gioKt-0007QC-7o for emacs-orgmode@gnu.org; Sun, 13 Jan 2019 17:34:32 -0500 In-Reply-To: Content-Language: en-US Content-ID: <792E201D2944C349A4DFE23CDBBAD56B@AD.UCSD.EDU> 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: Ryan Thompson Cc: Org-Mode List > On Jan 13, 2019, at 1:33 PM, Ryan Thompson wrote: >=20 > Hi, >=20 > 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 o= nce the org-link-broken signal is thrown. This also means that the implemen= tation I was considering won't work. >=20 > So, it looks like I need to intercept execution earlier in the export pro= cess. Any ideas on how to do that? Looks like your original idea to revise `org-export-data' might be best.=20 IIUC, you need to add the link text to the SIGNAL-DATA in each of the place= s where `org-export-resolve-*-link' functions call `signal', then modify `o= rg-export-data' to ignore the addition for `mark' and add it back for your = new `mark-with-text' option. HTH, Chuck