summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJambunathan K <kjambunathan@gmail.com>2011-12-24 11:33:54 +0530
committerBastien Guerry <bzg@altern.org>2012-01-03 09:14:51 +0100
commitd75585cc2e22ad64b34534ee6fcacbdbd0b74704 (patch)
treeaa59c13de23f94025167cea1c26668faba7fbc31
parent024ae841918fa8c78b54497f0a6bde6ca58c3675 (diff)
downloadorg-mode-d75585cc2e22ad64b34534ee6fcacbdbd0b74704.tar.gz
org-odt.el (org-odt-styles-dir): It is etc/org/ under vanilla Emacs
* org-odt.el (org-odt-styles-dir): Assume that the styles files are located under `data-directory' of Emacs distribution as etc/org/OrgOdtStyles.xml and etc/org/OrgOdtContentTemplate.xml. Also update docstring. (org-export-odt-schema-dir): Update docstring.
-rw-r--r--lisp/org-odt.el32
1 files changed, 24 insertions, 8 deletions
diff --git a/lisp/org-odt.el b/lisp/org-odt.el
index b2c6f33..d23909a 100644
--- a/lisp/org-odt.el
+++ b/lisp/org-odt.el
@@ -77,8 +77,9 @@
(defconst org-odt-lib-dir (file-name-directory load-file-name))
(defconst org-odt-styles-dir
- (let* ((styles-dir1 (expand-file-name "../etc/styles/" org-odt-lib-dir))
- (styles-dir2 (expand-file-name "./etc/styles/" org-odt-lib-dir))
+ (let* ((styles-dir1 (expand-file-name "../etc/styles/" org-odt-lib-dir)) ; git
+ (styles-dir2 (expand-file-name "./etc/styles/" org-odt-lib-dir)) ; elpa
+ (styles-dir3 (expand-file-name "./etc/org/" data-directory)) ; system
(styles-dir
(catch 'styles-dir
(mapc (lambda (styles-dir)
@@ -89,7 +90,7 @@
(expand-file-name
"OrgOdtStyles.xml" styles-dir)))
(throw 'styles-dir styles-dir)))
- (list styles-dir1 styles-dir2))
+ (list styles-dir1 styles-dir2 styles-dir3))
nil)))
(unless styles-dir
(error "Cannot find factory styles file. Check package dir layout"))
@@ -100,7 +101,12 @@ This directory contains the following XML files -
\"OrgOdtStyles.xml\" and \"OrgOdtContentTemplate.xml\". These
XML files are used as the default values of
`org-export-odt-styles-file' and
- `org-export-odt-content-template-file'.")
+ `org-export-odt-content-template-file'.
+
+The default value of this variable varies depending on the
+version of org in use. Note that the user could be using org
+from one of: org's own private git repository, GNU ELPA tar or
+standard Emacs.")
(defcustom org-export-odt-schema-dir
(let ((schema-dir (expand-file-name
@@ -115,10 +121,20 @@ This directory contains the following XML files -
(prog1 nil (message "Unable to locate OpenDocument schema files."))))
"Directory that contains OpenDocument schema files.
-This directory contains rnc files for OpenDocument schema. It
-also contains a \"schemas.xml\" that can be added to
-`rng-schema-locating-files' for auto validation of OpenDocument
-XML files. See also `rng-nxml-auto-validate-flag'."
+This directory contains:
+1. rnc files for OpenDocument schema
+2. a \"schemas.xml\" file that specifies locating rules needed
+ for auto validation of OpenDocument XML files.
+
+Use the customize interface to set this variable. This ensures
+that `rng-schema-locating-files' is updated and auto-validation
+of OpenDocument XML takes place based on the value
+`rng-nxml-auto-validate-flag'.
+
+The default value of this variable varies depending on the
+version of org in use. The OASIS schema files are available only
+in the org's private git repository. It is *not* bundled with
+GNU ELPA tar or standard Emacs distribution."
:type '(choice
(const :tag "Not set" nil)
(directory :tag "Schema directory"))