summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-10-03 08:30:40 (GMT)
committer Bastien Guerry <bzg@altern.org>2012-10-03 08:30:40 (GMT)
commitfc8ad1347e103b399d0fcdb617d99e5bf06b80b6 (patch)
treeea7dabf458764bc0d96051b95147d12b37921d3e
parent27c673781309f1ad58a55c4130b793ff18fc7ac9 (diff)
downloadorg-mode-fc8ad1347e103b399d0fcdb617d99e5bf06b80b6.zip
org-mode-fc8ad1347e103b399d0fcdb617d99e5bf06b80b6.tar.gz
org-odt.el (org-odt-styles-dir): Try more directories
* org-odt.el (org-odt-styles-dir): Try more directories. Don't throw an error, just send a message. Thanks to Nick Dokos for reporting this.
-rw-r--r--lisp/org-odt.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/org-odt.el b/lisp/org-odt.el
index c417080..117c824 100644
--- a/lisp/org-odt.el
+++ b/lisp/org-odt.el
@@ -150,7 +150,11 @@ Also add it to `rng-schema-locating-files'."
(let* ((d (expand-file-name "../" (org-find-library-dir "org-odt.el")))
(styles-dir-list (list
(concat d "etc/styles/") ;; ELPA and Git
- (concat d "etc/org/")))
+ (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
@@ -164,8 +168,8 @@ Also add it to `rng-schema-locating-files'."
"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, aborting")))
"Directory that holds auxiliary XML files used by the ODT exporter.
This directory contains the following XML files -