emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [export] org-export-with-* bugs
@ 2013-12-16  3:37 Aaron Ecay
  2013-12-17 17:29 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Ecay @ 2013-12-16  3:37 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

1) In exporting the following org buffer to latex, I get the following
stack trace (at end of email because of length):

=====
#+options: |:nil

| foo | bar |
=====

2) When exporting the following buffer to latex:

=====
#+options: ^:nil

foo_{*bar*}
=====

I get (ignoring document preamble):

=====
foo\_\{$\backslash$textbf\{bar\}\}
=====

Note the escaping of the backslash and inner pair of braces.  I would
have expected:

=====
foo\_\{\textbf{bar}\}
=====

At least (2) is due to the fact that, in the "Uninterpreted
element/object" branch of ‘org-export-data’, the contents of the
uninterpreted e/o are escaped once by the org-export-data call in the
mapconcat, then again at the top-level org-export-data call.

I suspect that (1) may be due to the ‘org-export-expand’ call in that
branch setting the contents of the table to the string result of the
mapconcat, where properly the contents should be a tree of table-row and
table-cell elements.

I tried to fix (2) with the following algorithm:

1. pick a placeholder string (I just used the md5 hash of a gibberish
   string)
2. (org-export-data (org-export-expand data placeholder))
3. (replace-regexp-in-string placeholder [result of mapconcat from
   original code] [result of step 2] 'fixed-case 'literal)

The placeholder followed by replacement is designed to ensure that the
escaping is applied only once.  But this still seemed somewhat fragile,
and then I hit (1) and gave up, at least for the night.  I suspect that
there are likely to be similar issues with all the with-* variants
listed in ‘org-export--interpret-p’; these are just the two I happened
to test.

Thanks,
Aaron

PS this is with latest git master, commit d55f0632

