org-table: match either HH:MM:SS or HH:MM (instead of MM:SS).
[org-mode.git] / contrib / lisp / test-org-export-preproc.el
blobb03da7095e754a6b1c2e1757e396997ffe6483e6
1 (require 'org-export-generic)
3 (defun test-preproc ()
4 (interactive)
5 (let ((string
6 (let ((region
7 (buffer-substring
8 (if (org-region-active-p) (region-beginning) (point-min))
9 (if (org-region-active-p) (region-end) (point-max))))
10 (opt-plist (org-combine-plists (org-default-export-plist)
11 (org-infile-export-plist)))
12 (export-plist '("tikiwiki" :file-suffix ".txt" :key-binding 85 :header-prefix "" :header-suffix "" :title-format "-= %s =-\n" :date-export nil :toc-export nil :body-header-section-numbers nil :body-section-prefix "\n" :body-section-header-prefix
13 ("! " "!! " "!!! " "!!!! " "!!!!! " "!!!!!! " "!!!!!!! ")
14 :body-section-header-suffix
15 (" \n" " \n" " \n" " \n" " \n" " \n")
16 :body-line-export-preformated t :body-line-format "%s " :body-line-wrap nil :body-line-fixed-format " %s\n" :body-list-format "* %s\n" :body-number-list-format "# %s\n" :blockquote-start "\n^\n" :blockquote-end "^\n\n" :body-newline-paragraph "\n" :bold-format "__%s__" :italic-format "''%s''" :underline-format "===%s===" :strikethrough-format "--%s--" :code-format "-+%s+-" :verbatim-format "~pp~%s~/pp~")))
17 (org-export-preprocess-string
18 region
19 :for-ascii t
20 :skip-before-1st-heading
21 (plist-get opt-plist :skip-before-1st-heading)
22 :drawers (plist-get export-plist :drawers-export)
23 :tags (plist-get export-plist :tags-export)
24 :priority (plist-get export-plist :priority-export)
25 :footnotes (plist-get export-plist :footnotes-export)
26 :timestamps (plist-get export-plist :timestamps-export)
27 :todo-keywords (plist-get export-plist :todo-keywords-export)
28 :verbatim-multiline t
29 :select-tags (plist-get export-plist :select-tags-export)
30 :exclude-tags (plist-get export-plist :exclude-tags-export)
31 :emph-multiline t
32 :archived-trees
33 (plist-get export-plist :archived-trees-export)
34 :add-text (plist-get opt-plist :text)))))
35 (save-excursion
36 (org-pop-to-buffer-same-window "*preproc-temp*")
37 (point-max)
38 (insert string))))