Commit 9893229f authored by Bastien Guerry's avatar Bastien Guerry
Browse files

Fix major bug in the Org>ODT exporter.

parent 2a88ee23
2012-05-25 Mark Shoulson <mark@kli.org> (tiny change)
* org.el (org-fontify-entities): Fix bug: The entities \sup[123]
and \there4 were not "prettified" when org-pretty-entities was
enabled.
2012-05-235 Nicolas Goaziou <n.goaziou@gmail.com>
* org.el (org-font-lock-add-priority-faces): Restrict priorities
fontification to headlines and inlinetasks.
2012-05-25 Jambunathan K <kjambunathan@gmail.com>
* org-odt.el (org-odt-init-outfile): Fix previous commit. Make
sure that nxml-mode is loaded before let-binding
`nxml-auto-insert-xml-declaration-flag'.
2012-05-25 Jambunathan K <kjambunathan@gmail.com> 2012-05-25 Jambunathan K <kjambunathan@gmail.com>
   
* org-odt.el (org-odt-init-outfile) * org-odt.el (org-odt-init-outfile)
......
...@@ -2211,9 +2211,9 @@ captions on export.") ...@@ -2211,9 +2211,9 @@ captions on export.")
(content-file (expand-file-name "content.xml" outdir))) (content-file (expand-file-name "content.xml" outdir)))
;; init conten.xml ;; init conten.xml
(with-current-buffer (require 'nxml-mode)
(let ((nxml-auto-insert-xml-declaration-flag nil)) (let ((nxml-auto-insert-xml-declaration-flag nil))
(find-file-noselect content-file t))) (find-file-noselect content-file t))
;; reset variables ;; reset variables
(setq org-odt-manifest-file-entries nil (setq org-odt-manifest-file-entries nil
......
...@@ -5917,7 +5917,7 @@ needs to be inserted at a specific position in the font-lock sequence.") ...@@ -5917,7 +5917,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities (when org-pretty-entities
(catch 'match (catch 'match
(while (re-search-forward (while (re-search-forward
"\\\\\\(frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)" "\\\\\\(there4\\|sup[123]\\|frac[13][24]\\|[a-zA-Z]+\\)\\($\\|{}\\|[^[:alpha:]\n]\\)"
limit t) limit t)
(if (and (not (org-in-indented-comment-line)) (if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1))) (setq ee (org-entity-get (match-string 1)))
...@@ -5990,14 +5990,15 @@ When FACE-OR-COLOR is not a string, just return it." ...@@ -5990,14 +5990,15 @@ When FACE-OR-COLOR is not a string, just return it."
(defun org-font-lock-add-priority-faces (limit) (defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces." "Add the special priority faces."
(while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t) (while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t)
(add-text-properties (when (save-match-data (org-at-heading-p))
(match-beginning 0) (match-end 0) (add-text-properties
(list 'face (or (org-face-from-face-or-color (match-beginning 0) (match-end 0)
'priority 'org-special-keyword (list 'face (or (org-face-from-face-or-color
(cdr (assoc (char-after (match-beginning 1)) 'priority 'org-special-keyword
org-priority-faces))) (cdr (assoc (char-after (match-beginning 1))
'org-special-keyword) org-priority-faces)))
'font-lock-fontified t)))) 'org-special-keyword)
'font-lock-fontified t)))))
   
(defun org-get-tag-face (kwd) (defun org-get-tag-face (kwd)
"Get the right face for a TODO keyword KWD. "Get the right face for a TODO keyword KWD.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment