From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [LibreOffice] (void-variable org-line) Date: Thu, 28 Jun 2012 13:50:07 +0200 Message-ID: <80bok3lkpc.fsf@somewhere.org> References: <80d34jkhjq.fsf@somewhere.org> <8162abn12g.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Jambunathan, Jambunathan K wrote: > "Sebastien Vauban" writes: > >> When trying to export to LibreOffice, I get this error message: >> >> Debugger entered--Lisp error: (void-variable org-line) > > Fixed in both master and maint. That does work. Thanks for your speedy answer and fix! However, I'm now blocked by this: --8<---------------cut here---------------start------------->8--- Debugger entered--Lisp error: (error "Cannot determine style name for entit= y default of type character") signal(error ("Cannot determine style name for entity default of type cha= racter")) error("Cannot determine style name for entity %s of type %s" default char= acter) (or (cdr (assoc entity (cdr (assoc category org-export-odt-org-styles-ali= st)))) (cdr (assoc entity (cdr (assoc category org-export-odt-default-org-s= tyles-alist)))) (error "Cannot determine style name for entity %s of type %= s" entity category)) (let ((entity (or entity (quote default)))) (or (cdr (assoc entity (cdr (= assoc category org-export-odt-org-styles-alist)))) (cdr (assoc entity (cdr = (assoc category org-export-odt-default-org-styles-alist)))) (error "Cannot = determine style name for entity %s of type %s" entity category))) org-odt-get-style-name-for-entity(character nil) (cond ((stringp style) (org-odt-remap-stylenames style)) ((symbolp style)= (org-odt-get-style-name-for-entity (quote character) style)) ((listp style= ) (assert (< 1 (length style))) (let ((parent-style (pop style))) (mapconca= t (lambda (s) (org-odt-remap-stylenames s)) style "") (org-odt-remap-stylen= ames parent-style))) (t (error "Don't how to handle style %s" style))) (let* ((style-name (cond ((stringp style) (org-odt-remap-stylenames style= )) ((symbolp style) (org-odt-get-style-name-for-entity (quote character) st= yle)) ((listp style) (assert (< 1 (length style))) (let ((parent-style ...)= ) (mapconcat (lambda ... ...) style "") (org-odt-remap-stylenames parent-st= yle))) (t (error "Don't how to handle style %s" style))))) (org-odt-format-= tags (quote ("" . "")) text= style-name)) org-odt-format-fontify(#("(XXX to be tested)" 0 18 (fontified nil list-it= em 3001 list-struct ((2845 0 "- " nil nil nil 2959) (2868 2 "+ " nil nil ni= l 2938) (2938 2 "+ " nil nil nil 2959) (2959 0 "- " nil nil nil 3056) (2980= 2 "+ " nil nil nil 3001) (3001 2 "+ " nil nil nil 3056) (3056 0 "- " nil n= il nil 3121) (3096 2 "+ " nil nil nil 3121)) list-prevs ((2845) (2868) (293= 8 . 2868) (2959 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) list-con= text nil)) nil) apply(org-odt-format-fontify (#("(XXX to be tested)" 0 18 (fontified nil = list-item 3001 list-struct ((2845 0 "- " nil nil nil 2959) (2868 2 "+ " nil= nil nil 2938) (2938 2 "+ " nil nil nil 2959) (2959 0 "- " nil nil nil 3056= ) (2980 2 "+ " nil nil nil 3001) (3001 2 "+ " nil nil nil 3056) (3056 0 "- = " nil nil nil 3121) (3096 2 "+ " nil nil nil 3121)) list-prevs ((2845) (286= 8) (2938 . 2868) (2959 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) l= ist-context nil)) nil)) (let ((f (cdr (assoc entity org-lparse-entity-format-callbacks-alist)))) = (unless f (error "Unknown entity: %s" entity)) (apply f args)) (cond ((consp entity) (let ((text (pop args))) (apply (quote org-lparse-f= ormat) (quote TAGS) entity text args))) (t (let ((f (cdr (assoc entity org-= lparse-entity-format-callbacks-alist)))) (unless f (error "Unknown entity: = %s" entity)) (apply f args)))) org-lparse-format(FONTIFY #("(XXX to be tested)" 0 18 (fontified nil list= -item 3001 list-struct ((2845 0 "- " nil nil nil 2959) (2868 2 "+ " nil nil= nil 2938) (2938 2 "+ " nil nil nil 2959) (2959 0 "- " nil nil nil 3056) (2= 980 2 "+ " nil nil nil 3001) (3001 2 "+ " nil nil nil 3056) (3056 0 "- " ni= l nil nil 3121) (3096 2 "+ " nil nil nil 3121)) list-prevs ((2845) (2868) (= 2938 . 2868) (2959 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) list-= context nil)) nil) (concat (match-string 1 string) (org-lparse-format (quote FONTIFY) (match= -string 4 string) (nth 1 (assoc (match-string 3 string) org-lparse-char-sty= les))) (match-string 5 string)) (setq s (match-beginning 0) rpl (concat (match-string 1 string) (org-lpar= se-format (quote FONTIFY) (match-string 4 string) (nth 1 (assoc (match-stri= ng 3 string) org-lparse-char-styles))) (match-string 5 string)) string (rep= lace-match rpl t t string) s (+ s (- (length rpl) 2))) (if (not (equal (substring string (match-beginning 3) (1+ (match-beginnin= g 3))) (substring string (match-beginning 4) (1+ (match-beginning 4))))) (s= etq s (match-beginning 0) rpl (concat (match-string 1 string) (org-lparse-f= ormat (quote FONTIFY) (match-string 4 string) (nth 1 (assoc (match-string 3= string) org-lparse-char-styles))) (match-string 5 string)) string (replace= -match rpl t t string) s (+ s (- (length rpl) 2))) (setq s (1+ s))) (while (string-match org-emph-re string s) (if (not (equal (substring str= ing (match-beginning 3) (1+ (match-beginning 3))) (substring string (match-= beginning 4) (1+ (match-beginning 4))))) (setq s (match-beginning 0) rpl (c= oncat (match-string 1 string) (org-lparse-format (quote FONTIFY) (match-str= ing 4 string) (nth 1 (assoc (match-string 3 string) org-lparse-char-styles)= )) (match-string 5 string)) string (replace-match rpl t t string) s (+ s (-= (length rpl) 2))) (setq s (1+ s)))) (let ((s 0) rpl) (while (string-match org-emph-re string s) (if (not (equ= al (substring string (match-beginning 3) (1+ (match-beginning 3))) (substri= ng string (match-beginning 4) (1+ (match-beginning 4))))) (setq s (match-be= ginning 0) rpl (concat (match-string 1 string) (org-lparse-format (quote FO= NTIFY) (match-string 4 string) (nth 1 (assoc ... org-lparse-char-styles))) = (match-string 5 string)) string (replace-match rpl t t string) s (+ s (- (l= ength rpl) 2))) (setq s (1+ s)))) string) org-lparse-apply-char-styles(#(" + Android tablet with Firefox @(XXX to = be tested)@." 0 53 (list-context nil list-prevs ((2845) (2868) (2938 . 2868= ) (2959 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) list-struct ((28= 45 0 "- " nil nil nil 2959) (2868 2 "+ " nil nil nil 2938) (2938 2 "+ " nil= nil nil 2959) (2959 0 "- " nil nil nil 3056) (2980 2 "+ " nil nil nil 3001= ) (3001 2 "+ " nil nil nil 3056) (3056 0 "- " nil nil nil 3121) (3096 2 "+ = " nil nil nil 3121)) list-item 3001 fontified nil))) (setq s (org-lparse-apply-char-styles s)) (if org-export-with-emphasize (setq s (org-lparse-apply-char-styles s))) org-xml-encode-org-text(#(" + Android tablet with Firefox @(XXX to be te= sted)@." 0 53 (list-context nil list-prevs ((2845) (2868) (2938 . 2868) (29= 59 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) list-struct ((2845 0 = "- " nil nil nil 2959) (2868 2 "+ " nil nil nil 2938) (2938 2 "+ " nil nil = nil 2959) (2959 0 "- " nil nil nil 3056) (2980 2 "+ " nil nil nil 3001) (30= 01 2 "+ " nil nil nil 3056) (3056 0 "- " nil nil nil 3121) (3096 2 "+ " nil= nil nil 3121)) list-item 3001 fontified nil))) (cons (org-xml-encode-org-text string) res) (setq res (cons (org-xml-encode-org-text string) res)) (push (org-xml-encode-org-text string) res) (let* ((re (concat org-bracket-link-regexp "\\|" (org-re "[ ]+\\(:[[:aln= um:]_@#%:]+:\\)[ ]*$"))) m s l res) (while (setq m (string-match re string= )) (setq s (substring string 0 m) l (match-string 0 string) string (substri= ng string (match-end 0))) (push (org-xml-encode-org-text s) res) (push l re= s)) (push (org-xml-encode-org-text string) res) (apply (quote concat) (nrev= erse res))) (progn (let* ((re (concat org-bracket-link-regexp "\\|" (org-re "[ ]+\\(= :[[:alnum:]_@#%:]+:\\)[ ]*$"))) m s l res) (while (setq m (string-match re= string)) (setq s (substring string 0 m) l (match-string 0 string) string (= substring string (match-end 0))) (push (org-xml-encode-org-text s) res) (pu= sh l res)) (push (org-xml-encode-org-text string) res) (apply (quote concat= ) (nreverse res)))) (if string (progn (let* ((re (concat org-bracket-link-regexp "\\|" (org-r= e "[ ]+\\(:[[:alnum:]_@#%:]+:\\)[ ]*$"))) m s l res) (while (setq m (stri= ng-match re string)) (setq s (substring string 0 m) l (match-string 0 strin= g) string (substring string (match-end 0))) (push (org-xml-encode-org-text = s) res) (push l res)) (push (org-xml-encode-org-text string) res) (apply (q= uote concat) (nreverse res))))) (when string (let* ((re (concat org-bracket-link-regexp "\\|" (org-re "[ = ]+\\(:[[:alnum:]_@#%:]+:\\)[ ]*$"))) m s l res) (while (setq m (string-ma= tch re string)) (setq s (substring string 0 m) l (match-string 0 string) st= ring (substring string (match-end 0))) (push (org-xml-encode-org-text s) re= s) (push l res)) (push (org-xml-encode-org-text string) res) (apply (quote = concat) (nreverse res)))) org-xml-encode-org-text-skip-links(#(" + Android tablet with Firefox @(X= XX to be tested)@." 0 53 (list-context nil list-prevs ((2845) (2868) (2938 = . 2868) (2959 . 2845) (2980) (3001 . 2980) (3056 . 2959) (3096)) list-struc= t ((2845 0 "- " nil nil nil 2959) (2868 2 "+ " nil nil nil 2938) (2938 2 "+= " nil nil nil 2959) (2959 0 "- " nil nil nil 3056) (2980 2 "+ " nil nil ni= l 3001) (3001 2 "+ " nil nil nil 3056) (3056 0 "- " nil nil nil 3121) (3096= 2 "+ " nil nil nil 3121)) list-item 3001 fontified nil))) (setq line (org-xml-encode-org-text-skip-links line)) (or (string-match org-table-hline-regexp line) (string-match "^[ ]*\\([+= ]-\\||[ ]\\)[-+ |]*[+|][ ]*$" line) (setq line (org-xml-encode-org-text-sk= ip-links line))) (catch (quote nextline) (when (and (org-lparse-current-environment-p (quo= te quote)) (string-match org-outline-regexp-bol line)) (org-lparse-end-envi= ronment (quote quote))) (when (org-lparse-current-environment-p (quote quot= e)) (org-lparse-insert (quote LINE) line) (throw (quote nextline) nil)) (wh= en (and org-export-with-fixed-width (string-match "^[ ]*:\\(\\([ ]\\|$\\)= \\(.*\\)\\)" line)) (when (not (org-lparse-current-environment-p (quote fix= edwidth))) (org-lparse-begin-environment (quote fixedwidth))) (org-lparse-i= nsert (quote LINE) (match-string 3 line)) (when (or (not lines) (not (strin= g-match "^[ ]*:\\(\\([ ]\\|$\\)\\(.*\\)\\)" (car lines)))) (org-lparse-en= d-environment (quote fixedwidth))) (throw (quote nextline) nil)) (when (and= (get-text-property 0 (quote org-native-text) line) (not (< (or (next-singl= e-property-change 0 (quote org-native-text) line) 10000) (length line)))) (= let ((ind (get-text-property 0 (quote original-indentation) line))) (org-lp= arse-begin-environment (quote native)) (org-lparse-insert (quote LINE) line= ) (while (and lines (or (=3D (length ...) 0) (not ind) (equal ind (get-text= -property 0 ... ...))) (or (=3D (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) ni= l)) (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 (=3D (length= ...) 0) (not ind) (equal ind (get-text-property 0 ... ...))) (or (=3D (len= gth ...) 0) (get-text-property 0 (quote org-protected) (car lines)))) (org-= lparse-insert (quote LINE) (pop lines)))) (throw (quote nextline) nil)) (wh= en (string-match "^ORG-\\(.+\\)-\\(START\\|END\\)\\([ ]+.*\\)?$" line) (le= t* ((style (intern (downcase (match-string 1 line)))) (env-options-plist (o= rg-lparse-get-block-params (match-string 3 line))) (f (cdr (assoc (match-st= ring 2 line) (quote ...))))) (when (memq style (append (quote (blockquote v= erse center)) (mapcar (quote intern) org-lparse-special-blocks))) (funcall = f style env-options-plist) (throw (quote nextline) nil)))) (when (org-lpars= e-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) (s= etq line (concat line "\\\\"))))) (setq start 0) (while (string-match "<<]*\\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" line start) (cond ((get-text-pr= operty (match-beginning 1) (quote org-protected) line) (setq start (match-e= nd 1))) ((match-end 2) (setq line (replace-match (let (...) (org-lparse-for= mat ... "" ...)) t t line))) ((and org-export-with-toc (equal (string-to-ch= ar 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-l= parse-handle-time-stamps line))) (or (string-match org-table-hline-regexp l= ine) (string-match "^[ ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ ]*$" line) (setq l= ine (org-xml-encode-org-text-skip-links line))) (setq line (org-lparse-form= at-org-link line opt-plist)) (if (and org-todo-line-regexp (string-match or= g-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-pro= tected) line) (not (get-text-property (match-beginning 2) (quote org-footno= te) line))) (setq start (match-end 2)) (let ((n (match-string 2 line)) refc= nt a) (if (setq a (assoc n footref-seen)) (progn (setcdr a ...) (setq refcn= t ...)) (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 (strin= g-match quote-re0 txt) (setq txt (replace-match "" t t txt))) (if (<=3D lev= el (max umax umax-toc)) (setq head-count (+ head-count 1))) (unless org-lpa= rse-dyn-first-heading-pos (setq org-lparse-dyn-first-heading-pos (point))) = (org-lparse-begin-level level txt umax head-count) (when (string-match quot= e-re line) (org-lparse-begin-environment (quote quote)))) ((and org-export-= with-tables (string-match "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" line)) (when (no= t 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 (nreve= rse table-buffer) table-orig-buffer (nreverse table-orig-buffer)) (org-lpar= se-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-in= sert (quote HORIZONTAL-LINE))) (throw (quote nextline) nil)) (when (string-= match "^ [-+*]-\\|^[ ]*$" line) (when org-lparse-footnote-number (org-lpar= se-end-footnote-definition org-lparse-footnote-number) (setq org-lparse-foo= tnote-number nil)) (org-lparse-begin-paragraph)) (when org-export-with-foot= notes (when (and (boundp (quote footnote-section-tag-regexp)) (string-match= (concat "^" footnote-section-tag-regexp) line)) (throw (quote nextline) ni= l)) (when (string-match "^[ ]*\\[\\([0-9]+\\)\\]" line) (org-lparse-end-pa= ragraph) (setq org-lparse-footnote-number (match-string 1 line)) (setq line= (replace-match "" t t line)) (org-lparse-begin-footnote-definition org-lpa= rse-footnote-number))) (cond ((string-match "\\\\\\\\[ ]*$" line) (setq li= ne (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)) (e= rror "FIXME") (if (not (get-text-property ... ... line)) (setq line (replac= e-match "

