summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bastien1@free.fr>2012-05-25 23:09:08 +0200
committerBastien Guerry <bastien1@free.fr>2012-05-25 23:09:08 +0200
commit9893229fd65b38e8f6b519550b7e1af491017f76 (patch)
tree605c12e9c0aae6521426de96c778ba743c638f4c
parent2a88ee23dbe4182c8671b2fa6a1b091ce512cb99 (diff)
downloademacs-9893229fd65b38e8f6b519550b7e1af491017f76.tar.gz
Fix major bug in the Org>ODT exporter.
-rw-r--r--lisp/org/ChangeLog17
-rw-r--r--lisp/org/org-odt.el6
-rw-r--r--lisp/org/org.el19
3 files changed, 30 insertions, 12 deletions
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 24133ef850d..ec21c5f2470 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,20 @@
+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>
* org-odt.el (org-odt-init-outfile)
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el
index 8475eaae58f..ca43d05bdbd 100644
--- a/lisp/org/org-odt.el
+++ b/lisp/org/org-odt.el
@@ -2211,9 +2211,9 @@ captions on export.")
(content-file (expand-file-name "content.xml" outdir)))
;; init conten.xml
- (with-current-buffer
- (let ((nxml-auto-insert-xml-declaration-flag nil))
- (find-file-noselect content-file t)))
+ (require 'nxml-mode)
+ (let ((nxml-auto-insert-xml-declaration-flag nil))
+ (find-file-noselect content-file t))
;; reset variables
(setq org-odt-manifest-file-entries nil
diff --git a/lisp/org/org.el b/lisp/org/org.el
index fd5250a24be..972f7801afc 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -5917,7 +5917,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
(when org-pretty-entities
(catch 'match
(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)
(if (and (not (org-in-indented-comment-line))
(setq ee (org-entity-get (match-string 1)))
@@ -5990,14 +5990,15 @@ When FACE-OR-COLOR is not a string, just return it."
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t)
- (add-text-properties
- (match-beginning 0) (match-end 0)
- (list 'face (or (org-face-from-face-or-color
- 'priority 'org-special-keyword
- (cdr (assoc (char-after (match-beginning 1))
- org-priority-faces)))
- 'org-special-keyword)
- 'font-lock-fontified t))))
+ (when (save-match-data (org-at-heading-p))
+ (add-text-properties
+ (match-beginning 0) (match-end 0)
+ (list 'face (or (org-face-from-face-or-color
+ 'priority 'org-special-keyword
+ (cdr (assoc (char-after (match-beginning 1))
+ org-priority-faces)))
+ 'org-special-keyword)
+ 'font-lock-fontified t)))))
(defun org-get-tag-face (kwd)
"Get the right face for a TODO keyword KWD.