emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Aankhen <aankhen@gmail.com>
To: Jambunathan K <kjambunathan@gmail.com>,
	Org-mode ml <emacs-orgmode@gnu.org>
Subject: Re: [BUG] HTML Export/Broken coderef links?
Date: Wed, 13 Apr 2011 14:50:58 +0530	[thread overview]
Message-ID: <BANLkTin70+BCD4vTrBew1kZmkp6_vuPyUg@mail.gmail.com> (raw)
In-Reply-To: <81fwpnfzkd.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On Tue, Apr 12, 2011 at 17:31, Jambunathan K <kjambunathan@gmail.com> wrote:
>
> On HTML export, I am unable to follow references to lines within the
> code examples.
>
> Firefox complains with the following message:
>
> "Firefox doesn't know how to open this address; because the
> protocol(coderef) isn't associated with any program."
>
> [snip]

Try the attached patch for a quick fix.  Works here.

Aankhen

[-- Attachment #2: fix-coderefs-in-html.patch --]
[-- Type: application/octet-stream, Size: 735 bytes --]

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 58fbc05..b341e9e 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -826,7 +826,8 @@ MAY-INLINE-P allows inlining it as an image."
 		(not type)
 		(string= type "http")
 		(string= type "https")
-		(string= type "file"))
+		(string= type "file")
+		(string= type "coderef"))
 	       (if fragment
 		  (setq thefile (concat thefile "#" fragment))))
 
@@ -836,7 +837,7 @@ MAY-INLINE-P allows inlining it as an image."
 	 (setq thefile
 	    (let
 	       ((str (org-export-html-format-href thefile)))
-	      (if (and type (not (string= "file" type)))
+	      (if (and type (not (string= "file" type)) (not (string= "coderef" type)))
 		  (concat type ":" str)
 		  str)))
 

  parent reply	other threads:[~2011-04-13  9:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-12 12:01 [BUG] HTML Export/Broken coderef links? Jambunathan K
2011-04-12 13:18 ` [PATCH] * org-html.el (org-html-make-link): correct a bug in coderef link Manuel Giraud
2011-04-12 18:58   ` Jambunathan K
2011-04-15 11:58   ` [Accepted] " Carsten Dominik
2011-04-13  9:20 ` Aankhen [this message]
2011-04-13  9:23   ` [BUG] HTML Export/Broken coderef links? Aankhen

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=BANLkTin70+BCD4vTrBew1kZmkp6_vuPyUg@mail.gmail.com \
    --to=aankhen@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@gmail.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).