emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Sebastian Rose <sebastian_rose@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-mode CSS property export bug
Date: Sun, 25 Apr 2010 14:08:27 +0200	[thread overview]
Message-ID: <5392C1D3-1C25-4948-A238-A46F042EFD1C@gmail.com> (raw)
In-Reply-To: <87och7bzde.fsf@gmx.de>

OK, it has been applied now, and I have re-published everything on  
orgmode.org, including Worg, to make problems with this show up as  
quickly as possible.

Thanks!

- Carsten

On Apr 25, 2010, at 12:27 PM, Sebastian Rose wrote:

> Carsten,
>
>
> this looks all OK to me. Tested and works.
>
>
>
>   Sebastian
>
>
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>> He Sebastian,
>>
>> I believe we need a bit more - here is my patch - can you please  
>> take a look?
>> Thanks!
>>
>> - Carsten
>>
>> 	Modified lisp/org-docbook.el
>> diff --git a/lisp/org-docbook.el b/lisp/org-docbook.el
>> index de9ffcc..bb8d048 100644
>> --- a/lisp/org-docbook.el
>> +++ b/lisp/org-docbook.el
>> @@ -1228,7 +1228,8 @@ When TITLE is nil, just close all open levels."
>>       (setq section-number (org-section-number level))
>>       (insert (format "\n<section xml:id=\"%s%s\">\n<title>%s</ 
>> title>"
>> 		      org-export-docbook-section-id-prefix
>> -		      section-number title))
>> +		      (replace-regexp-in-string "\\." "_" section-number)
>> +		      title))
>>       (org-export-docbook-open-para))))
>>
>> (defun org-docbook-expand (string)
>> 	Modified lisp/org-exp.el
>> diff --git a/lisp/org-exp.el b/lisp/org-exp.el
>> index da8e1a4..44bde65 100644
>> --- a/lisp/org-exp.el
>> +++ b/lisp/org-exp.el
>> @@ -1239,7 +1239,9 @@ Also find all ID and CUSTOM_ID propertiess  
>> and store
>> them."
>> 		       (save-excursion (goto-char (point-at-bol))
>> 				       (org-outline-level))))
>> 	  (setq target (org-solidify-link-text
>> -			(format "sec-%s" (org-section-number level))))
>> +			(format "sec-%s" (replace-regexp-in-string
>> +					  "\\." "_"
>> +					  (org-section-number level)))))
>> 	  (setq last-section-target target)
>> 	  (push (cons target target) target-alist)
>> 	  (add-text-properties
>> 	Modified lisp/org-html.el
>> diff --git a/lisp/org-html.el b/lisp/org-html.el
>> index 71f62eb..92798d2 100644
>> --- a/lisp/org-html.el
>> +++ b/lisp/org-html.el
>> @@ -871,7 +871,9 @@ lang=\"%s\" xml:lang=\"%s\">
>> 					      t t line)))
>> 				(while (string-match "&lt;\\(&lt;\\)+\\|&gt;\\(&gt;\\)+" txt)
>> 				  (setq txt (replace-match "" t t txt)))
>> -				(setq href (format "sec-%s" snumber))
>> +				(setq href
>> +				      (replace-regexp-in-string
>> +				       "\\." "_" (format "sec-%s" snumber)))
>> 				(setq href (or (cdr (assoc href org-export-preferred-target-
>> alist)) href))
>> 				(push
>> 				 (format
>> @@ -2027,7 +2029,7 @@ When TITLE is nil, just close all open levels."
>> 			 (cdr (assoc target org-export-preferred-target-alist))))
>> 	 (remove (or preferred target))
>> 	 (l org-level-max)
>> -	 snumber href suffix)
>> +	 snumber snu href suffix)
>>     (setq extra-targets (remove remove extra-targets))
>>     (setq extra-targets
>> 	  (mapconcat (lambda (x)
>> @@ -2076,7 +2078,8 @@ When TITLE is nil, just close all open levels."
>> 			  extra-targets title "<br/>\n")
>> 		(insert "<ul>\n<li>" title "<br/>\n"))))
>> 	(aset org-levels-open (1- level) t)
>> -	(setq snumber (org-section-number level))
>> +	(setq snumber (org-section-number level)
>> +	      snu (replace-regexp-in-string "\\." "_" snumber))
>> 	(setq level (+ level org-export-html-toplevel-hlevel -1))
>> 	(if (and org-export-with-section-numbers (not body-only))
>> 	    (setq title (concat
>> @@ -2084,9 +2087,9 @@ When TITLE is nil, just close all open levels."
>> 				 level snumber)
>> 			 " " title)))
>> 	(unless (= head-count 1) (insert "\n</div>\n"))
>> -	(setq href (cdr (assoc (concat "sec-" snumber) org-export- 
>> preferred-
>> target-alist)))
>> -	(setq suffix (or href snumber))
>> -	(setq href (or href (concat "sec-" snumber)))
>> +	(setq href (cdr (assoc (concat "sec-" snu) org-export-preferred-
>> target-alist)))
>> +	(setq suffix (or href snu))
>> +	(setq href (or href (concat "sec-" snu)))
>> 	(insert (format "\n<div id=\"outline-container-%s\" class=\"outline-
>> %d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\"  
>> id=
>> \"text-%s\">\n"
>> 			suffix level (if extra-class (concat " " extra-class) "")
>> 			level href
>>
>>
>> On Apr 24, 2010, at 1:25 PM, Sebastian Rose wrote:
>>
>>> Hi everyone,
>>>
>>>
>>> here's a patch for org-html.el to fix those IDs.
>>>
>>> sec-1.2    =>  sec-1_2
>>> sec-1.2.3  =>  sec-1_2_3
>>>
>>>
>>>
>>>
>>> diff --git a/lisp/org-html.el b/lisp/org-html.el
>>> index 71f62eb..133bffa 100644
>>> --- a/lisp/org-html.el
>>> +++ b/lisp/org-html.el
>>> @@ -871,7 +871,9 @@ lang=\"%s\" xml:lang=\"%s\">
>>> 					      t t line)))
>>> 				(while (string-match "&lt;\\(&lt;\\)+\\|&gt;\\(&gt;\\)+" txt)
>>> 				  (setq txt (replace-match "" t t txt)))
>>> -				(setq href (format "sec-%s" snumber))
>>> +				(setq href
>>> +				      (replace-regexp-in-string
>>> +				       "\\." "_" (format "sec-%s" snumber)))
>>> 				(setq href (or (cdr (assoc href org-export-preferred-target-
>>> alist)) href))
>>> 				(push
>>> 				 (format
>>> @@ -2085,8 +2087,11 @@ When TITLE is nil, just close all open  
>>> levels."
>>> 			 " " title)))
>>> 	(unless (= head-count 1) (insert "\n</div>\n"))
>>> 	(setq href (cdr (assoc (concat "sec-" snumber) org-export- 
>>> preferred-
>>> target-alist)))
>>> -	(setq suffix (or href snumber))
>>> -	(setq href (or href (concat "sec-" snumber)))
>>> +	(setq suffix (or href
>>> +			 (replace-regexp-in-string "\\." "_" snumber)))
>>> +	(setq href (or href
>>> +		       (replace-regexp-in-string
>>> +			"\\." "_" (concat "sec-" snumber))))
>>> 	(insert (format "\n<div id=\"outline-container-%s\" class= 
>>> \"outline-
>>> %d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\"
>>> id=\"text-%s\">\n"
>>> 			suffix level (if extra-class (concat " " extra-class) "")
>>> 			level href
>>>
>>>
>>>
>>>
>>> Who ever uses org-info.js will have to pull the new (but backward
>>> compatible) version from
>>>
>>>  http://orgmode.org/worg/code/org-info-js/org-info.js
>>>
>>> provided this or something similar gets applied. Please give the  
>>> server
>>> a while to run the publishing before downloading (I guess 2 hours  
>>> are
>>> enough). It's now ...
>>>
>>>
>>> $ date -u
>>> Sa 24. Apr 11:13:26 UTC 2010
>>>
>>>
>>>
>>>
>>> Best wishes
>>>
>>> Sebastian
>>
>> - Carsten
>>
>>
>>
>
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Sebastian  Rose      Fachinformatiker / Anwendungsentwicklung
> Viktoriastr. 22      Entwicklung von Anwendungen mit freien Werkzeugen
> 30451  Hannover      und Bibliotheken.
>
> 0173  83 93 417      sebastian_rose@gmx.de         s.rose@emma-stil.de
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Carsten

  reply	other threads:[~2010-04-25 12:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-22 17:38 org-mode CSS property export bug Rick Moynihan
2010-04-22 21:29 ` Sebastian Rose
2010-04-23  1:51   ` Rick Moynihan
2010-04-23  6:17     ` Sebastian Rose
2010-04-23  6:30     ` Carsten Dominik
2010-04-23  9:07       ` Sebastian Rose
2010-04-23 10:01       ` Rick Moynihan
2010-04-23 10:46         ` Sebastian Rose
2010-04-23 11:00           ` Rick Moynihan
2010-04-23 12:22             ` Rick Moynihan
2010-04-23 15:24               ` Carsten Dominik
2010-04-23 12:29             ` Richard Riley
2010-04-24  0:14             ` Carsten Dominik
2010-04-24  8:58               ` Sebastian Rose
2010-04-24 11:25                 ` Sebastian Rose
2010-04-24 12:23                   ` Carsten Dominik
2010-04-24 12:42                     ` Sebastian Rose
2010-04-24 15:36                   ` Carsten Dominik
2010-04-25 10:27                     ` Sebastian Rose
2010-04-25 12:08                       ` Carsten Dominik [this message]
2010-04-26  9:46                         ` Rick Moynihan
2010-04-23 15:25           ` Carsten Dominik

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=5392C1D3-1C25-4948-A238-A46F042EFD1C@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=sebastian_rose@gmx.de \
    /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).