emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Hanno Perrey <hanno@hoowl.se>
To: Janek Fischer <janek.fischer@protonmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Feature request: Allow export to convert broken links to plain text
Date: Sat, 15 Apr 2023 08:50:27 +0200	[thread overview]
Message-ID: <87v8hxpqy5.fsf@hoowl.se> (raw)
In-Reply-To: <YDYQt6f37QZhcUpfoi3ES2D5kGxskq_hdk3Eroc_x4bofSK5FAKxwMzMF7lefWyYPQeE3KVeTQ7-nPc6AWXr_wyK7ykwSaN9AxIPZX5q9p0=@protonmail.com>


Hej Janek,

> I have a note with many links, but would like to export that note as
> landing page as text stripped of links.

I have had a similar need recently where I wanted to export a document
filled with inks to org-roam nodes and other org headlines via id links.
I was able to strip the links on export for just this type while
preserving other link types:

#+begin_src emacs-lisp
(defun my-link-remover (link contents info) contents)
(org-link-set-parameters "id" :export 'my-link-remover)
#+end_src

This could of course be extended to actually check the link and only
remove it if it points to nowhere.

Hope this points you in a useful direction!

Best wishes,

Hanno



--
Hanno Perrey
https://hoowl.se


  reply	other threads:[~2023-04-15  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 22:55 Feature request: Allow export to convert broken links to plain text Janek Fischer
2023-04-15  6:50 ` Hanno Perrey [this message]
2023-04-17 13:56 ` Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2019-01-12 20:38 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
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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=87v8hxpqy5.fsf@hoowl.se \
    --to=hanno@hoowl.se \
    --cc=emacs-orgmode@gnu.org \
    --cc=janek.fischer@protonmail.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).