Debugger entered--Lisp error: (quit) regexp-opt(nil) (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end)))) (end-of-line)) (let* ((end (save-excursion (outline-next-heading) (point-marker))) (drawer-end (save-excursion (and (re-search-forward org-property-end-re end t) (match-end 0)))) (prohibit (if (> diff 0) "^\\S-" (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end)))) (end-of-line)) (unless (save-excursion (end-of-line 1) (re-search-forward prohibit end t)) (while (and (< (point) end) (re-search-forward "^[ ]+" end t)) (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)))) (move-marker end nil)) (save-excursion (let* ((end (save-excursion (outline-next-heading) (point-marker))) (drawer-end (save-excursion (and (re-search-forward org-property-end-re end t) (match-end 0)))) (prohibit (if (> diff 0) "^\\S-" (concat "^ \\{0," (int-to-string (- diff)) "\\}\\S-"))) col) (while (re-search-forward (concat "\\(" (regexp-opt org-all-time-keywords) "\\|" "^[ ]*" org-tsr-regexp-both "*$" "\\|" "^[ ]*:[a-zA-Z][a-zA-Z0-9_]*:.*$" "\\)") (or drawer-end end) t) (beginning-of-line) (when (looking-at "^[ ]+") (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)) (if drawer-end (setq drawer-end (+ diff drawer-end)))) (end-of-line)) (unless (save-excursion (end-of-line 1) (re-search-forward prohibit end t)) (while (and (< (point) end) (re-search-forward "^[ ]+" end t)) (goto-char (match-end 0)) (setq col (current-column)) (if (< diff 0) (replace-match "")) (org-indent-to-column (+ diff col)))) (move-marker end nil))) org-fixup-indentation(1) (if org-adapt-indentation (org-fixup-indentation diff)) (let* ((level (save-match-data (funcall outline-level))) (after-change-functions (remove (quote flyspell-after-change-function) after-change-functions)) (down-head (concat (make-string (org-get-valid-level level 1) 42) " ")) (diff (abs (- level (length down-head) -1)))) (replace-match down-head nil t) (and org-auto-align-tags (org-set-tags nil t)) (if org-adapt-indentation (org-fixup-indentation diff)) (run-hooks (quote org-after-demote-entry-hook))) org-demote() funcall(org-demote) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (save-excursion (setq end (copy-marker end)) (goto-char beg) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (while (and (progn (outline-next-heading) (< (point) end)) (not (eobp))) (funcall fun))) (let ((org-ignore-region t)) (save-excursion (setq end (copy-marker end)) (goto-char beg) (if (and (re-search-forward org-outline-regexp-bol nil t) (< (point) end)) (funcall fun)) (while (and (progn (outline-next-heading) (< (point) end)) (not (eobp))) (funcall fun)))) org-map-region(org-demote 1 8) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl)) (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl))) (catch (quote --cl-block-nil--) (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl)))) (cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl))))) (block nil (let ((--cl-dotimes-temp-- minlevel) (lvl 0)) (while (< lvl --cl-dotimes-temp--) (org-map-region (quote org-demote) (point-min) (point-max)) (incf lvl)))) (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max))) (progn (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (if minlevel (progn (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max))))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (progn (insert-file-contents file) (when lines (let* ((lines (split-string lines "-")) (lbeg (string-to-number (car lines))) (lend (string-to-number (cadr lines))) (beg (if (zerop lbeg) (point-min) (goto-char (point-min)) (forward-line (1- lbeg)) (point))) (end (if (zerop lend) (point-max) (goto-char (point-min)) (forward-line (1- lend)) (point)))) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) (unwind-protect (progn (insert-file-contents file) (when lines (let* ((lines (split-string lines "-")) (lbeg (string-to-number (car lines))) (lend (string-to-number (cadr lines))) (beg (if (zerop lbeg) (point-min) (goto-char ...) (forward-line ...) (point))) (end (if (zerop lend) (point-max) (goto-char ...) (forward-line ...) (point)))) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents file) (when lines (let* ((lines (split-string lines "-")) (lbeg (string-to-number ...)) (lend (string-to-number ...)) (beg (if ... ... ... ... ...)) (end (if ... ... ... ... ...))) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents file) (when lines (let* ((lines (split-string lines "-")) (lbeg (string-to-number ...)) (lend (string-to-number ...)) (beg (if ... ... ... ... ...)) (end (if ... ... ... ... ...))) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (insert-file-contents file) (when lines (let* ((lines ...) (lbeg ...) (lend ...) (beg ...) (end ...)) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (with-temp-buffer (insert-file-contents file) (when lines (let* ((lines (split-string lines "-")) (lbeg (string-to-number (car lines))) (lend (string-to-number (cadr lines))) (beg (if (zerop lbeg) (point-min) (goto-char (point-min)) (forward-line (1- lbeg)) (point))) (end (if (zerop lend) (point-max) (goto-char (point-min)) (forward-line (1- lend)) (point)))) (narrow-to-region beg end))) (when (or prefix prefix1) (goto-char (point-min)) (while (not (eobp)) (insert (or prefix1 prefix)) (setq prefix1 "") (beginning-of-line 2))) (buffer-string) (when (member markup (quote ("src" "example"))) (goto-char (point-min)) (while (re-search-forward "^\\([*#]\\|[ ]*#\\+\\)" nil t) (goto-char (match-beginning 0)) (insert ",") (end-of-line 1))) (when minlevel (dotimes (lvl minlevel) (org-map-region (quote org-demote) (point-min) (point-max)))) (buffer-string)) org-get-file-contents("/home/nick/src/org/export/include/bar.org" nil nil "org" 1 nil) (insert (org-get-file-contents (expand-file-name file) prefix prefix1 markup minlevel lines)) (if (or (not file) (not (file-exists-p file)) (not (file-readable-p file))) (insert (format "CANNOT INCLUDE FILE %s" file)) (setq all (cons file all)) (when markup (if (equal (downcase markup) "src") (setq start (format "#+begin_src %s %s\n" (or lang "fundamental") (or switches "")) end "#+end_src") (setq start (format "#+begin_%s %s\n" markup switches) end (format "#+end_%s" markup)))) (insert (or start "")) (insert (org-get-file-contents (expand-file-name file) prefix prefix1 markup minlevel lines)) (or (bolp) (newline)) (insert (or end ""))) (while (re-search-forward "^#\\+INCLUDE:?[ ]+\\(.*\\)" nil t) (setq params (read (concat "(" (match-string 1) ")")) prefix (org-get-and-remove-property (quote params) :prefix) prefix1 (org-get-and-remove-property (quote params) :prefix1) minlevel (org-get-and-remove-property (quote params) :minlevel) lines (org-get-and-remove-property (quote params) :lines) file (org-symname-or-string (pop params)) markup (org-symname-or-string (pop params)) lang (and (member markup (quote ("src" "SRC"))) (org-symname-or-string (pop params))) switches (mapconcat (function (lambda (x) (format "%s" x))) params " ") start nil end nil) (delete-region (match-beginning 0) (match-end 0)) (if (or (not file) (not (file-exists-p file)) (not (file-readable-p file))) (insert (format "CANNOT INCLUDE FILE %s" file)) (setq all (cons file all)) (when markup (if (equal (downcase markup) "src") (setq start (format "#+begin_src %s %s\n" (or lang "fundamental") (or switches "")) end "#+end_src") (setq start (format "#+begin_%s %s\n" markup switches) end (format "#+end_%s" markup)))) (insert (or start "")) (insert (org-get-file-contents (expand-file-name file) prefix prefix1 markup minlevel lines)) (or (bolp) (newline)) (insert (or end "")))) (let ((case-fold-search t) params file markup lang start end prefix prefix1 switches all minlevel lines) (goto-char (point-min)) (while (re-search-forward "^#\\+INCLUDE:?[ ]+\\(.*\\)" nil t) (setq params (read (concat "(" (match-string 1) ")")) prefix (org-get-and-remove-property (quote params) :prefix) prefix1 (org-get-and-remove-property (quote params) :prefix1) minlevel (org-get-and-remove-property (quote params) :minlevel) lines (org-get-and-remove-property (quote params) :lines) file (org-symname-or-string (pop params)) markup (org-symname-or-string (pop params)) lang (and (member markup (quote ("src" "SRC"))) (org-symname-or-string (pop params))) switches (mapconcat (function (lambda (x) (format "%s" x))) params " ") start nil end nil) (delete-region (match-beginning 0) (match-end 0)) (if (or (not file) (not (file-exists-p file)) (not (file-readable-p file))) (insert (format "CANNOT INCLUDE FILE %s" file)) (setq all (cons file all)) (when markup (if (equal (downcase markup) "src") (setq start (format "#+begin_src %s %s\n" (or lang "fundamental") (or switches "")) end "#+end_src") (setq start (format "#+begin_%s %s\n" markup switches) end (format "#+end_%s" markup)))) (insert (or start "")) (insert (org-get-file-contents (expand-file-name file) prefix prefix1 markup minlevel lines)) (or (bolp) (newline)) (insert (or end "")))) all) org-export-handle-include-files() (setq now (org-export-handle-include-files)) (while now (setq all (append now all)) (setq now (org-export-handle-include-files)) (let ((intersection (delq nil (mapcar (lambda (el) (when ... el)) now)))) (when intersection (error "Recursive #+INCLUDE: %S" intersection)))) (let ((now (list org-current-export-file)) all) (while now (setq all (append now all)) (setq now (org-export-handle-include-files)) (let ((intersection (delq nil (mapcar (lambda ... ...) now)))) (when intersection (error "Recursive #+INCLUDE: %S" intersection))))) org-export-handle-include-files-recurse() (progn (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (unwind-protect (progn (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (with-current-buffer temp-buffer (unwind-protect (progn (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " *temp*"))) (with-current-buffer temp-buffer (unwind-protect (progn (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (with-temp-buffer (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (let* ((org-export-current-backend (or (plist-get parameters :for-backend) org-export-current-backend)) (archived-trees (plist-get parameters :archived-trees)) (inhibit-read-only t) (drawers org-drawers) (source-buffer (current-buffer)) target-alist rtn) (setq org-export-target-aliases nil org-export-preferred-target-alist nil org-export-id-target-alist nil org-export-code-refs nil) (with-temp-buffer (erase-buffer) (insert string) (setq case-fold-search t) (let ((inhibit-read-only t)) (remove-text-properties (point-min) (point-max) (quote (read-only t)))) (org-export-kill-licensed-text) (let ((org-inhibit-startup t)) (org-mode)) (setq case-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-export-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-after-include-files-hook)) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags (plist-get parameters :select-tags) (plist-get parameters :exclude-tags)) (run-hooks (quote org-export-preprocess-after-tree-selection-hook)) (org-export-remove-tasks (plist-get parameters :tasks)) (when (plist-get parameters :footnotes) (org-footnote-normalize nil parameters)) (org-export-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-hook)) (org-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-replace-src-segments-and-examples) (org-export-protect-colon-examples) (org-export-convert-protected-spaces) (setq target-alist (org-export-define-heading-targets target-alist)) (run-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers (plist-get parameters :drawers)) (when (plist-get parameters :skip-before-1st-heading) (goto-char (point-min)) (when (re-search-forward "^\\(#.*\n\\)?\\*+[ ]" nil t) (delete-region (point-min) (match-beginning 0)) (goto-char (point-min)) (insert "\n"))) (when (plist-get parameters :add-text) (goto-char (point-min)) (insert (plist-get parameters :add-text) "\n")) (org-export-remove-headline-metadata parameters) (setq target-alist (org-export-handle-invisible-targets target-alist)) (run-hooks (quote org-export-preprocess-before-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-attach-captions-and-attributes target-alist)) (org-export-mark-radio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) rtn) org-export-preprocess-string(#("* bar\n#+INCLUDE: \"bar.org\" org :minlevel 1\n" 0 2 (fontified nil) 2 5 (fontified nil) 5 6 (fontified nil) 6 42 (font-lock-fontified t fontified nil) 42 43 (font-lock-fontified t fontified nil rear-nonsticky t)) :emph-multiline t :for-backend latex :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :tasks t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil) (let* ((wcf (current-window-configuration)) (opt-plist (org-export-process-option-filters org-export-latex-options-plist)) (region-p (org-region-active-p)) (rbeg (and region-p (region-beginning))) (rend (and region-p (region-end))) (subtree-p (if (plist-get opt-plist :ignore-subtree-p) nil (when region-p (save-excursion (goto-char rbeg) (and (org-at-heading-p) (>= ... rend)))))) (opt-plist (setq org-export-opt-plist (if subtree-p (org-export-add-subtree-options opt-plist rbeg) opt-plist))) (org-export-latex-options-plist (setq org-export-opt-plist opt-plist)) (org-current-export-dir (or pub-dir (org-export-directory :html opt-plist))) (org-current-export-file buffer-file-name) (title (or (and subtree-p (org-export-get-title-from-subtree)) (plist-get opt-plist :title) (and (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))) "No Title")) (filename (and (not to-buffer) (concat (file-name-as-directory (or pub-dir (org-export-directory :LaTeX ext-plist))) (file-name-sans-extension (or (and subtree-p ...) (file-name-nondirectory ...))) ".tex"))) (filename (and filename (if (equal (file-truename filename) (file-truename (or buffer-file-name "dummy.org"))) (concat filename ".tex") filename))) (buffer (if to-buffer (cond ((eq to-buffer (quote string)) (get-buffer-create "*Org LaTeX Export*")) (t (get-buffer-create to-buffer))) (find-file-noselect filename))) (odd org-odd-levels-only) (header (org-export-latex-make-header title opt-plist)) (skip (cond (subtree-p nil) (region-p nil) (t (plist-get opt-plist :skip-before-1st-heading)))) (text (plist-get opt-plist :text)) (org-export-preprocess-hook (cons (\` (lambda nil (org-set-local (quote org-complex-heading-regexp) (\, org-export-latex-complex-heading-re)))) org-export-preprocess-hook)) (first-lines (if skip "" (org-export-latex-first-lines opt-plist (if subtree-p (save-excursion (goto-char rbeg) (point-at-bol 2)) rbeg) (if region-p rend)))) (coding-system (and (boundp (quote buffer-file-coding-system)) buffer-file-coding-system)) (coding-system-for-write (or org-export-latex-coding-system coding-system)) (save-buffer-coding-system (or org-export-latex-coding-system coding-system)) (region (buffer-substring (if region-p (region-beginning) (point-min)) (if region-p (region-end) (point-max)))) (text (and text (string-match "\\S-" text) (org-export-preprocess-string text :emph-multiline t :for-backend (quote latex) :comments nil :tags (plist-get opt-plist :tags) :priority (plist-get opt-plist :priority) :footnotes (plist-get opt-plist :footnotes) :drawers (plist-get opt-plist :drawers) :timestamps (plist-get opt-plist :timestamps) :todo-keywords (plist-get opt-plist :todo-keywords) :tasks (plist-get opt-plist :tasks) :add-text nil :skip-before-1st-heading skip :select-tags nil :exclude-tags nil :LaTeX-fragments nil))) (string-for-export (org-export-preprocess-string region :emph-multiline t :for-backend (quote latex) :comments nil :tags (plist-get opt-plist :tags) :priority (plist-get opt-plist :priority) :footnotes (plist-get opt-plist :footnotes) :drawers (plist-get opt-plist :drawers) :timestamps (plist-get opt-plist :timestamps) :todo-keywords (plist-get opt-plist :todo-keywords) :tasks (plist-get opt-plist :tasks) :add-text (if (eq to-buffer (quote string)) nil text) :skip-before-1st-heading skip :select-tags (plist-get opt-plist :select-tags) :exclude-tags (plist-get opt-plist :exclude-tags) :LaTeX-fragments nil))) (set-buffer buffer) (erase-buffer) (org-install-letbind) (and (fboundp (quote set-buffer-file-coding-system)) (set-buffer-file-coding-system coding-system-for-write)) (unless (or (eq to-buffer (quote string)) body-only) (insert header)) (when (and text (not (eq to-buffer (quote string)))) (insert (org-export-latex-content text (quote (lists tables fixed-width keywords))) "\n\n")) (unless (or skip (string-match "^\\*" first-lines)) (insert first-lines)) (org-export-latex-global (with-temp-buffer (insert string-for-export) (goto-char (point-min)) (when (re-search-forward "^\\(\\*+\\) " nil t) (let* ((asters (length ...)) (level (if odd ... ...))) (setq org-export-latex-add-level (if odd (1- ...) (1- asters))) (org-export-latex-parse-global level odd))))) (unless body-only (insert "\n\\end{document}")) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\([ ]+\\)\\[" nil t) (delete-region (match-beginning 1) (match-end 1))) (goto-char (point-min)) (when (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t) (goto-char (point-min)) (while (re-search-forward "\\\\tableofcontents\\>[ ]*\n?" nil t) (replace-match "")) (goto-char (point-min)) (and (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t) (replace-match "\\tableofcontents" t t))) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\>.*\\(\\\\\\\\\\)[ ]*\\(\n\\\\label.*\\)*\n\\\\begin" nil t) (delete-region (match-beginning 1) (match-end 1))) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\>.*\\(\\\\\\\\\\)[ ]*\\(\n\\\\label.*\\)*" nil t) (if (looking-at "[\n ]+") (replace-match "\n"))) (run-hooks (quote org-export-latex-final-hook)) (if to-buffer (unless (eq major-mode (quote latex-mode)) (latex-mode)) (save-buffer)) (org-export-latex-fix-inputenc) (run-hooks (quote org-export-latex-after-save-hook)) (goto-char (point-min)) (or (org-export-push-to-kill-ring "LaTeX") (message "Exporting to LaTeX...done")) (prog1 (if (eq to-buffer (quote string)) (prog1 (buffer-substring (point-min) (point-max)) (kill-buffer (current-buffer))) (current-buffer)) (set-window-configuration wcf))) org-export-as-latex(nil) call-interactively(org-export-as-latex) (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not (org-region-active-p))) (let ((p (start-process (concat "Exporting " (file-name-nondirectory (buffer-file-name))) "*Org Processes*" (expand-file-name invocation-name invocation-directory) "-batch" "-l" user-init-file "--eval" "(require 'org-exp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" (symbol-name (nth 1 ass))))) (set-process-sentinel p (quote org-export-process-sentinel)) (message "Background process \"%s\": started" p)) (if subtree-p (progn (org-mark-subtree) (org-activate-mark))) (call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window cbuf)) (let ((cw (selected-window))) (select-window (get-buffer-window cbuf)) (goto-char cpos) (deactivate-mark) (select-window cw)))) (let* ((bg (org-xor (equal arg (quote (16))) org-export-run-in-background)) (subtree-p (or (org-region-active-p) (eq org-export-initial-scope (quote subtree)))) (help "[t] insert the export option template\n[v] limit export to visible part of outline tree\n[1] switch buffer/subtree export\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF [d] ... and open PDF file\n\n[D] export as DocBook [V] export as DocBook, process to PDF, and open\n\n[o] export as OpenDocumentText [O] ... and open\n\n[j] export as TaskJuggler [J] ... and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generic exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files [c] ...as one combined file\n\n[F] publish current file [P] publish current project\n[X] publish a project... [E] publish every projects") (cmds (quote ((116 org-insert-export-options-template nil) (118 org-export-visible nil) (97 org-export-as-ascii t) (65 org-export-as-ascii-to-buffer t) (110 org-export-as-latin1 t) (78 org-export-as-latin1-to-buffer t) (117 org-export-as-utf8 t) (85 org-export-as-utf8-to-buffer t) (104 org-export-as-html t) (98 org-export-as-html-and-open t) (72 org-export-as-html-to-buffer nil) (82 org-export-region-as-html nil) (120 org-export-as-xoxo t) (103 org-export-generic t) (68 org-export-as-docbook t) (86 org-export-as-docbook-pdf-and-open t) (111 org-export-as-odt t) (79 org-export-as-odt-and-open t) (106 org-export-as-taskjuggler t) (74 org-export-as-taskjuggler-and-open t) (109 org-export-as-freemind t) (108 org-export-as-latex t) (112 org-export-as-pdf t) (100 org-export-as-pdf-and-open t) (76 org-export-as-latex-to-buffer nil) (105 org-export-icalendar-this-file t) (73 org-export-icalendar-all-agenda-files t) (99 org-export-icalendar-combine-agenda-files t) (70 org-publish-current-file t) (80 org-publish-current-project t) (88 org-publish t) (69 org-publish-all t)))) r1 r2 ass (cpos (point)) (cbuf (current-buffer)) bpos) (save-excursion (save-window-excursion (if subtree-p (message "Export subtree: ") (message "Export buffer: ")) (delete-other-windows) (with-output-to-temp-buffer "*Org Export/Publishing Help*" (princ help)) (org-fit-window-to-buffer (get-buffer-window "*Org Export/Publishing Help*")) (while (eq (setq r1 (read-char-exclusive)) 49) (cond (subtree-p (setq subtree-p nil) (message "Export buffer: ")) ((not subtree-p) (setq subtree-p t) (message "Export subtree: ")))) (when (eq r1 32) (let ((case-fold-search t) (end (save-excursion ... ...))) (outline-next-heading) (if (re-search-backward "^[ ]+\\(:latex_class:\\|:export_title:\\|:export_file_name:\\)[ ]+\\S-" end t) (progn (org-back-to-heading t) (setq subtree-p t) (setq bpos ...) (message "Select command (for subtree): ") (setq r1 ...)) (error "No enclosing node with LaTeX_CLASS or EXPORT_TITLE or EXPORT_FILE_NAME")))))) (redisplay) (and bpos (goto-char bpos)) (setq r2 (if (< r1 27) (+ r1 96) r1)) (unless (setq ass (assq r2 cmds)) (error "No command associated with key %c" r1)) (if (and bg (nth 2 ass) (not (buffer-base-buffer)) (not (org-region-active-p))) (let ((p (start-process (concat "Exporting " (file-name-nondirectory ...)) "*Org Processes*" (expand-file-name invocation-name invocation-directory) "-batch" "-l" user-init-file "--eval" "(require 'org-exp)" "--eval" "(setq org-wait .2)" (buffer-file-name) "-f" (symbol-name (nth 1 ass))))) (set-process-sentinel p (quote org-export-process-sentinel)) (message "Background process \"%s\": started" p)) (if subtree-p (progn (org-mark-subtree) (org-activate-mark))) (call-interactively (nth 1 ass)) (when (and bpos (get-buffer-window cbuf)) (let ((cw (selected-window))) (select-window (get-buffer-window cbuf)) (goto-char cpos) (deactivate-mark) (select-window cw))))) org-export(nil) call-interactively(org-export nil nil) recursive-edit() debug(error (void-variable *)) eval(* nil) eval-last-sexp-1(nil) eval-last-sexp(nil) call-interactively(eval-last-sexp nil nil)