From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: [BUG] HTML Export/Broken coderef links? Date: Tue, 12 Apr 2011 17:31:54 +0530 Message-ID: <81fwpnfzkd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9cII-0006Rh-GC for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 08:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9cID-0004GY-CE for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 08:02:06 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:44680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9cID-0004GJ-5o for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 08:02:01 -0400 Received: by iyh42 with SMTP id 42so1207693iyh.0 for ; Tue, 12 Apr 2011 05:02:00 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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." --8<---------------cut here---------------start------------->8--- **** Advanced Example Blocks #+BEGIN_SRC emacs-lisp -n -r (save-excursion (ref:sc) (goto-char (point-min)) (ref:jump) #+END_SRC In line [[(sc)]] we remember the current position. [[(jump)][Line (jump)]] jumps to point-min. --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- #+begin_src html
1.1.1.1 Advanced Example Blocks
1:  (save-excursion
    2:     (goto-char (point-min))
    

In line 1 we remember the current position. Line 2 jumps to point-min.

#+end_src --8<---------------cut here---------------end--------------->8--- Jambunathan K. -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manuel Giraud Subject: [PATCH] * org-html.el (org-html-make-link): correct a bug in coderef link. Date: Tue, 12 Apr 2011 15:18:50 +0200 Message-ID: <1302614330-23496-1-git-send-email-manuel.giraud@univ-nantes.fr> References: <81fwpnfzkd.fsf@gmail.com> Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9dVG-0008Lo-1g for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 09:19:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9dVF-0008Rl-5K for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 09:19:33 -0400 Received: from smtp-tls1.univ-nantes.fr ([193.52.101.145]:51438 helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9dVE-0008Rb-Uo for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 09:19:33 -0400 In-Reply-To: <81fwpnfzkd.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Manuel Giraud --- lisp/org-html.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 58fbc05..5d53478 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,8 @@ 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 (or (string= "file" type) + (string= "coderef" type)))) (concat type ":" str) str))) -- 1.7.3.5 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: [PATCH] * org-html.el (org-html-make-link): correct a bug in coderef link. Date: Wed, 13 Apr 2011 00:28:34 +0530 Message-ID: <81lizfcn51.fsf@gmail.com> References: <81fwpnfzkd.fsf@gmail.com> <1302614330-23496-1-git-send-email-manuel.giraud@univ-nantes.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9ina-000356-MW for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 14:58:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9inZ-0008R9-0k for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 14:58:50 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:64879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9inY-0008QD-Tx for emacs-orgmode@gnu.org; Tue, 12 Apr 2011 14:58:48 -0400 Received: by mail-iy0-f169.google.com with SMTP id 42so1701239iyh.0 for ; Tue, 12 Apr 2011 11:58:48 -0700 (PDT) In-Reply-To: <1302614330-23496-1-git-send-email-manuel.giraud@univ-nantes.fr> (Manuel Giraud's message of "Tue, 12 Apr 2011 15:18:50 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Manuel Giraud Cc: emacs-orgmode@gnu.org Quick feedback. Applied the patch to my workarea. My example (which was stolen from Orgmode manual) gets exported just fine. Jambunathan K. Manuel Giraud writes: > --- > lisp/org-html.el | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index 58fbc05..5d53478 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,8 @@ 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 (or (string= "file" type) > + (string= "coderef" type)))) > (concat type ":" str) > str))) -- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: [BUG] HTML Export/Broken coderef links? Date: Wed, 13 Apr 2011 14:50:58 +0530 Message-ID: References: <81fwpnfzkd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=20cf3071c826c9473304a0c954e3 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9wGL-0000p0-6Z for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:21:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9wGF-0000Z6-7c for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:21:25 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:43933) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9wGF-0000Yj-59 for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:21:19 -0400 Received: by vws4 with SMTP id 4so406564vws.0 for ; Wed, 13 Apr 2011 02:21:18 -0700 (PDT) In-Reply-To: <81fwpnfzkd.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jambunathan K , Org-mode ml --20cf3071c826c9473304a0c954e3 Content-Type: text/plain; charset=UTF-8 On Tue, Apr 12, 2011 at 17:31, Jambunathan K 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 --20cf3071c826c9473304a0c954e3 Content-Type: application/octet-stream; name="fix-coderefs-in-html.patch" Content-Disposition: attachment; filename="fix-coderefs-in-html.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gmg1tv4o0 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWh0bWwuZWwgYi9saXNwL29yZy1odG1sLmVsCmluZGV4IDU4 ZmJjMDUuLmIzNDFlOWUgMTAwNjQ0Ci0tLSBhL2xpc3Avb3JnLWh0bWwuZWwKKysrIGIvbGlzcC9v cmctaHRtbC5lbApAQCAtODI2LDcgKzgyNiw4IEBAIE1BWS1JTkxJTkUtUCBhbGxvd3MgaW5saW5p bmcgaXQgYXMgYW4gaW1hZ2UuIgogCQkobm90IHR5cGUpCiAJCShzdHJpbmc9IHR5cGUgImh0dHAi KQogCQkoc3RyaW5nPSB0eXBlICJodHRwcyIpCi0JCShzdHJpbmc9IHR5cGUgImZpbGUiKSkKKwkJ KHN0cmluZz0gdHlwZSAiZmlsZSIpCisJCShzdHJpbmc9IHR5cGUgImNvZGVyZWYiKSkKIAkgICAg ICAgKGlmIGZyYWdtZW50CiAJCSAgKHNldHEgdGhlZmlsZSAoY29uY2F0IHRoZWZpbGUgIiMiIGZy YWdtZW50KSkpKQogCkBAIC04MzYsNyArODM3LDcgQEAgTUFZLUlOTElORS1QIGFsbG93cyBpbmxp bmluZyBpdCBhcyBhbiBpbWFnZS4iCiAJIChzZXRxIHRoZWZpbGUKIAkgICAgKGxldAogCSAgICAg ICAoKHN0ciAob3JnLWV4cG9ydC1odG1sLWZvcm1hdC1ocmVmIHRoZWZpbGUpKSkKLQkgICAgICAo aWYgKGFuZCB0eXBlIChub3QgKHN0cmluZz0gImZpbGUiIHR5cGUpKSkKKwkgICAgICAoaWYgKGFu ZCB0eXBlIChub3QgKHN0cmluZz0gImZpbGUiIHR5cGUpKSAobm90IChzdHJpbmc9ICJjb2RlcmVm IiB0eXBlKSkpCiAJCSAgKGNvbmNhdCB0eXBlICI6IiBzdHIpCiAJCSAgc3RyKSkpCiAK --20cf3071c826c9473304a0c954e3-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: [BUG] HTML Export/Broken coderef links? Date: Wed, 13 Apr 2011 14:53:43 +0530 Message-ID: References: <81fwpnfzkd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9wIz-0001Mx-2k for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9wIt-0001TZ-Kq for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:24:09 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:64793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9wIt-0001TR-Go for emacs-orgmode@gnu.org; Wed, 13 Apr 2011 05:24:03 -0400 Received: by vws4 with SMTP id 4so408455vws.0 for ; Wed, 13 Apr 2011 02:24:03 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jambunathan K , Org-mode ml Oops, looks like I=E2=80=99m rather late. Scratch that. :-) Aankhen From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: [Accepted] * org-html.el (org-html-make-link): correct a bug in coderef link. Date: Fri, 15 Apr 2011 13:58:40 +0200 (CEST) Message-ID: <20110415115840.52A7D412CC9@u016822.science.uva.nl> References: <1302614330-23496-1-git-send-email-manuel.giraud@univ-nantes.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:43408) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAhwo-0003rb-Eq for emacs-orgmode@gnu.org; Fri, 15 Apr 2011 08:16:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QAhwn-0004IW-7z for emacs-orgmode@gnu.org; Fri, 15 Apr 2011 08:16:26 -0400 Received: from u016822.science.uva.nl ([146.50.39.34]:52962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QAhwn-0004IR-17 for emacs-orgmode@gnu.org; Fri, 15 Apr 2011 08:16:25 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Patch 746 (http://patchwork.newartisans.com/patch/746/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C1302614330-23496-1-git-send-email-manuel.giraud%40univ-nantes.fr%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] * org-html.el (org-html-make-link): correct a bug in coderef link. > Date: Tue, 12 Apr 2011 18:18:50 -0000 > From: Manuel Giraud > X-Patchwork-Id: 746 > Message-Id: <1302614330-23496-1-git-send-email-manuel.giraud@univ-nantes.fr> > To: emacs-orgmode@gnu.org > Cc: Manuel Giraud > > --- > lisp/org-html.el | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index 58fbc05..5d53478 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,8 @@ 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 (or (string= "file" type) > + (string= "coderef" type)))) > (concat type ":" str) > str))) > >