Backtrace:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  string-match("^ *" nil)
  (if (string-match "^ *" (car lines)) (setq indent (make-string (- (match-end 0) (match-beginning 0)) 32)))
  (let* ((beg (org-table-begin)) (end (org-table-end)) (linepos (org-current-line)) (colpos (org-table-current-column)) (winstart (window-start)) (winstartline (org-current-line (min winstart (1- (point-max))))) lines (new "") lengths l typenums ty fields maxfields i column (indent "") cnt frac rfmt hfmt (spaces (quote (1 . 1))) (sp1 (car spaces)) (sp2 (cdr spaces)) (rfmt1 (concat (make-string sp2 32) "%%%s%ds" (make-string sp1 32) "|")) (hfmt1 (concat (make-string sp2 45) "%s" (make-string sp1 45) "+")) emptystrings links dates emph raise narrow falign falign1 fmax f1 len c e space) (untabify beg end) (remove-text-properties beg end (quote (org-cwidth t org-dwidth t display t))) (goto-char beg) (setq links (re-search-forward org-bracket-link-regexp end t)) (goto-char beg) (setq emph (and org-hide-emphasis-markers (re-search-forward org-emph-re end t))) (goto-char beg) (setq raise (and org-use-sub-superscripts (re-search-forward org-match-substring-regexp end t))) (goto-char beg) (setq dates (and org-display-custom-times (re-search-forward org-ts-regexp-both end t))) (if links (progn (goto-char beg) (while (org-activate-bracket-links end)))) (if dates (progn (goto-char beg) (while (org-activate-dates end)))) (if emph (progn (goto-char beg) (while (org-do-emphasis-faces end)))) (if raise (progn (goto-char beg) (while (org-raise-scripts end)))) (goto-char beg) (setq narrow (and org-table-do-narrow org-format-transports-properties-p (re-search-forward "<[lrc]?[0-9]+>" end t))) (goto-char beg) (setq falign (re-search-forward "<[lrc][0-9]*>" end t)) (goto-char beg) (setq lines (org-split-string (buffer-substring beg end) "\n")) (if (string-match "^ *" (car lines)) (setq indent (make-string (- (match-end 0) (match-beginning 0)) 32))) (setq lines (mapcar (function (lambda (l) (if (string-match "^ *|-" l) nil (if (string-match "[ 	]+$" l) (substring l 0 ...) l)))) lines)) (setq fields (mapcar (function (lambda (l) (org-split-string l " *| *"))) (delq nil (copy-sequence lines)))) (condition-case nil (setq maxfields (apply (quote max) (mapcar (quote length) fields))) (error (kill-region beg end) (org-table-create org-table-default-size) (user-error "Empty table - created default table"))) (setq emptystrings (make-list maxfields "")) (setq i -1) (while (< (setq i (1+ i)) maxfields) (setq column (mapcar (function (lambda (x) (or (nth i x) ""))) fields)) (setq fmax nil) (if (or narrow falign) (progn (setq c column fmax nil falign1 nil) (while c (setq e (car-safe (prog1 c ...))) (if (and (stringp e) (string-match "^<\\([lrc]\\)?\\([0-9]+\\)?>$" e)) (progn (if ... ...) (if ... ...)))) (if fmax (progn (let* (... ...) (while ... ... ... ...) nil))))) (setq lengths (cons (apply (quote max) (or fmax 1) 1 (mapcar (quote org-string-width) column)) lengths)) (if falign1 (setq typenums (cons (equal (downcase falign1) "r") typenums)) (setq cnt 0 frac 0.0) (let* ((--cl-var-- column) (x nil)) (while (consp --cl-var--) (setq x (car --cl-var--)) (if (equal x "") nil (setq frac (/ ... ...))) (setq --cl-var-- (cdr --cl-var--))) nil) (setq typenums (cons (>= frac org-table-number-fraction) typenums)))) (setq lengths (nreverse lengths) typenums (nreverse typenums)) (setq org-table-last-alignment typenums org-table-last-column-widths lengths) (if (or links emph raise) (progn (let* ((i 0) (--cl-var-- (1- maxfields))) (while (<= i --cl-var--) (setq len (nth i lengths)) (let* ((j 0) (--cl-var-- ...)) (while (<= j --cl-var--) (setq c ...) (if ... ...) (setq j ...)) nil) (setq i (+ i 1))) nil))) (setq rfmt (concat indent "|") hfmt (concat indent "|")) (while (setq l (car-safe (prog1 lengths (setq lengths (cdr lengths))))) (setq ty (if (car-safe (prog1 typenums (setq typenums (cdr typenums)))) "" "-")) (setq rfmt (concat rfmt (format rfmt1 ty l)) hfmt (concat hfmt (format hfmt1 (make-string l 45))))) (setq rfmt (concat rfmt "\n") hfmt (concat (substring hfmt 0 -1) "|\n")) (setq new (mapconcat (function (lambda (l) (if l (apply (quote format) rfmt (append ... emptystrings)) hfmt))) lines "")) (move-marker org-table-aligned-begin-marker (point)) (insert new) (delete-region (point) end) (move-marker end nil) (move-marker org-table-aligned-end-marker (point)) (if (and orgtbl-mode (not (derived-mode-p (quote org-mode)))) (progn (goto-char org-table-aligned-begin-marker) (while (org-hide-wide-columns org-table-aligned-end-marker)))) (org-goto-line winstartline) (setq winstart (point-at-bol)) (org-goto-line linepos) (if (eq (window-buffer (selected-window)) (current-buffer)) (progn (set-window-start (selected-window) winstart (quote noforce)))) (org-table-goto-column colpos) (and org-table-overlay-coordinates (org-table-overlay-coordinates)) (setq org-table-may-need-update nil))
  org-table-align()
  (progn (insert contents) (org-table-align) (buffer-string))
  (unwind-protect (progn (insert contents) (org-table-align) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))
  (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert contents) (org-table-align) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))
  (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert contents) (org-table-align) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))
  (concat (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert contents) (org-table-align) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (mapconcat (function (lambda (fm) (concat "#+TBLFM: " fm))) (reverse (org-element-property :tblfm table)) "\n"))
  (if (eq (org-element-property :type table) (quote table\.el)) (org-remove-indentation (org-element-property :value table)) (concat (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert contents) (org-table-align) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (mapconcat (function (lambda (fm) (concat "#+TBLFM: " fm))) (reverse (org-element-property :tblfm table)) "\n")))
  org-element-table-interpreter((table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #2)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #2)) #0)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #0) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #1) #("foo" 0 3 (:parent #2))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #1) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #2) #("bar" 0 3 (:parent #3)))))) #("foo & \\textbf{bar}\\\\\n" 0 3 (:parent (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent ...) #4)) #2 (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #4) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #5) #("bar" 0 3 ...))))) #("foo" 0 3 (:parent #2)))) 14 17 (:parent (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent ...) (table-cell ... #("foo" 0 3 ...)) #4)) #2)) #("bar" 0 3 (:parent #2))))))
  funcall(org-element-table-interpreter (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #2)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #2)) #0)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #0) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #1) #("foo" 0 3 (:parent #2))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #1) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #2) #("bar" 0 3 (:parent #3)))))) #("foo & \\textbf{bar}\\\\\n" 0 3 (:parent (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent ...) #4)) #2 (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #4) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #5) #("bar" 0 3 ...))))) #("foo" 0 3 (:parent #2)))) 14 17 (:parent (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent ...) (table-cell ... #("foo" 0 3 ...)) #4)) #2)) #("bar" 0 3 (:parent #2))))))
  (concat (and with-affiliated (memq type org-element-all-elements) (org-element--interpret-affiliated-keywords blob)) (funcall (intern (format "org-element-%s-interpreter" type)) blob contents))
  (let ((type (org-element-type blob))) (concat (and with-affiliated (memq type org-element-all-elements) (org-element--interpret-affiliated-keywords blob)) (funcall (intern (format "org-element-%s-interpreter" type)) blob contents)))
  org-export-expand((table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #2)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #2)) #0)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #0) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #1) #("foo" 0 3 (:parent #2))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #1) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #2) #("bar" 0 3 (:parent #3)))))) #("foo & \\textbf{bar}\\\\\n" 0 3 (:parent (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent ...) #4)) #2 (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #4) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #5) #("bar" 0 3 ...))))) #("foo" 0 3 (:parent #2)))) 14 17 (:parent (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent ...) (table-cell ... #("foo" 0 3 ...)) #4)) #2)) #("bar" 0 3 (:parent #2))))))
  (org-export-data (org-export-expand data (mapconcat (function (lambda (blob) (org-export-data blob info))) (org-element-contents data) "")) info)
  (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ((transcoder (org-export-transcoder data info))) (if transcoder (funcall transcoder data info) data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat (function (lambda (blob) (org-export-data blob info))) (org-element-contents data) "")) info)) ((not type) (mapconcat (function (lambda (obj) (org-export-data obj info))) data "")) ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq (plist-get info :with-archived-trees) (quote headline)) (org-element-property :archivedp data))) (let ((transcoder (org-export-transcoder data info))) (or (and (functionp transcoder) (funcall transcoder data nil info)) (and (eq type (quote export-snippet)) "")))) (t (let ((transcoder (org-export-transcoder data info))) (if transcoder (progn (let* ((greaterp ...) (objectp ...) (contents ...)) (funcall transcoder data (if ... contents ...) info)))))))
  (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let (...) (if transcoder ... data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type) (mapconcat (function (lambda ... ...)) data "")) ((or (not (org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-property :archivedp data))) (let ((transcoder ...)) (or (and ... ...) (and ... "")))) (t (let ((transcoder ...)) (if transcoder (progn ...))))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results (org-export-filter-apply-functions ... ... info))) results))) (plist-get info :exported-data)))
  (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ... ...) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data ...) info)) ((not type) (mapconcat (function ...) data "")) ((or (not ...) (and ... ... ...)) (let (...) (or ... ...))) (t (let (...) (if transcoder ...)))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results ...)) results))) (plist-get info :exported-data))))
  (let ((memo (gethash data (plist-get info :exported-data) (quote no-memo)))) (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data ...) nil) ((eq type ...) (org-export-filter-apply-functions ... ... info)) ((not ...) (org-export-data ... info)) ((not type) (mapconcat ... data "")) ((or ... ...) (let ... ...)) (t (let ... ...))))) (puthash data (cond ((not results) nil) ((memq type (quote ...)) results) (t (let (...) results))) (plist-get info :exported-data)))))
  org-export-data((table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #2)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #2)) #0)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #0) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #1) #("foo" 0 3 (:parent #2))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #1) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #2) #("bar" 0 3 (:parent #3)))))) (:export-options nil :input-buffer "test-subscript.org" :input-file "/home/aecay/org-test-files/test-subscript.org" :title "test-subscript" :latex-class "article" :latex-hyperref-p t :date ((latex-fragment (:value "\\today" :begin 1 :end 7 :post-blank 0 :parent #1))) :author nil :creator "Emacs 24.3.50.1 (Org mode 8.2.1)" :email "aecay@haize" :exclude-tags ("noexport") :headline-levels 3 :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :with-archived-trees headline :with-author t :with-clocks nil :with-creator comment :with-date t :with-drawers (not "LOGBOOK") :with-email nil :with-emphasize t ...))
  (lambda (element) (org-export-data element info))((table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #2)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #2)) #0)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #0) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #1) #("foo" 0 3 (:parent #2))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #1) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #2) #("bar" 0 3 (:parent #3)))))))
  mapconcat((lambda (element) (org-export-data element info)) ((keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #3)) #1 (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent #3) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #4) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #5) #("foo" 0 3 ...)) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #5) (bold ... #("bar" 0 3 ...)))))))) (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #3)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #3)) #1)) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #1) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #2) #("foo" 0 3 (:parent #3))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #2) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #3) #("bar" 0 3 (:parent #4))))))) "")
  (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda (element) (org-export-data element info))) (org-element-contents (if (or greaterp objectp) data (org-element-normalize-contents data (if ... ...)))) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info))
  (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda (element) (org-export-data element info))) (org-element-contents (if (or greaterp objectp) data (org-element-normalize-contents data ...))) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info)))
  (if transcoder (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda ... ...)) (org-element-contents (if ... data ...)) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info))))
  (let ((transcoder (org-export-transcoder data info))) (if transcoder (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function ...) (org-element-contents ...) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info)))))
  (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ((transcoder (org-export-transcoder data info))) (if transcoder (funcall transcoder data info) data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat (function (lambda (blob) (org-export-data blob info))) (org-element-contents data) "")) info)) ((not type) (mapconcat (function (lambda (obj) (org-export-data obj info))) data "")) ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq (plist-get info :with-archived-trees) (quote headline)) (org-element-property :archivedp data))) (let ((transcoder (org-export-transcoder data info))) (or (and (functionp transcoder) (funcall transcoder data nil info)) (and (eq type (quote export-snippet)) "")))) (t (let ((transcoder (org-export-transcoder data info))) (if transcoder (progn (let* ((greaterp ...) (objectp ...) (contents ...)) (funcall transcoder data (if ... contents ...) info)))))))
  (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let (...) (if transcoder ... data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type) (mapconcat (function (lambda ... ...)) data "")) ((or (not (org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-property :archivedp data))) (let ((transcoder ...)) (or (and ... ...) (and ... "")))) (t (let ((transcoder ...)) (if transcoder (progn ...))))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results (org-export-filter-apply-functions ... ... info))) results))) (plist-get info :exported-data)))
  (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ... ...) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data ...) info)) ((not type) (mapconcat (function ...) data "")) ((or (not ...) (and ... ... ...)) (let (...) (or ... ...))) (t (let (...) (if transcoder ...)))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results ...)) results))) (plist-get info :exported-data))))
  (let ((memo (gethash data (plist-get info :exported-data) (quote no-memo)))) (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data ...) nil) ((eq type ...) (org-export-filter-apply-functions ... ... info)) ((not ...) (org-export-data ... info)) ((not type) (mapconcat ... data "")) ((or ... ...) (let ... ...)) (t (let ... ...))))) (puthash data (cond ((not results) nil) ((memq type (quote ...)) results) (t (let (...) results))) (plist-get info :exported-data)))))
  org-export-data((section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #0)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #0)) (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent #0) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #1) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #2) #("foo" 0 3 (:parent #3))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #2) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #3) #("bar" 0 3 (:parent #4))))))) (:export-options nil :input-buffer "test-subscript.org" :input-file "/home/aecay/org-test-files/test-subscript.org" :title "test-subscript" :latex-class "article" :latex-hyperref-p t :date ((latex-fragment (:value "\\today" :begin 1 :end 7 :post-blank 0 :parent #1))) :author nil :creator "Emacs 24.3.50.1 (Org mode 8.2.1)" :email "aecay@haize" :exclude-tags ("noexport") :headline-levels 3 :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :with-archived-trees headline :with-author t :with-clocks nil :with-creator comment :with-date t :with-drawers (not "LOGBOOK") :with-email nil :with-emphasize t ...))
  (lambda (element) (org-export-data element info))((section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #0)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #0)) (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent #0) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #1) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #2) #("foo" 0 3 (:parent #3))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #2) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #3) #("bar" 0 3 (:parent #4))))))))
  mapconcat((lambda (element) (org-export-data element info)) ((section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent (org-data nil #1)) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #1)) (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent #1) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #2) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #3) #("foo" 0 3 (:parent #4))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #3) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #4) #("bar" 0 3 (:parent #5)))))))) "")
  (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda (element) (org-export-data element info))) (org-element-contents (if (or greaterp objectp) data (org-element-normalize-contents data (if ... ...)))) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info))
  (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda (element) (org-export-data element info))) (org-element-contents (if (or greaterp objectp) data (org-element-normalize-contents data ...))) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info)))
  (if transcoder (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function (lambda ... ...)) (org-element-contents (if ... data ...)) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info))))
  (let ((transcoder (org-export-transcoder data info))) (if transcoder (progn (let* ((greaterp (memq type org-element-greater-elements)) (objectp (and (not greaterp) (memq type org-element-recursive-objects))) (contents (mapconcat (function ...) (org-element-contents ...) ""))) (funcall transcoder data (if (not greaterp) contents (org-element-normalize-string contents)) info)))))
  (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ((transcoder (org-export-transcoder data info))) (if transcoder (funcall transcoder data info) data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat (function (lambda (blob) (org-export-data blob info))) (org-element-contents data) "")) info)) ((not type) (mapconcat (function (lambda (obj) (org-export-data obj info))) data "")) ((or (not (org-element-contents data)) (and (eq type (quote headline)) (eq (plist-get info :with-archived-trees) (quote headline)) (org-element-property :archivedp data))) (let ((transcoder (org-export-transcoder data info))) (or (and (functionp transcoder) (funcall transcoder data nil info)) (and (eq type (quote export-snippet)) "")))) (t (let ((transcoder (org-export-transcoder data info))) (if transcoder (progn (let* ((greaterp ...) (objectp ...) (contents ...)) (funcall transcoder data (if ... contents ...) info)))))))
  (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let (...) (if transcoder ... data)) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data (mapconcat ... ... "")) info)) ((not type) (mapconcat (function (lambda ... ...)) data "")) ((or (not (org-element-contents data)) (and (eq type ...) (eq ... ...) (org-element-property :archivedp data))) (let ((transcoder ...)) (or (and ... ...) (and ... "")))) (t (let ((transcoder ...)) (if transcoder (progn ...))))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results (org-export-filter-apply-functions ... ... info))) results))) (plist-get info :exported-data)))
  (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data (plist-get info :ignore-list)) nil) ((eq type (quote plain-text)) (org-export-filter-apply-functions (plist-get info :filter-plain-text) (let ... ...) info)) ((not (org-export--interpret-p data info)) (org-export-data (org-export-expand data ...) info)) ((not type) (mapconcat (function ...) data "")) ((or (not ...) (and ... ... ...)) (let (...) (or ... ...))) (t (let (...) (if transcoder ...)))))) (puthash data (cond ((not results) nil) ((memq type (quote (org-data plain-text nil))) results) (t (let ((results ...)) results))) (plist-get info :exported-data))))
  (let ((memo (gethash data (plist-get info :exported-data) (quote no-memo)))) (if (not (eq memo (quote no-memo))) memo (let* ((type (org-element-type data)) (results (cond ((memq data ...) nil) ((eq type ...) (org-export-filter-apply-functions ... ... info)) ((not ...) (org-export-data ... info)) ((not type) (mapconcat ... data "")) ((or ... ...) (let ... ...)) (t (let ... ...))))) (puthash data (cond ((not results) nil) ((memq type (quote ...)) results) (t (let (...) results))) (plist-get info :exported-data)))))
  org-export-data((org-data nil (section (:begin 1 :end 35 :contents-begin 1 :contents-end 35 :post-blank 0 :parent #0) (keyword (:key "OPTIONS" :value "|:nil" :begin 1 :end 19 :post-blank 1 :post-affiliated 1 :parent #1)) (table (:begin 19 :end 35 :type org :tblfm nil :contents-begin 19 :contents-end 35 :value nil :post-blank 0 :post-affiliated 19 :parent #1) (table-row (:type standard :begin 19 :end 35 :contents-begin 20 :contents-end 34 :post-blank 0 :parent #2) (table-cell (:begin 20 :end 26 :contents-begin 21 :contents-end 24 :post-blank 0 :parent #3) #("foo" 0 3 (:parent #4))) (table-cell (:begin 26 :end 34 :contents-begin 27 :contents-end 32 :post-blank 0 :parent #3) (bold (:begin 27 :end 32 :contents-begin 28 :contents-end 31 :post-blank 0 :parent #4) #("bar" 0 3 (:parent #5)))))))) (:export-options nil :input-buffer "test-subscript.org" :input-file "/home/aecay/org-test-files/test-subscript.org" :title "test-subscript" :latex-class "article" :latex-hyperref-p t :date ((latex-fragment (:value "\\today" :begin 1 :end 7 :post-blank 0 :parent #1))) :author nil :creator "Emacs 24.3.50.1 (Org mode 8.2.1)" :email "aecay@haize" :exclude-tags ("noexport") :headline-levels 3 :language "en" :preserve-breaks nil :section-numbers t :select-tags ("export") :time-stamp-file t :with-archived-trees headline :with-author t :with-clocks nil :with-creator comment :with-date t :with-drawers (not "LOGBOOK") :with-email nil :with-emphasize t ...))
  (or (org-export-data tree info) "")
  (org-element-normalize-string (or (org-export-data tree info) ""))
  (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (if (not (functionp inner-template)) body (funcall inner-template body info))) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (functionp template)) body-only) full-body (funcall template full-body info)) info)))
  (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (vectorp backend) (>= (length backend) 8) (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (vectorp backend) (>= (length backend) 8) (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or (and (vectorp backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result (funcall filter info backend-name))) (if result (progn (setq info result)))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (if (not (functionp inner-template)) body (funcall inner-template body info))) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not (functionp template)) body-only) full-body (funcall template full-body info)) info))))
  (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (vectorp backend) (>= (length backend) 8) (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and (vectorp backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let ((result ...)) (if result (progn ...))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or (org-export-data tree info) ""))) (inner-template (cdr (assq (quote inner-template) (plist-get info :translate-alist)))) (full-body (if (not (functionp inner-template)) body (funcall inner-template body info))) (template (cdr (assq (quote template) (plist-get info :translate-alist))))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or (not ...) body-only) full-body (funcall template full-body info)) info)))))
  (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and (vectorp backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data (plist-get info :author))) (cons "date" (org-element-interpret-data (plist-get info :date))) (cons "email" (or (plist-get info :email) "")) (cons "title" (org-element-interpret-data (plist-get info :title))))) (let ((backend-name (progn (or ... ...) (aref backend 1)))) (let ((--dolist-tail-- (plist-get info :filter-options)) filter) (while --dolist-tail-- (setq filter (car --dolist-tail--)) (let (...) (if result ...)) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string (or ... ""))) (inner-template (cdr (assq ... ...))) (full-body (if (not ...) body (funcall inner-template body info))) (template (cdr (assq ... ...)))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if (or ... body-only) full-body (funcall template full-body info)) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))
  (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1))) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn (or ... ...) (aref backend 1)))) (setq info (org-export-install-filters (org-combine-plists info (org-export-get-environment backend subtreep ext-plist)))) (org-macro-replace-all (list (cons "author" (org-element-interpret-data ...)) (cons "date" (org-element-interpret-data ...)) (cons "email" (or ... "")) (cons "title" (org-element-interpret-data ...)))) (let ((backend-name (progn ... ...))) (let ((--dolist-tail-- ...) filter) (while --dolist-tail-- (setq filter ...) (let ... ...) (setq --dolist-tail-- ...)))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body (org-element-normalize-string ...)) (inner-template (cdr ...)) (full-body (if ... body ...)) (template (cdr ...))) (org-no-properties (org-export-filter-apply-functions (plist-get info :filter-final-output) (if ... full-body ...) info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))
  (let* ((org-export-current-backend (progn (or (and (vectorp backend) (>= (length backend) 8) (memq (aref backend 0) cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list (and subtreep ...) (and visible-only ...) (and body-only ...)))) (org-export--get-buffer-attributes))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn (or ... ...) (aref backend 1))) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args (quote org-export-before-parsing-hook) (progn ... ...))) (setq info (org-export-install-filters (org-combine-plists info ...))) (org-macro-replace-all (list (cons "author" ...) (cons "date" ...) (cons "email" ...) (cons "title" ...))) (let ((backend-name ...)) (let (... filter) (while --dolist-tail-- ... ... ...))) (setq tree (org-export-filter-apply-functions (plist-get info :filter-parse-tree) (org-element-parse-buffer nil visible-only) info)) (setq info (org-combine-plists info (org-export-collect-tree-properties tree info))) (let* ((body ...) (inner-template ...) (full-body ...) (template ...)) (org-no-properties (org-export-filter-apply-functions ... ... info))))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy))))))
  (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn (or (and (vectorp backend) (>= ... 8) (memq ... cl-struct-org-export-backend-tags)) (error "%s accessing a non-%s" (quote org-export-backend-name) (quote org-export-backend))) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil (list ... ... ...))) (org-export--get-buffer-attributes))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args (quote org-export-before-processing-hook) (progn ... ...)) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char (point-min)) (save-excursion (run-hook-with-args ... ...)) (setq info (org-export-install-filters ...)) (org-macro-replace-all (list ... ... ... ...)) (let (...) (let ... ...)) (setq tree (org-export-filter-apply-functions ... ... info)) (setq info (org-combine-plists info ...)) (let* (... ... ... ...) (org-no-properties ...)))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer (set-buffer --buf-copy) (restore-buffer-modified-p nil)) (kill-buffer --buf-copy)))))))
  (save-excursion (save-restriction (cond ((org-region-active-p) (narrow-to-region (region-beginning) (region-end))) (subtreep (org-narrow-to-subtree) (goto-char (point-min)) (forward-line) (narrow-to-region (point) (point-max)))) (let* ((org-export-current-backend (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref backend 1))) (info (org-combine-plists (list :export-options (delq nil ...)) (org-export--get-buffer-attributes))) tree) (let ((--buf-copy (org-export-copy-buffer))) (unwind-protect (save-current-buffer (set-buffer --buf-copy) (goto-char (point-min)) (progn (run-hook-with-args ... ...) (org-export-expand-include-keyword) (org-macro-initialize-templates) (org-macro-replace-all org-macro-templates) (org-export-execute-babel-code) (org-update-radio-target-regexp) (goto-char ...) (save-excursion ...) (setq info ...) (org-macro-replace-all ...) (let ... ...) (setq tree ...) (setq info ...) (let* ... ...))) (and (buffer-live-p --buf-copy) (progn (save-current-buffer ... ...) (kill-buffer --buf-copy))))))))
  org-export-as(latex nil nil nil nil)
  (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ((coding-system-for-write encoding)) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))
  (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message (current-message)) (message "%s" with-temp-message))) (let ((--copy-fun (org-export--generate-copy-script ...)) (--temp-file (make-temp-file "org-export-process")) (--coding buffer-file-coding-system)) (let ((temp-file --temp-file) (temp-buffer ...)) (unwind-protect (prog1 ... ...) (and ... ...))) (let* ((process-connection-type nil) (--proc-buffer ...) (--process ...)) (org-export-add-to-stack (get-buffer --proc-buffer) nil --process) (let (...) (set-process-sentinel --process ...))))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let (...) (write-file file))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file)))
  (let ((encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn (setq current-message ...) (message "%s" with-temp-message))) (let ((--copy-fun ...) (--temp-file ...) (--coding buffer-file-coding-system)) (let (... ...) (unwind-protect ... ...)) (let* (... ... ...) (org-export-add-to-stack ... nil --process) (let ... ...)))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert output) (let ... ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file))))
  (if (not (file-writable-p file)) (error "Output file not writable") (let ((encoding (or org-export-coding-system buffer-file-coding-system))) (if async (let ((with-temp-message "Initializing asynchronous export process") (current-message)) (unwind-protect (progn (if with-temp-message (progn ... ...)) (let (... ... ...) (let ... ...) (let* ... ... ...))) (and with-temp-message (if current-message (message "%s" current-message) (message nil))))) (let ((output (org-export-as backend subtreep visible-only body-only ext-plist))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ...) (and ... ...)))) (if (and (org-export--copy-to-kill-ring-p) (org-string-nw-p output)) (progn (org-kill-new output))) (or (and (functionp post-process) (funcall post-process file)) file)))))
  org-export-to-file(latex "./test-subscript.tex" nil nil nil nil nil)
  (let ((outfile (org-export-output-file-name ".tex" subtreep))) (org-export-to-file (quote latex) outfile async subtreep visible-only body-only ext-plist))
  org-latex-export-to-latex(nil nil nil nil)
  funcall(org-latex-export-to-latex nil nil nil nil)
  (save-excursion (if arg (progn (if (eq (marker-buffer org-export-dispatch-last-position) (org-base-buffer (current-buffer))) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t)))
  (cond ((eql action (quote template)) (org-export-insert-default-template nil optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote publish-current-file)) (org-publish-current-file (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-current-project)) (org-publish-current-project (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc (org-icompleting-read "Publish project: " org-publish-project-alist nil t) org-publish-project-alist) (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq (marker-buffer org-export-dispatch-last-position) (org-base-buffer ...)) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t)))))
  (let* ((input (cond ((equal arg (quote (16))) (quote (stack))) ((and arg org-export-dispatch-last-action)) (t (let ((wconfig ...)) (unwind-protect (progn ...) (set-window-configuration wconfig)))))) (action (car input)) (optns (cdr input))) (if (memq (quote subtree) optns) nil (move-marker org-export-dispatch-last-position nil)) (cond ((eql action (quote template)) (org-export-insert-default-template nil optns)) ((eql action (quote stack)) (org-export-stack)) ((eql action (quote publish-current-file)) (org-publish-current-file (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-current-project)) (org-publish-current-project (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-choose-project)) (org-publish (assoc (org-icompleting-read "Publish project: " org-publish-project-alist nil t) org-publish-project-alist) (memq (quote force) optns) (memq (quote async) optns))) ((eql action (quote publish-all)) (org-publish-all (memq (quote force) optns) (memq (quote async) optns))) (t (save-excursion (if arg (progn (if (eq ... ...) (goto-char org-export-dispatch-last-position) (move-marker org-export-dispatch-last-position nil)))) (funcall action (and (memq (quote async) optns) t) (and (memq (quote subtree) optns) t) (and (memq (quote visible) optns) t) (and (memq (quote body) optns) t))))))
  org-export-dispatch(nil)
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)

-- 
Aaron Ecay

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-12-18 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16  3:37 [export] org-export-with-* bugs Aaron Ecay
2013-12-17 17:29 ` Nicolas Goaziou
2013-12-17 19:36   ` Rasmus
2013-12-18  5:24   ` Aaron Ecay
2013-12-18 13:31     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).