emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [LibreOffice] (void-variable org-line)


From: Sebastien Vauban
Subject: [O] [LibreOffice] (void-variable org-line)
Date: Thu, 28 Jun 2012 09:43:37 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (windows-nt)

Hello,

When trying to export to LibreOffice, I get this error message:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (void-variable org-line)
  (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line)
  (if (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line) (progn 
(message "%s" (match-string 1)) (when (equal (match-string 2 org-line) "START") 
(org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-line) 
"\">") (org-open-par)) (when (equal (match-string 2 org-line) "END") 
(org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote 
nextline) nil)))
  (when (string-match "^ORG-\\(.*\\)-\\(START\\|END\\)$" org-line) (message 
"%s" (match-string 1)) (when (equal (match-string 2 org-line) "START") 
(org-close-par-maybe) (insert "\n<div class=\"" (match-string 1 org-line) 
"\">") (org-open-par)) (when (equal (match-string 2 org-line) "END") 
(org-close-par-maybe) (insert "\n</div>") (org-open-par)) (throw (quote 
nextline) nil))
  org-special-blocks-convert-html-special-cookies()
  run-hooks(org-export-html-after-blockquotes-hook)
  (catch (quote nextline) (when (and (org-lparse-current-environment-p (quote 
quote)) (string-match org-outline-regexp-bol line)) (org-lparse-end-environment 
(quote quote))) (when (org-lparse-current-environment-p (quote quote)) 
(org-lparse-insert (quote LINE) line) (throw (quote nextline) nil)) (when (and 
org-export-with-fixed-width (string-match "^[       ]*:\\(\\([      
]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-lparse-current-environment-p (quote 
fixedwidth))) (org-lparse-begin-environment (quote fixedwidth))) 
(org-lparse-insert (quote LINE) (match-string 3 line)) (when (or (not lines) 
(not (string-match "^[    ]*:\\(\\([      ]\\|$\\)\\(.*\\)\\)" (car lines)))) 
(org-lparse-end-environment (quote fixedwidth))) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quote org-native-text) line) (not (< (or 
(next-single-property-change 0 (quote org-native-text) line) 10000) (length 
line)))) (let ((ind (get-text-property 0 (quote original-indentation) line))) 
(org-lparse-begin-environment (quote native)) (org-lparse-insert (quote LINE) 
line) (while (and lines (or (= (length ...) 0) (not ind) (equal ind 
(get-text-property 0 ... ...))) (or (= (length ...) 0) (get-text-property 0 
(quote org-native-text) (car lines)))) (org-lparse-insert (quote LINE) (pop 
lines))) (org-lparse-end-environment (quote native))) (throw (quote nextline) 
nil)) (when (and (get-text-property 0 (quote org-protected) line) (not (< (or 
(next-single-property-change 0 (quote org-protected) line) 10000) (length 
line)))) (let ((ind (get-text-property 0 (quote original-indentation) line))) 
(org-lparse-insert (quote LINE) line) (while (and lines (or (= (length ...) 0) 
(not ind) (equal ind (get-text-property 0 ... ...))) (or (= (length ...) 0) 
(get-text-property 0 (quote org-protected) (car lines)))) (org-lparse-insert 
(quote LINE) (pop lines)))) (throw (quote nextline) nil)) (when (string-match 
"^ORG-\\(.+\\)-\\(START\\|END\\)\\([         ]+.*\\)?$" line) (let* ((style 
(intern (downcase (match-string 1 line)))) (env-options-plist 
(org-lparse-get-block-params (match-string 3 line))) (f (cdr (assoc 
(match-string 2 line) (quote ...))))) (when (memq style (append (quote 
(blockquote verse center)) (mapcar (quote intern) org-lparse-special-blocks))) 
(funcall f style env-options-plist) (throw (quote nextline) nil)))) (run-hooks 
(quote org-export-html-after-blockquotes-hook)) (when 
(org-lparse-current-environment-p (quote verse)) (let ((i 
(org-get-string-indentation line))) (if (> i 0) (setq line (concat (let (...) 
(org-lparse-format ... ...)) " " (org-trim line)))) (unless (string-match 
"\\\\\\\\[        ]*$" line) (setq line (concat line "\\\\"))))) (setq start 0) 
(while (string-match "<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[     ]*\n?" line 
start) (cond ((get-text-property (match-beginning 1) (quote org-protected) 
line) (setq start (match-end 1))) ((match-end 2) (setq line (replace-match (let 
(...) (org-lparse-format ... "" ...)) t t line))) ((and org-export-with-toc 
(equal (string-to-char line) 42)) (setq line (replace-match (let (...) 
(org-lparse-format ... ... "target")) t t line))) (t (setq line (replace-match 
(concat (let ... ...) " ") t t line))))) (let ((org-lparse-encode-pending t)) 
(setq line (org-lparse-handle-time-stamps line))) (or (string-match 
org-table-hline-regexp line) (string-match "^[       ]*\\([+]-\\||[ ]\\)[-+ 
|]*[+|][         ]*$" line) (setq line (org-xml-encode-org-text-skip-links 
line))) (setq line (org-lparse-format-org-link line opt-plist)) (if (and 
org-todo-line-regexp (string-match org-todo-line-regexp line) (match-beginning 
2)) (setq line (concat (substring line 0 (match-beginning 2)) 
(org-lparse-format (quote TODO) (match-string 2 line)) (substring line 
(match-end 2))))) (when org-export-with-footnotes (setq start 0) (while 
(string-match "\\([^*    ].*?\\)[        ]*\\[\\([0-9]+\\)\\]" line start) (if 
(or (get-text-property (match-beginning 2) (quote org-protected) line) (not 
(get-text-property (match-beginning 2) (quote org-footnote) line))) (setq start 
(match-end 2)) (let ((n (match-string 2 line)) refcnt a) (if (setq a (assoc n 
footref-seen)) (progn (setcdr a ...) (setq refcnt ...)) (setq refcnt 1) (push 
(cons n 1) footref-seen)) (setq line (replace-match (concat ... ... ...) t t 
line)))))) (cond ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[    ]*$" line) 
(setq level (org-tr-level (- (match-end 1) (match-beginning 1) level-offset)) 
txt (match-string 2 line)) (if (string-match quote-re0 txt) (setq txt 
(replace-match "" t t txt))) (if (<= level (max umax umax-toc)) (setq 
head-count (+ head-count 1))) (unless org-lparse-dyn-first-heading-pos (setq 
org-lparse-dyn-first-heading-pos (point))) (org-lparse-begin-level level txt 
umax head-count) (when (string-match quote-re line) 
(org-lparse-begin-environment (quote quote)))) ((and org-export-with-tables 
(string-match "^\\([     ]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (not table-open) 
(setq table-open t table-buffer nil table-orig-buffer nil)) (setq table-buffer 
(cons line table-buffer) table-orig-buffer (cons origline table-orig-buffer)) 
(when (or (not lines) (not (string-match "^\\([     ]*\\)\\(|\\|\\+-+\\+\\)" 
(car lines)))) (setq table-open nil table-buffer (nreverse table-buffer) 
table-orig-buffer (nreverse table-orig-buffer)) (org-lparse-end-paragraph) 
(when org-lparse-list-table-p (error "Regular tables are not allowed in a 
list-table block")) (org-lparse-insert (quote TABLE) table-buffer 
table-orig-buffer))) (t (when (get-text-property 0 (quote list-item) line) 
(setq line (org-lparse-export-list-line line (get-text-property 0 (quote 
list-item) line) (get-text-property 0 (quote list-struct) line) 
(get-text-property 0 (quote list-prevs) line)))) (when (string-match "^[   
]*-\\{5,\\}[    ]*$" line) (with-org-lparse-preserve-paragraph-state 
(org-lparse-insert (quote HORIZONTAL-LINE))) (throw (quote nextline) nil)) 
(when (string-match "^ [-+*]-\\|^[      ]*$" line) (when 
org-lparse-footnote-number (org-lparse-end-footnote-definition 
org-lparse-footnote-number) (setq org-lparse-footnote-number nil)) 
(org-lparse-begin-paragraph)) (when org-export-with-footnotes (when (and 
(boundp (quote footnote-section-tag-regexp)) (string-match (concat "^" 
footnote-section-tag-regexp) line)) (throw (quote nextline) nil)) (when 
(string-match "^[    ]*\\[\\([0-9]+\\)\\]" line) (org-lparse-end-paragraph) 
(setq org-lparse-footnote-number (match-string 1 line)) (setq line 
(replace-match "" t t line)) (org-lparse-begin-footnote-definition 
org-lparse-footnote-number))) (cond ((string-match "\\\\\\\\[      ]*$" line) 
(setq line (replace-match (org-lparse-format ...) t t line))) 
(org-export-preserve-breaks (setq line (concat line (org-lparse-format ...))))) 
(let ((start 0)) (while (and org-lparse-par-open (string-match "\\\\par\\>" 
line start)) (error "FIXME") (if (not (get-text-property ... ... line)) (setq 
line (replace-match "</p ><p >" t t line))) (setq start (match-end 0)))) 
(org-lparse-insert (quote LINE) line))))
  (while (setq line (pop lines) origline line) (catch (quote nextline) (when 
(and (org-lparse-current-environment-p (quote quote)) (string-match 
org-outline-regexp-bol line)) (org-lparse-end-environment (quote quote))) (when 
(org-lparse-current-environment-p (quote quote)) (org-lparse-insert (quote 
LINE) line) (throw (quote nextline) nil)) (when (and 
org-export-with-fixed-width (string-match "^[  ]*:\\(\\([      
]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-lparse-current-environment-p (quote 
fixedwidth))) (org-lparse-begin-environment (quote fixedwidth))) 
(org-lparse-insert (quote LINE) (match-string 3 line)) (when (or (not lines) 
(not (string-match "^[    ]*:\\(\\([      ]\\|$\\)\\(.*\\)\\)" (car lines)))) 
(org-lparse-end-environment (quote fixedwidth))) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quote org-native-text) line) (not (< (or 
(next-single-property-change 0 ... line) 10000) (length line)))) (let ((ind 
(get-text-property 0 (quote original-indentation) line))) 
(org-lparse-begin-environment (quote native)) (org-lparse-insert (quote LINE) 
line) (while (and lines (or (= ... 0) (not ind) (equal ind ...)) (or (= ... 0) 
(get-text-property 0 ... ...))) (org-lparse-insert (quote LINE) (pop lines))) 
(org-lparse-end-environment (quote native))) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quote org-protected) line) (not (< (or 
(next-single-property-change 0 ... line) 10000) (length line)))) (let ((ind 
(get-text-property 0 (quote original-indentation) line))) (org-lparse-insert 
(quote LINE) line) (while (and lines (or (= ... 0) (not ind) (equal ind ...)) 
(or (= ... 0) (get-text-property 0 ... ...))) (org-lparse-insert (quote LINE) 
(pop lines)))) (throw (quote nextline) nil)) (when (string-match 
"^ORG-\\(.+\\)-\\(START\\|END\\)\\([     ]+.*\\)?$" line) (let* ((style (intern 
(downcase ...))) (env-options-plist (org-lparse-get-block-params (match-string 
3 line))) (f (cdr (assoc ... ...)))) (when (memq style (append (quote ...) 
(mapcar ... org-lparse-special-blocks))) (funcall f style env-options-plist) 
(throw (quote nextline) nil)))) (run-hooks (quote 
org-export-html-after-blockquotes-hook)) (when 
(org-lparse-current-environment-p (quote verse)) (let ((i 
(org-get-string-indentation line))) (if (> i 0) (setq line (concat (let ... 
...) " " (org-trim line)))) (unless (string-match "\\\\\\\\[       ]*$" line) 
(setq line (concat line "\\\\"))))) (setq start 0) (while (string-match 
"<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[     ]*\n?" line start) (cond 
((get-text-property (match-beginning 1) (quote org-protected) line) (setq start 
(match-end 1))) ((match-end 2) (setq line (replace-match (let ... ...) t t 
line))) ((and org-export-with-toc (equal (string-to-char line) 42)) (setq line 
(replace-match (let ... ...) t t line))) (t (setq line (replace-match (concat 
... " ") t t line))))) (let ((org-lparse-encode-pending t)) (setq line 
(org-lparse-handle-time-stamps line))) (or (string-match org-table-hline-regexp 
line) (string-match "^[         ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][         ]*$" 
line) (setq line (org-xml-encode-org-text-skip-links line))) (setq line 
(org-lparse-format-org-link line opt-plist)) (if (and org-todo-line-regexp 
(string-match org-todo-line-regexp line) (match-beginning 2)) (setq line 
(concat (substring line 0 (match-beginning 2)) (org-lparse-format (quote TODO) 
(match-string 2 line)) (substring line (match-end 2))))) (when 
org-export-with-footnotes (setq start 0) (while (string-match "\\([^*    
].*?\\)[        ]*\\[\\([0-9]+\\)\\]" line start) (if (or (get-text-property 
(match-beginning 2) (quote org-protected) line) (not (get-text-property ... ... 
line))) (setq start (match-end 2)) (let ((n ...) refcnt a) (if (setq a ...) 
(progn ... ...) (setq refcnt 1) (push ... footref-seen)) (setq line 
(replace-match ... t t line)))))) (cond ((string-match "^\\(\\*+\\)\\(?: 
+\\(.*?\\)\\)?[   ]*$" line) (setq level (org-tr-level (- (match-end 1) 
(match-beginning 1) level-offset)) txt (match-string 2 line)) (if (string-match 
quote-re0 txt) (setq txt (replace-match "" t t txt))) (if (<= level (max umax 
umax-toc)) (setq head-count (+ head-count 1))) (unless 
org-lparse-dyn-first-heading-pos (setq org-lparse-dyn-first-heading-pos 
(point))) (org-lparse-begin-level level txt umax head-count) (when 
(string-match quote-re line) (org-lparse-begin-environment (quote quote)))) 
((and org-export-with-tables (string-match "^\\([     ]*\\)\\(|\\|\\+-+\\+\\)" 
line)) (when (not table-open) (setq table-open t table-buffer nil 
table-orig-buffer nil)) (setq table-buffer (cons line table-buffer) 
table-orig-buffer (cons origline table-orig-buffer)) (when (or (not lines) (not 
(string-match "^\\([     ]*\\)\\(|\\|\\+-+\\+\\)" ...))) (setq table-open nil 
table-buffer (nreverse table-buffer) table-orig-buffer (nreverse 
table-orig-buffer)) (org-lparse-end-paragraph) (when org-lparse-list-table-p 
(error "Regular tables are not allowed in a list-table block")) 
(org-lparse-insert (quote TABLE) table-buffer table-orig-buffer))) (t (when 
(get-text-property 0 (quote list-item) line) (setq line 
(org-lparse-export-list-line line (get-text-property 0 ... line) 
(get-text-property 0 ... line) (get-text-property 0 ... line)))) (when 
(string-match "^[        ]*-\\{5,\\}[    ]*$" line) 
(with-org-lparse-preserve-paragraph-state (org-lparse-insert (quote 
HORIZONTAL-LINE))) (throw (quote nextline) nil)) (when (string-match "^ 
[-+*]-\\|^[      ]*$" line) (when org-lparse-footnote-number 
(org-lparse-end-footnote-definition org-lparse-footnote-number) (setq 
org-lparse-footnote-number nil)) (org-lparse-begin-paragraph)) (when 
org-export-with-footnotes (when (and (boundp ...) (string-match ... line)) 
(throw (quote nextline) nil)) (when (string-match "^[         
]*\\[\\([0-9]+\\)\\]" line) (org-lparse-end-paragraph) (setq 
org-lparse-footnote-number (match-string 1 line)) (setq line (replace-match "" 
t t line)) (org-lparse-begin-footnote-definition org-lparse-footnote-number))) 
(cond ((string-match "\\\\\\\\[      ]*$" line) (setq line (replace-match ... t 
t line))) (org-export-preserve-breaks (setq line (concat line ...)))) (let 
((start 0)) (while (and org-lparse-par-open (string-match "\\\\par\\>" line 
start)) (error "FIXME") (if (not ...) (setq line ...)) (setq start (match-end 
0)))) (org-lparse-insert (quote LINE) line)))))
  (let ((case-fold-search nil) (org-odd-levels-only odd)) (mapc (lambda (x) 
(set (make-local-variable (nth 2 x)) (plist-get opt-plist (car x)))) 
org-export-plist-vars) (setq umax (if arg (prefix-numeric-value arg) 
org-export-headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) 
(min org-export-with-toc umax) umax)) (setq org-lparse-opt-plist (plist-put 
org-lparse-opt-plist :headline-levels umax)) (when (and org-export-with-toc 
(not body-only)) (setq lines (org-lparse-prepare-toc lines level-offset 
opt-plist umax-toc))) (unless body-only (org-lparse-begin (quote 
DOCUMENT-CONTENT) opt-plist) (org-lparse-begin (quote DOCUMENT-BODY) 
opt-plist)) (setq head-count 0) (org-init-section-numbers) 
(org-lparse-begin-paragraph) (while (setq line (pop lines) origline line) 
(catch (quote nextline) (when (and (org-lparse-current-environment-p (quote 
quote)) (string-match org-outline-regexp-bol line)) (org-lparse-end-environment 
(quote quote))) (when (org-lparse-current-environment-p (quote quote)) 
(org-lparse-insert (quote LINE) line) (throw (quote nextline) nil)) (when (and 
org-export-with-fixed-width (string-match "^[         ]*:\\(\\([      
]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-lparse-current-environment-p (quote 
fixedwidth))) (org-lparse-begin-environment (quote fixedwidth))) 
(org-lparse-insert (quote LINE) (match-string 3 line)) (when (or (not lines) 
(not (string-match "^[    ]*:\\(\\([      ]\\|$\\)\\(.*\\)\\)" ...))) 
(org-lparse-end-environment (quote fixedwidth))) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quote org-native-text) line) (not (< (or ... 
10000) (length line)))) (let ((ind (get-text-property 0 ... line))) 
(org-lparse-begin-environment (quote native)) (org-lparse-insert (quote LINE) 
line) (while (and lines (or ... ... ...) (or ... ...)) (org-lparse-insert 
(quote LINE) (pop lines))) (org-lparse-end-environment (quote native))) (throw 
(quote nextline) nil)) (when (and (get-text-property 0 (quote org-protected) 
line) (not (< (or ... 10000) (length line)))) (let ((ind (get-text-property 0 
... line))) (org-lparse-insert (quote LINE) line) (while (and lines (or ... ... 
...) (or ... ...)) (org-lparse-insert (quote LINE) (pop lines)))) (throw (quote 
nextline) nil)) (when (string-match "^ORG-\\(.+\\)-\\(START\\|END\\)\\([        
 ]+.*\\)?$" line) (let* ((style (intern ...)) (env-options-plist 
