all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Berry, Charles" <ccberry@health.ucsd.edu>
To: "Ryan C. Thompson" <rct@thompsonclan.org>
Cc: "Berry, Charles" <ccberry@ucsd.edu>,
	Org-Mode List <emacs-orgmode@gnu.org>
Subject: Re: Feature request: Allow export to convert broken links to plain text
Date: Mon, 11 Sep 2023 17:12:23 +0000	[thread overview]
Message-ID: <C4D4D4A0-55B5-45A3-BB04-05265C12991F@health.ucsd.edu> (raw)
In-Reply-To: <ce86d05c-ca3c-41c0-a6f8-aa57f7755c22@thompsonclan.org>

Ryan,

> On Sep 9, 2023, at 9:13 PM, Ryan C. Thompson <rct@thompsonclan.org> wrote:
> 
> So, this isn't an ideal solution, since it requires me to prefix any potential offending links with "maybe:". But it's good enough for me.
> 

It is good that you have a solution, albeit with the caveat you mention above.

A couple of thoughts:

There is a hook that operates on the copy buffer before parsing viz. "org-export-before-parsing-functions is a variable defined in ‘ox.el’." (In older versions, it was org-export-before-parsing-hook.) Maybe you can add a hook that will add that prefix to all links, so you do not need to put it in your working files.

Or you could write an elisp macro that takes two arguments (link, desc) and uses them to either construct a link or your preferred substitute if it fails validation. 

HTH,

Chuck


  reply	other threads:[~2023-09-11 17:13 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
2023-09-10  4:13       ` Ryan C. Thompson
2023-09-11 17:12         ` Berry, Charles [this message]
  -- 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=C4D4D4A0-55B5-45A3-BB04-05265C12991F@health.ucsd.edu \
    --to=ccberry@health.ucsd.edu \
    --cc=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.