From: Jay Kamat <jaygkamat@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Export of irc links in ox-html
Date: Sun, 24 Sep 2017 01:18:52 -0400 [thread overview]
Message-ID: <8760c8r7wj.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
Hi!
IRC links in ox-html are currently broken. There exists a special 'irc'
content handler on the web, telling browsers to open an irc link in an
external irc client. The format for such links seems identical to org
(irc:irc.freenode.net/user).
Previously links such as:
[[irc:irc.freenode.net/test][Irc link]]
Would export to
<a href="irc.freenode.net/test">Irc link</a>
in ox-html.
After this tiny patch, it exports to:
<a href="irc:irc.freenode.net/test">Irc link</a>
which tells browsers such as firefox to open links in irc clients.
Let me know if you find any issues!
-Jay
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-ox-html.el-Fix-irc-links-exporting-to-link-to-local-.patch --]
[-- Type: text/x-diff, Size: 1023 bytes --]
From fa1a5ad3bf63158775ffa8ab3de37fb056103ab4 Mon Sep 17 00:00:00 2001
From: Jay Kamat <jaygkamat@gmail.com>
Date: Sun, 24 Sep 2017 01:11:42 -0400
Subject: [PATCH] ox-html.el: Fix irc links exporting to link to local files
* lisp/ox-html.el: Add "irc" to special link types which are exported
as their link type and path separated by ':', so that browser irc
content handlers work properly.
---
lisp/ox-html.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index d91ca73622..8756cda7e5 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2973,7 +2973,7 @@ INFO is a plist holding contextual information. See
(desc (org-string-nw-p desc))
(path
(cond
- ((member type '("http" "https" "ftp" "mailto" "news"))
+ ((member type '("http" "https" "ftp" "mailto" "news" "irc"))
(url-encode-url (org-link-unescape (concat type ":" raw-path))))
((string= type "file")
;; Treat links to ".org" files as ".html", if needed.
--
2.11.0
next reply other threads:[~2017-09-24 5:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-24 5:18 Jay Kamat [this message]
2017-09-24 7:20 ` [PATCH] Export of irc links in ox-html Nicolas Goaziou
2017-09-24 16:28 ` Jay Kamat
2017-09-24 16:35 ` Nicolas Goaziou
2017-09-25 1:34 ` Jay Kamat
2017-09-25 13:52 ` Nicolas Goaziou
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=8760c8r7wj.fsf@gmail.com \
--to=jaygkamat@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 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.