(org-lparse-get-block-params ...)) (f (cdr ...))) (when (memq style (append ... 
...)) (funcall f style env-options-plist) (throw (quote nextline) nil)))) 
(run-hooks (quote org-export-html-after-blockquotes-hook)) (when 
(org-lparse-current-environment-p (quote verse)) (let ((i 
(org-get-string-indentation line))) (if (> i 0) (setq line (concat ... " " 
...))) (unless (string-match "\\\\\\\\[         ]*$" line) (setq line (concat 
line "\\\\"))))) (setq start 0) (while (string-match 
"<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[     ]*\n?" line start) (cond 
((get-text-property (match-beginning 1) (quote org-protected) line) (setq start 
(match-end 1))) ((match-end 2) (setq line (replace-match ... t t line))) ((and 
org-export-with-toc (equal ... 42)) (setq line (replace-match ... t t line))) 
(t (setq line (replace-match ... t t line))))) (let ((org-lparse-encode-pending 
t)) (setq line (org-lparse-handle-time-stamps line))) (or (string-match 
org-table-hline-regexp line) (string-match "^[    ]*\\([+]-\\||[ ]\\)[-+ 
|]*[+|][         ]*$" line) (setq line (org-xml-encode-org-text-skip-links 
line))) (setq line (org-lparse-format-org-link line opt-plist)) (if (and 
org-todo-line-regexp (string-match org-todo-line-regexp line) (match-beginning 
2)) (setq line (concat (substring line 0 (match-beginning 2)) 
(org-lparse-format (quote TODO) (match-string 2 line)) (substring line 
(match-end 2))))) (when org-export-with-footnotes (setq start 0) (while 
(string-match "\\([^*    ].*?\\)[        ]*\\[\\([0-9]+\\)\\]" line start) (if 
(or (get-text-property ... ... line) (not ...)) (setq start (match-end 2)) (let 
(... refcnt a) (if ... ... ... ...) (setq line ...))))) (cond ((string-match 
"^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[    ]*$" line) (setq level (org-tr-level (- 
... ... level-offset)) txt (match-string 2 line)) (if (string-match quote-re0 
txt) (setq txt (replace-match "" t t txt))) (if (<= level (max umax umax-toc)) 
(setq head-count (+ head-count 1))) (unless org-lparse-dyn-first-heading-pos 
(setq org-lparse-dyn-first-heading-pos (point))) (org-lparse-begin-level level 
txt umax head-count) (when (string-match quote-re line) 
(org-lparse-begin-environment (quote quote)))) ((and org-export-with-tables 
(string-match "^\\([       ]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (not 
table-open) (setq table-open t table-buffer nil table-orig-buffer nil)) (setq 
table-buffer (cons line table-buffer) table-orig-buffer (cons origline 
table-orig-buffer)) (when (or (not lines) (not ...)) (setq table-open nil 
table-buffer (nreverse table-buffer) table-orig-buffer (nreverse 
table-orig-buffer)) (org-lparse-end-paragraph) (when org-lparse-list-table-p 
(error "Regular tables are not allowed in a list-table block")) 
(org-lparse-insert (quote TABLE) table-buffer table-orig-buffer))) (t (when 
(get-text-property 0 (quote list-item) line) (setq line 
(org-lparse-export-list-line line ... ... ...))) (when (string-match "^[    
]*-\\{5,\\}[    ]*$" line) (with-org-lparse-preserve-paragraph-state 
(org-lparse-insert ...)) (throw (quote nextline) nil)) (when (string-match "^ 
[-+*]-\\|^[  ]*$" line) (when org-lparse-footnote-number 
(org-lparse-end-footnote-definition org-lparse-footnote-number) (setq 
org-lparse-footnote-number nil)) (org-lparse-begin-paragraph)) (when 
org-export-with-footnotes (when (and ... ...) (throw ... nil)) (when 
(string-match "^[   ]*\\[\\([0-9]+\\)\\]" line) (org-lparse-end-paragraph) 
(setq org-lparse-footnote-number ...) (setq line ...) 
(org-lparse-begin-footnote-definition org-lparse-footnote-number))) (cond 
((string-match "\\\\\\\\[        ]*$" line) (setq line ...)) 
(org-export-preserve-breaks (setq line ...))) (let ((start 0)) (while (and 
org-lparse-par-open ...) (error "FIXME") (if ... ...) (setq start ...))) 
(org-lparse-insert (quote LINE) line))))) (when 
(org-lparse-current-environment-p (quote quote)) (org-lparse-end-environment 
(quote quote))) (org-lparse-end-level 1 umax) (when (and (> umax 0) 
org-lparse-dyn-first-heading-pos) (org-lparse-end-outline-text-or-outline)) 
(org-lparse-end (quote DOCUMENT-BODY) opt-plist) (unless body-only 
(org-lparse-end (quote DOCUMENT-CONTENT))) (org-lparse-end (quote EXPORT)) 
(when org-lparse-collect-buffer (kill-buffer org-lparse-collect-buffer)) 
(goto-char (point-min)) (or (org-export-push-to-kill-ring (upcase (symbol-name 
org-lparse-backend))) (message "Exporting... done")) (cond ((not to-buffer) 
(let ((f (org-lparse-get (quote SAVE-METHOD)))) (or (and f (functionp f) 
(funcall f filename opt-plist)) (save-buffer))) (or (and (boundp (quote 
org-lparse-other-backend)) org-lparse-other-backend (not (equal 
org-lparse-backend org-lparse-other-backend)) (org-lparse-do-convert 
buffer-file-name (symbol-name org-lparse-other-backend))) (current-buffer))) 
((eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) 
(point-max)) (kill-buffer (current-buffer)))) (t (current-buffer))))
  (let* (hfy-user-sheet-assoc org-lparse-encode-pending org-lparse-par-open 
(org-lparse-par-open-stashed 0) (org-lparse-list-stack (quote nil)) 
org-lparse-list-table-p org-lparse-list-table:table-cell-open 
org-lparse-list-table:table-row org-lparse-list-table:lines 
org-lparse-outline-text-open (org-lparse-latex-fragment-fallback (or 
(ignore-errors (org-lparse-get (quote LATEX-FRAGMENT-FALLBACK))) (if (and 
(org-check-external-command "latex" "" t) (org-check-external-command "dvipng" 
"" t)) (quote dvipng) (quote verbatim)))) (org-lparse-insert-tag-with-newlines 
(quote both)) (org-lparse-to-buffer to-buffer) (org-lparse-body-only body-only) 
(org-lparse-entity-control-callbacks-alist (org-lparse-get (quote 
ENTITY-CONTROL))) (org-lparse-entity-format-callbacks-alist (org-lparse-get 
(quote ENTITY-FORMAT))) (opt-plist (org-export-process-option-filters 
(org-combine-plists (org-default-export-plist) ext-plist 
(org-infile-export-plist)))) (body-only (or body-only (plist-get opt-plist 
:body-only))) valid org-lparse-dyn-first-heading-pos (odd org-odd-levels-only) 
(region-p (org-region-active-p)) (rbeg (and region-p (region-beginning))) (rend 
(and region-p (region-end))) (subtree-p (if (plist-get opt-plist 
:ignore-subtree-p) nil (when region-p (save-excursion (goto-char rbeg) (and 
(org-at-heading-p) (>= ... rend)))))) (level-offset (if subtree-p 
(save-excursion (goto-char rbeg) (+ (funcall outline-level) (if 
org-odd-levels-only 1 0))) 0)) (opt-plist (setq org-export-opt-plist (if 
subtree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))) 
(org-current-export-dir (or pub-dir (org-lparse-get (quote EXPORT-DIR) 
opt-plist))) (org-current-export-file buffer-file-name) (level 0) (line "") 
(origline "") txt todo (umax nil) (umax-toc nil) (filename (if to-buffer nil 
(expand-file-name (concat (file-name-sans-extension (or ... ...)) "." 
(org-lparse-get (quote FILE-NAME-EXTENSION) opt-plist)) (file-name-as-directory 
(or pub-dir (org-lparse-get ... opt-plist)))))) (current-dir (if 
buffer-file-name (file-name-directory buffer-file-name) default-directory)) 
(auto-insert nil) (buffer (if to-buffer (cond ((eq to-buffer (quote string)) 
(get-buffer-create (org-lparse-get ...))) (t (get-buffer-create to-buffer))) 
(find-file-noselect (or (let (...) (and f ... ...)) filename)))) 
(org-levels-open (make-vector org-level-max nil)) (dummy (mapc (lambda (p) 
(let* ((val ...) (val ...)) (setq opt-plist (plist-put opt-plist p val)))) 
(quote (:date :author :keywords :description)))) (date (plist-get opt-plist 
:date)) (date (cond ((and date (string-match "%" date)) (format-time-string 
date)) (date date) (t (format-time-string "%Y-%m-%d %T %Z")))) (dummy (setq 
opt-plist (plist-put opt-plist :effective-date date))) (title 
(org-xml-encode-org-text-skip-links (or (and subtree-p 
(org-export-get-title-from-subtree)) (plist-get opt-plist :title) (and (not 
body-only) (not (plist-get opt-plist :skip-before-1st-heading)) 
(org-export-grab-title-from-buffer)) (and buffer-file-name 
(file-name-sans-extension (file-name-nondirectory buffer-file-name))) 
"UNTITLED"))) (dummy (setq opt-plist (plist-put opt-plist :title title))) 
(html-table-tag (plist-get opt-plist :html-table-tag)) (quote-re0 (concat "^ *" 
org-quote-string "\\( +\\|[    ]*$\\)")) (quote-re (format 
org-heading-keyword-regexp-format org-quote-string)) ...) (let 
((inhibit-read-only t)) (org-unmodified (remove-text-properties (point-min) 
(point-max) (quote (:org-license-to-kill t))))) (message "Exporting...") 
(org-init-section-numbers) (setq org-lparse-output-buffer buffer) (set-buffer 
org-lparse-output-buffer) (let ((inhibit-read-only t)) (erase-buffer)) 
(fundamental-mode) (org-install-letbind) (and (fboundp (quote 
set-buffer-file-coding-system)) (set-buffer-file-coding-system 
coding-system-for-write)) (let ((case-fold-search nil) (org-odd-levels-only 
odd)) (mapc (lambda (x) (set (make-local-variable (nth 2 x)) (plist-get 
opt-plist (car x)))) org-export-plist-vars) (setq umax (if arg 
(prefix-numeric-value arg) org-export-headline-levels)) (setq umax-toc (if 
(integerp org-export-with-toc) (min org-export-with-toc umax) umax)) (setq 
org-lparse-opt-plist (plist-put org-lparse-opt-plist :headline-levels umax)) 
(when (and org-export-with-toc (not body-only)) (setq lines 
(org-lparse-prepare-toc lines level-offset opt-plist umax-toc))) (unless 
body-only (org-lparse-begin (quote DOCUMENT-CONTENT) opt-plist) 
(org-lparse-begin (quote DOCUMENT-BODY) opt-plist)) (setq head-count 0) 
(org-init-section-numbers) (org-lparse-begin-paragraph) (while (setq line (pop 
lines) origline line) (catch (quote nextline) (when (and 
(org-lparse-current-environment-p (quote quote)) (string-match 
org-outline-regexp-bol line)) (org-lparse-end-environment (quote quote))) (when 
(org-lparse-current-environment-p (quote quote)) (org-lparse-insert (quote 
LINE) line) (throw (quote nextline) nil)) (when (and 
org-export-with-fixed-width (string-match "^[       ]*:\\(\\([      
]\\|$\\)\\(.*\\)\\)" line)) (when (not (org-lparse-current-environment-p ...)) 
(org-lparse-begin-environment (quote fixedwidth))) (org-lparse-insert (quote 
LINE) (match-string 3 line)) (when (or (not lines) (not ...)) 
(org-lparse-end-environment (quote fixedwidth))) (throw (quote nextline) nil)) 
(when (and (get-text-property 0 (quote org-native-text) line) (not (< ... 
...))) (let ((ind ...)) (org-lparse-begin-environment (quote native)) 
(org-lparse-insert (quote LINE) line) (while (and lines ... ...) 
(org-lparse-insert ... ...)) (org-lparse-end-environment (quote native))) 
(throw (quote nextline) nil)) (when (and (get-text-property 0 (quote 
org-protected) line) (not (< ... ...))) (let ((ind ...)) (org-lparse-insert 
(quote LINE) line) (while (and lines ... ...) (org-lparse-insert ... ...))) 
(throw (quote nextline) nil)) (when (string-match 
"^ORG-\\(.+\\)-\\(START\\|END\\)\\([         ]+.*\\)?$" line) (let* ((style 
...) (env-options-plist ...) (f ...)) (when (memq style ...) (funcall f style 
env-options-plist) (throw ... nil)))) (run-hooks (quote 
org-export-html-after-blockquotes-hook)) (when 
(org-lparse-current-environment-p (quote verse)) (let ((i ...)) (if (> i 0) 
(setq line ...)) (unless (string-match "\\\\\\\\[       ]*$" line) (setq line 
...)))) (setq start 0) (while (string-match 
"<<<?\\([^<>]*\\)>>>?\\((INVISIBLE)\\)?[      ]*\n?" line start) (cond 
((get-text-property ... ... line) (setq start ...)) ((match-end 2) (setq line 
...)) ((and org-export-with-toc ...) (setq line ...)) (t (setq line ...)))) 
(let ((org-lparse-encode-pending t)) (setq line (org-lparse-handle-time-stamps 
line))) (or (string-match org-table-hline-regexp line) (string-match "^[      
]*\\([+]-\\||[ ]\\)[-+ |]*[+|][         ]*$" line) (setq line 
(org-xml-encode-org-text-skip-links line))) (setq line 
(org-lparse-format-org-link line opt-plist)) (if (and org-todo-line-regexp 
(string-match org-todo-line-regexp line) (match-beginning 2)) (setq line 
(concat (substring line 0 ...) (org-lparse-format ... ...) (substring line 
...)))) (when org-export-with-footnotes (setq start 0) (while (string-match 
"\\([^*         ].*?\\)[        ]*\\[\\([0-9]+\\)\\]" line start) (if (or ... 
...) (setq start ...) (let ... ... ...)))) (cond ((string-match 
"^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[         ]*$" line) (setq level (org-tr-level 
...) txt (match-string 2 line)) (if (string-match quote-re0 txt) (setq txt 
...)) (if (<= level ...) (setq head-count ...)) (unless 
org-lparse-dyn-first-heading-pos (setq org-lparse-dyn-first-heading-pos ...)) 
(org-lparse-begin-level level txt umax head-count) (when (string-match quote-re 
line) (org-lparse-begin-environment ...))) ((and org-export-with-tables 
(string-match "^\\([      ]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (not 
table-open) (setq table-open t table-buffer nil table-orig-buffer nil)) (setq 
table-buffer (cons line table-buffer) table-orig-buffer (cons origline 
table-orig-buffer)) (when (or ... ...) (setq table-open nil table-buffer ... 
table-orig-buffer ...) (org-lparse-end-paragraph) (when org-lparse-list-table-p 
...) (org-lparse-insert ... table-buffer table-orig-buffer))) (t (when 
(get-text-property 0 ... line) (setq line ...)) (when (string-match "^[     
]*-\\{5,\\}[    ]*$" line) (with-org-lparse-preserve-paragraph-state ...) 
(throw ... nil)) (when (string-match "^ [-+*]-\\|^[   ]*$" line) (when 
org-lparse-footnote-number ... ...) (org-lparse-begin-paragraph)) (when 
org-export-with-footnotes (when ... ...) (when ... ... ... ... ...)) (cond (... 
...) (org-export-preserve-breaks ...)) (let (...) (while ... ... ... ...)) 
(org-lparse-insert (quote LINE) line))))) (when 
(org-lparse-current-environment-p (quote quote)) (org-lparse-end-environment 
(quote quote))) (org-lparse-end-level 1 umax) (when (and (> umax 0) 
org-lparse-dyn-first-heading-pos) (org-lparse-end-outline-text-or-outline)) 
(org-lparse-end (quote DOCUMENT-BODY) opt-plist) (unless body-only 
(org-lparse-end (quote DOCUMENT-CONTENT))) (org-lparse-end (quote EXPORT)) 
(when org-lparse-collect-buffer (kill-buffer org-lparse-collect-buffer)) 
(goto-char (point-min)) (or (org-export-push-to-kill-ring (upcase (symbol-name 
org-lparse-backend))) (message "Exporting... done")) (cond ((not to-buffer) 
(let ((f (org-lparse-get ...))) (or (and f (functionp f) (funcall f filename 
opt-plist)) (save-buffer))) (or (and (boundp (quote org-lparse-other-backend)) 
org-lparse-other-backend (not (equal org-lparse-backend 
org-lparse-other-backend)) (org-lparse-do-convert buffer-file-name (symbol-name 
org-lparse-other-backend))) (current-buffer))) ((eq to-buffer (quote string)) 
(prog1 (buffer-substring (point-min) (point-max)) (kill-buffer 
(current-buffer)))) (t (current-buffer)))))
  org-do-lparse(nil hidden nil nil nil nil)
  (let* ((org-lparse-backend (intern native-backend)) (org-lparse-other-backend 
(and target-backend (intern target-backend)))) (unless 
(org-lparse-backend-is-native-p native-backend) (error "Don't know how to 
export natively to backend %s" native-backend)) (unless (or (equal 
native-backend target-backend) (org-lparse-reachable-p native-backend 
target-backend)) (error "Don't know how to export to backend %s %s" 
target-backend (format "via %s" native-backend))) (run-hooks (quote 
org-export-first-hook)) (org-do-lparse arg hidden ext-plist to-buffer body-only 
pub-dir))
  org-lparse("odt" "odt" nil hidden)
  (or file-or-buf (org-lparse target-backend native-backend arg (quote hidden)))
  (let (f (file-or-buf (or file-or-buf (org-lparse target-backend 
native-backend arg (quote hidden))))) (when file-or-buf (setq f (cond ((bufferp 
file-or-buf) buffer-file-name) ((file-exists-p file-or-buf) file-or-buf) (t 
(error "org-lparse-and-open: This shouldn't happen")))) (message "Opening file 
%s" f) (org-open-file f) (when org-export-kill-product-buffer-when-displayed 
(kill-buffer (current-buffer)))))
  org-lparse-and-open("odt" "odt" nil)
  org-export-as-odt-and-open(nil)
  call-interactively(org-export-as-odt-and-open)
  (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not 
(org-region-active-p))) (let ((p (start-process (concat "Exporting " 
(file-name-nondirectory (buffer-file-name))) "*Org Processes*" 
(expand-file-name invocation-name invocation-directory) "-batch" "-l" 
user-init-file "--eval" "(require 'org-exp)" "--eval" "(setq org-wait .2)" 
(buffer-file-name) "-f" (symbol-name (nth 1 ass))))) (set-process-sentinel p 
(quote org-export-process-sentinel)) (message "Background process \"%s\": 
started" p)) (if subtree-p (progn (org-mark-subtree) (org-activate-mark))) 
(call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window cbuf)) (let 
((cw (selected-window))) (select-window (get-buffer-window cbuf)) (goto-char 
cpos) (deactivate-mark) (select-window cw))))
  (let* ((bg (org-xor (equal arg (quote (16))) org-export-run-in-background)) 
(subtree-p (or (org-region-active-p) (eq org-export-initial-scope (quote 
subtree)))) (help "[t]   insert the export option template\n[v]   limit export 
to visible part of outline tree\n[1]   switch buffer/subtree export\n[SPC] 
publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME 
prop)\n\n[a/n/u] export as ASCII/Latin-1/UTF-8         [A/N/U] to temporary 
buffer\n\n[h] export as HTML      [H] to temporary buffer   [R] export 
region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX     [L] 
to temporary buffer\n[p] export as LaTeX and process to PDF            [d] ... 
and open PDF file\n\n[D] export as DocBook   [V] export as DocBook, process to 
PDF, and open\n\n[o] export as OpenDocument Text                   [O] ... and 
open\n\n[j] export as TaskJuggler                         [J] ... and 
open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using 
Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar 
file\n[I] export all agenda files as iCalendar files   [c] ...as one combined 
file\n\n[F] publish current file          [P] publish current project\n[X] 
publish a project...          [E] publish every projects") (cmds (quote ((116 
org-insert-export-options-template nil) (118 org-export-visible nil) (97 
org-export-as-ascii t) (65 org-export-as-ascii-to-buffer t) (110 
org-export-as-latin1 t) (78 org-export-as-latin1-to-buffer t) (117 
org-export-as-utf8 t) (85 org-export-as-utf8-to-buffer t) (104 
org-export-as-html t) (98 org-export-as-html-and-open t) (72 
org-export-as-html-to-buffer nil) (82 org-export-region-as-html nil) (120 
org-export-as-xoxo t) (103 org-export-generic t) (68 org-export-as-docbook t) 
(86 org-export-as-docbook-pdf-and-open t) (111 org-export-as-odt t) (79 
org-export-as-odt-and-open t) (106 org-export-as-taskjuggler t) (74 
org-export-as-taskjuggler-and-open t) (109 org-export-as-freemind t) (108 
org-export-as-latex t) (112 org-export-as-pdf t) (100 
org-export-as-pdf-and-open t) (76 org-export-as-latex-to-buffer nil) (105 
org-export-icalendar-this-file t) (73 org-export-icalendar-all-agenda-files t) 
(99 org-export-icalendar-combine-agenda-files t) (70 org-publish-current-file 
t) (80 org-publish-current-project t) (88 org-publish t) (69 org-publish-all 
t)))) r1 r2 ass (cpos (point)) (cbuf (current-buffer)) bpos) (save-excursion 
(save-window-excursion (if subtree-p (message "Export subtree: ") (message 
"Export buffer: ")) (delete-other-windows) (with-output-to-temp-buffer "*Org 
Export/Publishing Help*" (princ help)) (org-fit-window-to-buffer 
(get-buffer-window "*Org Export/Publishing Help*")) (while (eq (setq r1 
(read-char-exclusive)) 49) (cond (subtree-p (setq subtree-p nil) (message 
"Export buffer: ")) ((not subtree-p) (setq subtree-p t) (setq bpos (point)) 
(message "Export subtree: ")))) (when (eq r1 32) (let ((case-fold-search t) 
(end (save-excursion ... ...))) (outline-next-heading) (if (re-search-backward 
"^[   ]+\\(:latex_class:\\|:export_title:\\|:export_file_name:\\)[    ]+\\S-" 
end t) (progn (org-back-to-heading t) (setq subtree-p t) (setq bpos ...) 
(message "Select command (for subtree): ") (setq r1 ...)) (error "No enclosing 
node with LaTeX_CLASS or EXPORT_TITLE or EXPORT_FILE_NAME")))))) (if (fboundp 
(quote redisplay)) (redisplay)) (and bpos (goto-char bpos)) (setq r2 (if (< r1 
27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) (error "No command 
associated with key %c" r1)) (if (and bg (nth 2 ass) (not (buffer-base-buffer)) 
(not (org-region-active-p))) (let ((p (start-process (concat "Exporting " 
(file-name-nondirectory ...)) "*Org Processes*" (expand-file-name 
invocation-name invocation-directory) "-batch" "-l" user-init-file "--eval" 
"(require 'org-exp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" 
(symbol-name (nth 1 ass))))) (set-process-sentinel p (quote 
org-export-process-sentinel)) (message "Background process \"%s\": started" p)) 
(if subtree-p (progn (org-mark-subtree) (org-activate-mark))) 
(call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window cbuf)) (let 
((cw (selected-window))) (select-window (get-buffer-window cbuf)) (goto-char 
cpos) (deactivate-mark) (select-window cw)))))
  org-export(nil)
  call-interactively(org-export nil nil)
--8<---------------cut here---------------end--------------->8---

Info:
- Windows XP with Cygwin's zip utility
- GNU Emacs 24.1.1 (i386-mingw-nt5.1.2600) of 2012-06-02 on MARVIN
- Org-mode version 7.8.11 (release_7.8.11-89-gcf8d97.dirty @ 
c:/home/sva/src/org-mode/lisp/)

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]