" t t line))) (setq start (match-end 0)))) (org-lparse-in= sert (quote LINE) line)))) (while (setq line (pop lines) origline line) (catch (quote nextline) (whe= n (and (org-lparse-current-environment-p (quote quote)) (string-match org-o= utline-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-e= nvironment (quote fixedwidth))) (org-lparse-insert (quote LINE) (match-stri= ng 3 line)) (when (or (not lines) (not (string-match "^[ ]*:\\(\\([ ]\\|$= \\)\\(.*\\)\\)" (car lines)))) (org-lparse-end-environment (quote fixedwidt= h))) (throw (quote nextline) nil)) (when (and (get-text-property 0 (quote o= rg-native-text) line) (not (< (or (next-single-property-change 0 ... line) = 10000) (length line)))) (let ((ind (get-text-property 0 (quote original-ind= entation) line))) (org-lparse-begin-environment (quote native)) (org-lparse= -insert (quote LINE) line) (while (and lines (or (=3D ... 0) (not ind) (equ= al ind ...)) (or (=3D ... 0) (get-text-property 0 ... ...))) (org-lparse-in= sert (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-indentat= ion) line))) (org-lparse-insert (quote LINE) line) (while (and lines (or (= =3D ... 0) (not ind) (equal ind ...)) (or (=3D ... 0) (get-text-property 0 = ... ...))) (org-lparse-insert (quote LINE) (pop lines)))) (throw (quote nex= tline) 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-block= s))) (funcall f style env-options-plist) (throw (quote nextline) nil)))) (w= hen (org-lparse-current-environment-p (quote verse)) (let ((i (org-get-stri= ng-indentation line))) (if (> i 0) (setq line (concat (let ... ...) " " (or= g-trim line)))) (unless (string-match "\\\\\\\\[ ]*$" line) (setq line (co= ncat line "\\\\"))))) (setq start 0) (while (string-match "<<]*\\)= >>>?\\((INVISIBLE)\\)?[ ]*\n?" line start) (cond ((get-text-property (matc= h-beginning 1) (quote org-protected) line) (setq start (match-end 1))) ((ma= tch-end 2) (setq line (replace-match (let ... ...) t t line))) ((and org-ex= port-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-handl= e-time-stamps line))) (or (string-match org-table-hline-regexp line) (strin= g-match "^[ ]*\\([+]-\\||[ ]\\)[-+ |]*[+|][ ]*$" line) (setq line (org-xm= l-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 (ma= tch-beginning 2)) (org-lparse-format (quote TODO) (match-string 2 line)) (s= ubstring line (match-end 2))))) (when org-export-with-footnotes (setq start= 0) (while (string-match "\\([^* ].*?\\)[ ]*\\[\\([0-9]+\\)\\]" line star= t) (if (or (get-text-property (match-beginning 2) (quote org-protected) lin= e) (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 ((stri= ng-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 (<=3D level (max umax umax-toc)) (setq head-count (+ head-count = 1))) (unless org-lparse-dyn-first-heading-pos (setq org-lparse-dyn-first-he= ading-pos (point))) (org-lparse-begin-level level txt umax head-count) (whe= n (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-b= uffer (cons origline table-orig-buffer)) (when (or (not lines) (not (string= -match "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" ...))) (setq table-open nil table-b= uffer (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 (quo= te 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-lpar= se-preserve-paragraph-state (org-lparse-insert (quote HORIZONTAL-LINE))) (t= hrow (quote nextline) nil)) (when (string-match "^ [-+*]-\\|^[ ]*$" line) = (when org-lparse-footnote-number (org-lparse-end-footnote-definition org-lp= arse-footnote-number) (setq org-lparse-footnote-number nil)) (org-lparse-be= gin-paragraph)) (when org-export-with-footnotes (when (and (boundp ...) (st= ring-match ... line)) (throw (quote nextline) nil)) (when (string-match "^[= ]*\\[\\([0-9]+\\)\\]" line) (org-lparse-end-paragraph) (setq org-lparse-f= ootnote-number (match-string 1 line)) (setq line (replace-match "" t t line= )) (org-lparse-begin-footnote-definition org-lparse-footnote-number))) (con= d ((string-match "\\\\\\\\[ ]*$" line) (setq line (replace-match ... t t l= ine))) (org-export-preserve-breaks (setq line (concat line ...)))) (let ((s= tart 0)) (while (and org-lparse-par-open (string-match "\\\\par\\>" line st= art)) (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-e= xport-plist-vars) (setq umax (if arg (prefix-numeric-value arg) org-export-= headline-levels)) (setq umax-toc (if (integerp org-export-with-toc) (min or= g-export-with-toc umax) umax)) (setq org-lparse-opt-plist (plist-put org-lp= arse-opt-plist :headline-levels umax)) (when (and org-export-with-toc (not = body-only)) (setq lines (org-lparse-prepare-toc lines level-offset opt-plis= t umax-toc))) (unless body-only (org-lparse-begin (quote DOCUMENT-CONTENT) = opt-plist) (org-lparse-begin (quote DOCUMENT-BODY) opt-plist)) (setq head-c= ount 0) (org-init-section-numbers) (org-lparse-begin-paragraph) (while (set= q line (pop lines) origline line) (catch (quote nextline) (when (and (org-l= parse-current-environment-p (quote quote)) (string-match org-outline-regexp= -bol line)) (org-lparse-end-environment (quote quote))) (when (org-lparse-c= urrent-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 (q= uote 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 ne= xtline) 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-lp= arse-insert (quote LINE) (pop lines))) (org-lparse-end-environment (quote n= ative))) (throw (quote nextline) nil)) (when (and (get-text-property 0 (quo= te org-protected) line) (not (< (or ... 10000) (length line)))) (let ((ind = (get-text-property 0 ... line))) (org-lparse-insert (quote LINE) line) (whi= le (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 (q= uote nextline) nil)))) (when (org-lparse-current-environment-p (quote verse= )) (let ((i (org-get-string-indentation line))) (if (> i 0) (setq line (con= cat ... " " ...))) (unless (string-match "\\\\\\\\[ ]*$" line) (setq line = (concat line "\\\\"))))) (setq start 0) (while (string-match "<<]*= \\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" line start) (cond ((get-text-property (m= atch-beginning 1) (quote org-protected) line) (setq start (match-end 1))) (= (match-end 2) (setq line (replace-match ... t t line))) ((and org-export-wi= th-toc (equal ... 42)) (setq line (replace-match ... t t line))) (t (setq l= ine (replace-match ... t t line))))) (let ((org-lparse-encode-pending t)) (= setq line (org-lparse-handle-time-stamps line))) (or (string-match org-tabl= e-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 (c= oncat (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 (<=3D level (max umax umax-toc)) (setq head-count (+ head-= count 1))) (unless org-lparse-dyn-first-heading-pos (setq org-lparse-dyn-fi= rst-heading-pos (point))) (org-lparse-begin-level level txt umax head-count= ) (when (string-match quote-re line) (org-lparse-begin-environment (quote q= uote)))) ((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-b= uffer (nreverse table-orig-buffer)) (org-lparse-end-paragraph) (when org-lp= arse-list-table-p (error "Regular tables are not allowed in a list-table bl= ock")) (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-lp= arse-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 (qu= ote 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-outl= ine-text-or-outline)) (org-lparse-end (quote DOCUMENT-BODY) opt-plist) (unl= ess body-only (org-lparse-end (quote DOCUMENT-CONTENT))) (org-lparse-end (q= uote EXPORT)) (when org-lparse-collect-buffer (kill-buffer org-lparse-colle= ct-buffer)) (goto-char (point-min)) (or (org-export-push-to-kill-ring (upca= se (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 (bo= undp (quote org-lparse-other-backend)) org-lparse-other-backend (not (equal= org-lparse-backend org-lparse-other-backend)) (org-lparse-do-convert buffe= r-file-name (symbol-name org-lparse-other-backend))) (current-buffer))) ((e= q 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-lp= arse-list-table-p org-lparse-list-table:table-cell-open org-lparse-list-tab= le:table-row org-lparse-list-table:lines org-lparse-outline-text-open (org-= lparse-latex-fragment-fallback (or (ignore-errors (org-lparse-get (quote LA= TEX-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-buff= er to-buffer) (org-lparse-body-only body-only) (org-lparse-entity-control-c= allbacks-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-p= list) ext-plist (org-infile-export-plist)))) (body-only (or body-only (plis= t-get opt-plist :body-only))) valid org-lparse-dyn-first-heading-pos (odd o= rg-odd-levels-only) (region-p (org-region-active-p)) (rbeg (and region-p (r= egion-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) (>=3D ... rend)))))) (level-offset (if s= ubtree-p (save-excursion (goto-char rbeg) (+ (funcall outline-level) (if or= g-odd-levels-only 1 0))) 0)) (opt-plist (setq org-export-opt-plist (if subt= ree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))) (org-cur= rent-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-f= ile-name (concat (file-name-sans-extension (or ... ...)) "." (org-lparse-ge= t (quote FILE-NAME-EXTENSION) opt-plist)) (file-name-as-directory (or pub-d= ir (org-lparse-get ... opt-plist)))))) (current-dir (if buffer-file-name (f= ile-name-directory buffer-file-name) default-directory)) (auto-insert nil) = (buffer (if to-buffer (cond ((eq to-buffer (quote string)) (get-buffer-crea= te (org-lparse-get ...))) (t (get-buffer-create to-buffer))) (find-file-nos= elect (or (let (...) (and f ... ...)) filename)))) (org-levels-open (make-v= ector org-level-max nil)) (dummy (mapc (lambda (p) (let* ((val ...) (val ..= .)) (setq opt-plist (plist-put opt-plist p val)))) (quote (:date :author :k= eywords :description)))) (date (plist-get opt-plist :date)) (date (cond ((a= nd 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-link= s (or (and subtree-p (org-export-get-title-from-subtree)) (plist-get opt-pl= ist :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-qu= ote-string "\\( +\\|[ ]*$\\)")) (quote-re (format org-heading-keyword-rege= xp-format org-quote-string)) ...) (let ((inhibit-read-only t)) (org-unmodif= ied (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 ((i= nhibit-read-only t)) (erase-buffer)) (fundamental-mode) (org-install-letbin= d) (and (fboundp (quote set-buffer-file-coding-system)) (set-buffer-file-co= ding-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 (p= refix-numeric-value arg) org-export-headline-levels)) (setq umax-toc (if (i= ntegerp org-export-with-toc) (min org-export-with-toc umax) umax)) (setq or= g-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-pre= pare-toc lines level-offset opt-plist umax-toc))) (unless body-only (org-lp= arse-begin (quote DOCUMENT-CONTENT) opt-plist) (org-lparse-begin (quote DOC= UMENT-BODY) opt-plist)) (setq head-count 0) (org-init-section-numbers) (org= -lparse-begin-paragraph) (while (setq line (pop lines) origline line) (catc= h (quote nextline) (when (and (org-lparse-current-environment-p (quote quot= e)) (string-match org-outline-regexp-bol line)) (org-lparse-end-environment= (quote quote))) (when (org-lparse-current-environment-p (quote quote)) (or= g-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) (ma= tch-string 3 line)) (when (or (not lines) (not ...)) (org-lparse-end-enviro= nment (quote fixedwidth))) (throw (quote nextline) nil)) (when (and (get-te= xt-property 0 (quote org-native-text) line) (not (< ... ...))) (let ((ind .= ..)) (org-lparse-begin-environment (quote native)) (org-lparse-insert (quot= e 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 (st= ring-match "^ORG-\\(.+\\)-\\(START\\|END\\)\\([ ]+.*\\)?$" line) (let* ((s= tyle ...) (env-options-plist ...) (f ...)) (when (memq style ...) (funcall = f style env-options-plist) (throw ... nil)))) (when (org-lparse-current-env= ironment-p (quote verse)) (let ((i ...)) (if (> i 0) (setq line ...)) (unle= ss (string-match "\\\\\\\\[ ]*$" line) (setq line ...)))) (setq start 0) (= while (string-match "<<]*\\)>>>?\\((INVISIBLE)\\)?[ ]*\n?" line s= tart) (cond ((get-text-property ... ... line) (setq start ...)) ((match-end= 2) (setq line ...)) ((and org-export-with-toc ...) (setq line ...)) (t (se= tq 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-or= g-link line opt-plist)) (if (and org-todo-line-regexp (string-match org-tod= o-line-regexp line) (match-beginning 2)) (setq line (concat (substring line= 0 ...) (org-lparse-format ... ...) (substring line ...)))) (when org-expor= t-with-footnotes (setq start 0) (while (string-match "\\([^* ].*?\\)[ ]*\= \[\\([0-9]+\\)\\]" line start) (if (or ... ...) (setq start ...) (let ... .= .. ...)))) (cond ((string-match "^\\(\\*+\\)\\(?: +\\(.*?\\)\\)?[ ]*$" lin= e) (setq level (org-tr-level ...) txt (match-string 2 line)) (if (string-ma= tch quote-re0 txt) (setq txt ...)) (if (<=3D level ...) (setq head-count ..= .)) (unless org-lparse-dyn-first-heading-pos (setq org-lparse-dyn-first-hea= ding-pos ...)) (org-lparse-begin-level level txt umax head-count) (when (st= ring-match quote-re line) (org-lparse-begin-environment ...))) ((and org-ex= port-with-tables (string-match "^\\([ ]*\\)\\(|\\|\\+-+\\+\\)" line)) (whe= n (not table-open) (setq table-open t table-buffer nil table-orig-buffer ni= l)) (setq table-buffer (cons line table-buffer) table-orig-buffer (cons ori= gline table-orig-buffer)) (when (or ... ...) (setq table-open nil table-buf= fer ... 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-matc= h "^[ ]*-\\{5,\\}[ ]*$" line) (with-org-lparse-preserve-paragraph-state .= ..) (throw ... nil)) (when (string-match "^ [-+*]-\\|^[ ]*$" line) (when o= rg-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-enviro= nment-p (quote quote)) (org-lparse-end-environment (quote quote))) (org-lpa= rse-end-level 1 umax) (when (and (> umax 0) org-lparse-dyn-first-heading-po= s) (org-lparse-end-outline-text-or-outline)) (org-lparse-end (quote DOCUMEN= T-BODY) opt-plist) (unless body-only (org-lparse-end (quote DOCUMENT-CONTEN= T))) (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 "Expo= rting... 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-conver= t buffer-file-name (symbol-name org-lparse-other-backend))) (current-buffer= ))) ((eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) (po= int-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-bac= kend (and target-backend (intern target-backend)))) (unless (org-lparse-bac= kend-is-native-p native-backend) (error "Don't know how to export natively = to backend %s" native-backend)) (unless (or (equal native-backend target-ba= ckend) (org-lparse-reachable-p native-backend target-backend)) (error "Don'= t know how to export to backend %s %s" target-backend (format "via %s" nati= ve-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 hidd= en))) (let (f (file-or-buf (or file-or-buf (org-lparse target-backend native-ba= ckend 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 (er= ror "org-lparse-and-open: This shouldn't happen")))) (message "Opening file= %s" f) (org-open-file f) (when org-export-kill-product-buffer-when-display= ed (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-activ= e-p))) (let ((p (start-process (concat "Exporting " (file-name-nondirectory= (buffer-file-name))) "*Org Processes*" (expand-file-name invocation-name i= nvocation-directory) "-batch" "-l" user-init-file "--eval" "(require 'org-e= xp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" (symbol-name (nt= h 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-w= indow (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 ex= port 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 buffe= r\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 tem= porary buffer\n[p] export as LaTeX and process to PDF [d] ... an= d open PDF file\n\n[D] export as DocBook [V] export as DocBook, process t= o 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 us= ing 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 combi= ned 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-e= xport-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 o= rg-export-region-as-html nil) (120 org-export-as-xoxo t) (103 org-export-ge= neric t) (68 org-export-as-docbook t) (86 org-export-as-docbook-pdf-and-ope= n t) (111 org-export-as-odt t) (79 org-export-as-odt-and-open t) (106 org-e= xport-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-c= urrent-file t) (80 org-publish-current-project t) (88 org-publish t) (69 or= g-publish-all t)))) r1 r2 ass (cpos (point)) (cbuf (current-buffer)) bpos) = (save-excursion (save-window-excursion (if subtree-p (message "Export subtr= ee: ") (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 (set= q r1 (read-char-exclusive)) 49) (cond (subtree-p (setq subtree-p nil) (mess= age "Export buffer: ")) ((not subtree-p) (setq subtree-p t) (setq bpos (poi= nt)) (message "Export subtree: ")))) (when (eq r1 32) (let ((case-fold-sear= ch 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 bp= os ...) (message "Select command (for subtree): ") (setq r1 ...)) (error "N= o 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)) (er= ror "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-fi= le "--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-inter= actively (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--- Am I missing something? Best regards, Seb --=20 Sebastien Vauban