From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manuel Giraud Subject: Re: Re: [REGRESSION] org-html.el (targets) Date: Tue, 08 Mar 2011 11:15:37 +0100 Message-ID: <87pqq1535i.fsf@univ-nantes.fr> References: <81r5b2frh9.fsf@gmail.com> <877hcarjom.fsf@univ-nantes.fr> <87wrkak6q9.fsf@norang.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=40882 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwty4-0005HL-GQ for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 05:16:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwty2-0002hc-OB for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 05:16:40 -0500 Received: from smtp-tls2.univ-nantes.fr ([193.52.101.146]:50605 helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwty2-0002hO-7Y for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 05:16:38 -0500 In-Reply-To: (aankhen@gmail.com's message of "Tue, 8 Mar 2011 12:44:50 +0530") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Aankhen Cc: Bernt Hansen , Org-mode ml --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Aankhen writes: > On Tue, Mar 8, 2011 at 02:07, Bernt Hansen wrote: >> Thanks for the patch. =C2=A0I still see validation errors after applying= this >> patch. =C2=A0I've posted the original test file at >> http://www.norang.ca/tmp/foo.html and you can click on the validation >> link at the bottom to see the remaining errors. > > This one seemed easy to fix, so I thought I=E2=80=99d butt in. :-) Hope t= he > format of the patch is right (I=E2=80=99m using hg-git). Thanks. Modulo line breakage this patch applies and Jambunathan's test file now validates XHTML 1.0 Here's the 2 patch that solve this: --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-org-html.el-bug-that-prevents-some-target-to-be-rend.patch >From cd423f908de55a2379c4476c0da8922968786e64 Mon Sep 17 00:00:00 2001 From: Manuel Giraud Date: Mon, 7 Mar 2011 17:12:46 +0100 Subject: [PATCH 1/2] org-html.el: bug that prevents some target to be rendered correctly. --- lisp/org-exp.el | 2 +- lisp/org-html.el | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index ae7bdcf..f22eeba 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2062,7 +2062,7 @@ can work correctly." (let* ((rtn (mapconcat 'identity - (org-split-string s "[^a-zA-Z0-9_\\.-]+") "--")) + (org-split-string s "[^a-zA-Z0-9_\\.-]+") "-")) (a (assoc rtn alist))) (or (cdr a) rtn)))) diff --git a/lisp/org-html.el b/lisp/org-html.el index eb4b199..8fe8029 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -2181,12 +2181,12 @@ that uses these same face definitions." (defun org-html-protect (s) "Convert characters to HTML equivalent. Possible conversions are set in `org-export-html-protect-char-alist'." - (let ((start 0) - (cl org-export-html-protect-char-alist) c) + (let ((cl org-export-html-protect-char-alist) c) (while (setq c (pop cl)) - (while (string-match (car c) s start) - (setq s (replace-match (cdr c) t t s) - start (1+ (match-beginning 0))))) + (let ((start 0)) + (while (string-match (car c) s start) + (setq s (replace-match (cdr c) t t s) + start (match-beginning 0))))) s)) (defun org-html-expand (string) -- 1.7.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-Fix-anchors-in-HTML-export.patch >From 3842d9aa15271658b06ad818761d530c871492e0 Mon Sep 17 00:00:00 2001 From: Aankhen Date: Tue, 8 Mar 2011 11:06:44 +0100 Subject: [PATCH 2/2] Fix anchors in HTML export. --- lisp/org-html.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index 8fe8029..9b44e8a 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1996,8 +1996,8 @@ for formatting. This is required for the DocBook exporter." ;; DocBook document, we want to always include the caption to make ;; DocBook XML file valid. (push (format "%s" (or caption "")) html) - (when label (push (format "" (org-solidify-link-text label) (org-solidify-link-text label)) - html)) + (when label + (setq html-table-tag (org-export-splice-attributes html-table-tag (format "id=\"%s\"" (org-solidify-link-text label))))) (push html-table-tag html)) (setq html (mapcar (lambda (x) -- 1.7.1 --=-=-= -- Manuel Giraud --=-=-=--