diff options
author | Bastien Guerry <bzg@altern.org> | 2012-10-03 10:28:43 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-10-03 10:28:43 +0200 |
commit | 27c673781309f1ad58a55c4130b793ff18fc7ac9 (patch) | |
tree | 2ce267e7cff9f787ceb01c56d494f526b615a987 | |
parent | 98bc46731ae50ab042e4b68641372220ffeeda8f (diff) | |
download | org-mode-27c673781309f1ad58a55c4130b793ff18fc7ac9.tar.gz |
org-e-odt.el: Bugfix: default to the correct directory for styles.
* org-e-odt.el (org-e-odt-styles-dir): Try more directories.
Don't throw an error, just send a message.
(org-e-odt): Fix a bug about deactivating an advice that was
activated by org-odt.el, not org-e-odt.el.
Thanks to Nick Dokos for reporting this.
-rw-r--r-- | contrib/lisp/org-e-odt.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/lisp/org-e-odt.el b/contrib/lisp/org-e-odt.el index 14147c7..69fbea1 100644 --- a/contrib/lisp/org-e-odt.el +++ b/contrib/lisp/org-e-odt.el @@ -117,9 +117,12 @@ (defconst org-e-odt-styles-dir (let* ((d (expand-file-name (org-find-library-dir "org-e-odt.el"))) (styles-dir-list (list - (concat d "../../etc/styles/") ;; Git - (concat d "../../etc/org/") ;; system - (concat d "../etc/org/"))) ;; ELPA org-plus + (concat d "etc/styles/") ;; ELPA and Git + (concat d "etc/org/") ;; Org from Emacs + (concat d "../" + (number-to-string emacs-major-version) "." + (number-to-string emacs-minor-version) "/etc/org/") + (concat data-directory "org/"))) ;; Custom install styles-dir) (setq styles-dir (car @@ -133,8 +136,8 @@ "OrgOdtStyles.xml" sd))) sd)) styles-dir-list)))) - (or styles-dir - (error "Cannot find factory styles files for Org ODT, aborting"))) + (or (expand-file-name styles-dir) + (message "Cannot find factory styles files for Org ODT"))) "Directory that holds auxiliary XML files used by the ODT exporter. This directory contains the following XML files - @@ -1826,7 +1829,7 @@ CONTENTS is nil. INFO is a plist holding contextual information." ;;;; Latex Environment -(eval-after-load 'org-e-odt +(eval-after-load 'org-odt '(ad-deactivate 'org-format-latex-as-mathml)) ;; (defadvice org-format-latex-as-mathml ; FIXME |