From: Milan Zimmermann <milan.zimmermann@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Handling custom link types for html export in v 9.0 - Replacement for deprecated `org-add-link-type`?
Date: Mon, 17 Apr 2017 13:52:14 -0500 [thread overview]
Message-ID: <CAEc2VK3wv0Ef2pdpehywQDMER9V9-hsxgWEhjHdg_F2gEk+uMA@mail.gmail.com> (raw)
Hi:
I have a question about how to define custom link type, which before
9.0 used the (9.0) deprecated `org-add-link-type`.
1. Let me first provide the context:
There is often a need to generate, for org links export/publish to
Html, elements where img src URL starts with a slash, like this
<img src="/images/a.jpg" >
The only way that was possible before v9, for this to be exported from
a link such as
[[/images/a.jgp]]
was to use a method described in
http://stackoverflow.com/questions/14684263/how-to-org-mode-image-absolute-path-of-export-html
- Basically, the solution described there is
a) define a custom link type such as "img"
b) in org, use [[img:images/a.jpg]]
c) define two functions handling the img link in org and on
export/publish, and call (org-add-link-type "img"
'org-custom-link-img-follow 'org-custom-link-img-export)
2. The problem and question
In org 9.0, we get `org-add-link-type ... This function is obsolete
since Org 9.0 use `org-link-set-parameters' instead.
My problem is I have no idea how to, in a practical sense, use
`org-link-set-parameters` to define a custom link type "img" and
handle it's image handling in both org buffer and Html publish.
My question is, are there any links and examples how one would do the
above in 9.0?
Thanks
Milan
next reply other threads:[~2017-04-17 18:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-17 18:52 Milan Zimmermann [this message]
2017-04-18 14:00 ` Handling custom link types for html export in v 9.0 - Replacement for deprecated `org-add-link-type`? John Kitchin
2017-04-19 2:50 ` Milan Zimmermann
2017-04-19 11:10 ` John Kitchin
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=CAEc2VK3wv0Ef2pdpehywQDMER9V9-hsxgWEhjHdg_F2gEk+uMA@mail.gmail.com \
--to=milan.zimmermann@gmail.com \
--cc=emacs-orgmode@gnu.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 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).