setup.el: Associate all know OpenDocument filetypes with archive-mode.
[org-mode/org-jambu.git] / contrib / odt / setup.el
blob56658a716d3dc0bcad3c8329857222e7e95e228a
1 ;; Root dir where oo.git is cloned. Customize this as necessary
3 (unless (boundp 'org-odt-base-dir)
4 (error "Please configure org-odt-base-dir."))
6 (setq load-path (cons (expand-file-name "./lisp/" org-odt-base-dir) load-path))
7 (setq org-odt-contrib-dir (expand-file-name "./contrib/odt/" org-odt-base-dir))
9 ;; archive mode
10 (setq auto-mode-alist
11 (append '(
12 ("\\.odt$" . archive-mode) ; OpenDocument Text
13 ("\\.ott$" . archive-mode) ; OpenDocument Text Template
14 ("\\.odm$" . archive-mode) ; OpenDocument Master Document
15 ("\\.ods$" . archive-mode) ; OpenDocument Spreadsheet
16 ("\\.ots$" . archive-mode) ; OpenDocument Spreadsheet Template
17 ("\\.odg$" . archive-mode) ; OpenDocument Drawing (Graphics)
18 ("\\.otg$" . archive-mode) ; OpenDocument Drawing Template
19 ("\\.odp$" . archive-mode) ; OpenDocument Presentation
20 ("\\.otp$" . archive-mode) ; OpenDocument Presentation Template
21 ("\\.odi$" . archive-mode) ; OpenDocument Image
22 ("\\.odf$" . archive-mode) ; OpenDocument Formula
23 ("\\.odc$" . archive-mode) ; OpenDocument Chart
25 auto-mode-alist))
26 (require 'arc-mode)
28 ;; RelaxNG
29 (custom-set-variables '(rng-nxml-auto-validate-flag t))
30 (eval-after-load 'rng-loc
31 '(push (expand-file-name "schemas.xml" org-odt-contrib-dir)
32 rng-schema-locating-files))
34 ;; org
35 (eval-after-load 'org '(push '("\\.odt\\'" . system) org-file-apps))
37 ;; org-odt
38 (eval-after-load 'org-odt
39 '(setq org-export-odt-styles-file
40 (expand-file-name "OrgOdtStyles.xml" org-odt-contrib-dir)
41 org-export-odt-automatic-styles-file
42 (expand-file-name "OrgOdtAutomaticStyles.xml" org-odt-contrib-dir)))
43 (require 'org-odt)
45 ;; Additional customization variables
46 ;; (setq org-export-odt-use-bookmarks-for-internal-links t)
47 ;; (setq org-export-odt-use-bookmarks-for-toc nil)