Re: [O] Re: [REGRESSION] org-html.el (targets)
Hi Aankhen, Aankhen aank...@gmail.com writes: This one seemed easy to fix, so I thought I’d butt in. :-) Hope the format of the patch is right (I’m using hg-git). The patch was caught by patchwork, but wrongly wrapped. Thanks for it anyway! -- Bastien
Re: [O] Re: [REGRESSION] org-html.el (targets)
Hi Manuel, Manuel Giraud manuel.gir...@univ-nantes.fr writes: 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: Thanks for the patches -- patchwork can only catch *one* patch per mail. I guess that's because people are encouraged to use git send-mail when they have several patches... May I ask you to rewrite these patches into a single one? Also, having a ChangeLog entry will help a lot. Thanks! -- Bastien
Re: [O] Re: [REGRESSION] org-html.el (targets)
Bastien b...@gnu.org writes: May I ask you to rewrite these patches into a single one? PS: I mean: merge all patches in this thread relevant to the problem, possibly including Aankhen patch. Thanks! -- Bastien
Re: [O] Re: [REGRESSION] org-html.el (targets)
Bastien b...@altern.org writes: Bastien b...@gnu.org writes: May I ask you to rewrite these patches into a single one? PS: I mean: merge all patches in this thread relevant to the problem, possibly including Aankhen patch. Thanks! Ok, here it is. Hopes this one's ok. From a9e692243b37be9947db9a7220ea561d261deaba Mon Sep 17 00:00:00 2001 From: Manuel Giraud manuel.gir...@univ-nantes.fr Date: Wed, 9 Mar 2011 16:03:43 +0100 Subject: [PATCH] Correct HTML export of dedicated target. * org-html.el (org-format-org-table-html): fix anchors in HTML export (thanks to aank...@gmail.com) (org-html-protect): fix a bug that prevents some target to be rendered correctly. * org-exp.el (org-solidify-link-text): a single - to avoid a ndash rewrite in HTML export later. --- lisp/org-exp.el |2 +- lisp/org-html.el | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 709317a..dff86b6 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 333cf4d..54cbf36 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 caption%s/caption (or caption )) html) - (when label (push (format a name=\%s\ id=\%s\/a (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) @@ -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 -- Manuel Giraud
[Accepted] [O] Re: [REGRESSION] org-html.el (targets)
Patch 664 (http://patchwork.newartisans.com/patch/664/) is now Accepted. Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C87fwqwnxj6.fsf%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] Re: [REGRESSION] org-html.el (targets) Date: Wed, 09 Mar 2011 20:06:37 - From: Manuel Giraud manuel.gir...@univ-nantes.fr X-Patchwork-Id: 664 Message-Id: 87fwqwnxj6@univ-nantes.fr To: Bastien b...@altern.org Cc: Bernt Hansen be...@norang.ca, Aankhen aank...@gmail.com, Org-mode ml emacs-orgmode@gnu.org Bastien b...@altern.org writes: Bastien b...@gnu.org writes: May I ask you to rewrite these patches into a single one? PS: I mean: merge all patches in this thread relevant to the problem, possibly including Aankhen patch. Thanks! Ok, here it is. Hopes this one's ok. From a9e692243b37be9947db9a7220ea561d261deaba Mon Sep 17 00:00:00 2001 From: Manuel Giraud manuel.gir...@univ-nantes.fr Date: Wed, 9 Mar 2011 16:03:43 +0100 Subject: [PATCH] Correct HTML export of dedicated target. * org-html.el (org-format-org-table-html): fix anchors in HTML export (thanks to aank...@gmail.com) (org-html-protect): fix a bug that prevents some target to be rendered correctly. * org-exp.el (org-solidify-link-text): a single - to avoid a ndash rewrite in HTML export later. --- lisp/org-exp.el |2 +- lisp/org-html.el | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 709317a..dff86b6 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 333cf4d..54cbf36 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 caption%s/caption (or caption )) html) - (when label (push (format a name=\%s\ id=\%s\/a (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) @@ -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
Re: [O] Re: [REGRESSION] org-html.el (targets)
Hi Manuel, Manuel Giraud manuel.gir...@univ-nantes.fr writes: Bastien b...@altern.org writes: Bastien b...@gnu.org writes: May I ask you to rewrite these patches into a single one? PS: I mean: merge all patches in this thread relevant to the problem, possibly including Aankhen patch. Thanks! Ok, here it is. Hopes this one's ok. It is! Thanks a lot :) Next step is to use git send-mail :) -- Bastien
Re: [O] Re: [REGRESSION] org-html.el (targets)
Hi Bastien, On Wed, Mar 9, 2011 at 16:06, Bastien b...@altern.org wrote: Aankhen aank...@gmail.com writes: This one seemed easy to fix, so I thought I’d butt in. :-) Hope the format of the patch is right (I’m using hg-git). The patch was caught by patchwork, but wrongly wrapped. Thanks for it anyway! Glad I could help. :-) I guess I messed up the line endings, going by what Manuel and you said. Not sure how that happened. I’ll see if I can figure out how to prevent it in future. Aankhen
Re: [O] Re: [REGRESSION] org-html.el (targets)
Aankhen aank...@gmail.com writes: On Tue, Mar 8, 2011 at 02:07, Bernt Hansen be...@norang.ca wrote: Thanks for the patch. I still see validation errors after applying this patch. I'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’d butt in. :-) Hope the format of the patch is right (I’m 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: From cd423f908de55a2379c4476c0da8922968786e64 Mon Sep 17 00:00:00 2001 From: Manuel Giraud manuel.gir...@univ-nantes.fr 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 From 3842d9aa15271658b06ad818761d530c871492e0 Mon Sep 17 00:00:00 2001 From: Aankhen aank...@gmail.com 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 caption%s/caption (or caption )) html) - (when label (push (format a name=\%s\ id=\%s\/a (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
Re: [O] Re: [REGRESSION] org-html.el (targets)
Manuel Giraud manuel.gir...@univ-nantes.fr writes: Aankhen aank...@gmail.com writes: On Tue, Mar 8, 2011 at 02:07, Bernt Hansen be...@norang.ca wrote: Thanks for the patch. I still see validation errors after applying this patch. I'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’d butt in. :-) Hope the format of the patch is right (I’m 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: These patches make nxhtml mode report that the result is now valid. Thanks! Regards, -- Bernt
Re: [O] Re: [REGRESSION] org-html.el (targets)
Manuel Giraud manuel.gir...@univ-nantes.fr writes: Jambunathan K kjambunat...@gmail.com writes: I am attaching the bug.org file and the html exports as done by git versions 048f32 (approx a month old) and 77c278 (very recent). Hi, Here's a patch that fixes this issue. Hi Manuel, Thanks for the patch. I still see validation errors after applying this patch. I'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. Regards, -- Bernt
Re: [O] Re: [REGRESSION] org-html.el (targets)
On Tue, Mar 8, 2011 at 02:07, Bernt Hansen be...@norang.ca wrote: Thanks for the patch. I still see validation errors after applying this patch. I'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’d butt in. :-) Hope the format of the patch is right (I’m using hg-git). --8---cut here---start-8--- # HG changeset patch # User Aankhen # Date 1299568135 -19800 # Node ID 23e761c8a103c521aef0a85ee3650bc850d0193d # Parent 56fa585a0f995bc97006ce6d6c2baab9c48c Fix anchors in HTML export. diff --git a/lisp/org-html.el b/lisp/org-html.el --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1996,8 +1996,8 @@ ;; DocBook document, we want to always include the caption to make ;; DocBook XML file valid. (push (format caption%s/caption (or caption )) html) - (when label (push (format a name=\%s\ id=\%s\/a (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) --8---cut here---end---8--- Aankhen