From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Prince Subject: Re: Failure exporting with emacs --batch Date: Tue, 15 Nov 2011 19:36:19 -0500 Message-ID: <87mxbwaoos.fsf@hermes.hocat.ca> References: <87pqgt9wj7.fsf@hermes.hocat.ca> <2275.1321389025@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQTUM-0002ra-0i for emacs-orgmode@gnu.org; Tue, 15 Nov 2011 19:36:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQTUH-0004RO-Et for emacs-orgmode@gnu.org; Tue, 15 Nov 2011 19:36:29 -0500 Received: from socrates.hocat.ca ([76.10.188.53]:36978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQTUG-0004Qd-UF for emacs-orgmode@gnu.org; Tue, 15 Nov 2011 19:36:25 -0500 In-Reply-To: <2275.1321389025@alphaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Org Mode List On Tue, 15 Nov 2011 15:30:25 -0500, Nick Dokos wrot= e: > Tom Prince wrote: >=20 > > With b43c1c621f52f4a51d8d79cb76c226dfed003998 running > >=20 >=20 > Please use C-u M-x org-version to insert version information in your > mail. It's not possible to see from the SHA1 whether it is a recent > version or an old version without doing git archaelogy. org-version doesn't display a sha1 hash, when run from an installed copy of a git version. Further simplified: (this time with a git clone) emacs --no-site-file --no-init-file --load min.el --eval '(setq debug-on-er= ror t)' --eval '(find-file "test.org")' --eval '(org-version)' -eval '(org-= export-as-html 3)' --batch ------ min.el (setq org-babel-load-languages '((emacs-lisp . t) (latex . t))) (setq org-confirm-babel-evaluate nil) (add-to-list 'load-path (expand-file-name "~/src/org-mode/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org= -mode)) (require 'org-install) ------ ------ test.org * Notes for 2011-09-16 #+begin_src latex :file diag1.png some latex source #+end_src ------ ------ output OVERVIEW Loading vc-git... Org-mode version 7.7 (release_7.7.541.gb43c) Exporting... executing Latex code block... ... (let* ((info ...) (lang ...) (raw-params ...) hash) (when info (when ... = ... ...) (setf ... ...) (org-babel-exp-do-export info ... hash))) (save-excursion (goto-char (match-beginning 0)) (let* (... ... ... hash) = (when info ... ... ...))) org-babel-exp-src-block("some latex source" "latex" ":file" "diag1.png") apply(org-babel-exp-src-block "some latex source" ("latex" ":file" "diag1= .png")) (if (memq type org-export-blocks-witheld) "" (apply func body headers)) (progn (if (memq type org-export-blocks-witheld) "" (apply func body head= ers))) (unwind-protect (progn (if ... "" ...)) (set-match-data save-match-data-i= nternal (quote evaporate))) (let ((save-match-data-internal ...)) (unwind-protect (progn ...) (set-ma= tch-data save-match-data-internal ...))) (save-match-data (if (memq type org-export-blocks-witheld) "" (apply func= body headers))) (let ((replacement ...)) (when replacement (delete-region match-start mat= ch-end) (goto-char match-start) (insert replacement) (unless preserve-inden= t ...))) (progn (let (...) (when replacement ... ... ... ...))) (if (setq func (cadr ...)) (progn (let ... ...))) (when (setq func (cadr ...)) (let (...) (when replacement ... ... ... ...= ))) (let* ((match-start ...) (body-start ...) (indentation ...) (inner-re ...= ) (type ...) (headers ...) (balanced 1) (preserve-indent ...) match-end) (w= hile (and ... ...) (if ... ... ...)) (when (not ...) (error "unbalanced beg= in/end_%s blocks with %S" type ...)) (setq match-end (copy-marker ...)) (un= less preserve-indent (setq body ...)) (unless (memq type types) (setq types= ...)) (save-match-data (interblock start match-start)) (when (setq func ..= .) (let ... ...)) (set-marker match-start nil) (set-marker body-start nil) = (set-marker match-end nil)) (while (re-search-forward beg-re nil t) (let* (... ... ... ... ... ... ..= . ... match-end) (while ... ...) (when ... ...) (setq match-end ...) (unles= s preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...= ) (set-marker match-start nil) (set-marker body-start nil) (set-marker matc= h-end nil)) (setq start (point))) (let ((beg-re "^\\([ ]*\\)#\\+begin_\\(\\S-+\\)[ ]*\\(.*\\)?[=0D\n]")) = (while (re-search-forward beg-re nil t) (let* ... ... ... ... ... ... ... .= .. ... ... ...) (setq start ...))) (progn (fset (quote interblock) (function* ...)) (goto-char (point-min)) = (setq start (point)) (let (...) (while ... ... ...)) (interblock start (poi= nt-max)) (run-hooks (quote org-export-blocks-postblock-hook))) (unwind-protect (progn (fset ... ...) (goto-char ...) (setq start ...) (l= et ... ...) (interblock start ...) (run-hooks ...)) (if --cl-letf-bound-- (= fset ... --cl-letf-save--) (fmakunbound ...))) (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (p= rogn ... ... ... ... ... ...) (if --cl-letf-bound-- ... ...))) (letf ((... ...)) (goto-char (point-min)) (setq start (point)) (let (...)= (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org-= export-blocks-postblock-hook))) (letf* ((... ...)) (goto-char (point-min)) (setq start (point)) (let (...= ) (while ... ... ...)) (interblock start (point-max)) (run-hooks (quote org= -export-blocks-postblock-hook))) (flet ((interblock ... ...)) (goto-char (point-min)) (setq start (point))= (let (...) (while ... ... ...)) (interblock start (point-max)) (run-hooks = (quote org-export-blocks-postblock-hook))) (let ((case-fold-search t) (types ...) matched indentation type func star= t end body headers preserve-indent progress-marker) (flet (...) (goto-char = ...) (setq start ...) (let ... ...) (interblock start ...) (run-hooks ...))) (save-window-excursion (let (... ... matched indentation type func start = end body headers preserve-indent progress-marker) (flet ... ... ... ... ...= ...))) org-export-blocks-preprocess() (progn (erase-buffer) (insert string) (setq case-fold-search t) (let (...= ) (remove-text-properties ... ... ...)) (org-export-kill-licensed-text) (le= t (...) (org-mode)) (setq case-fold-search t) (org-clone-local-variables so= urce-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) (run-hooks (quot= e org-export-preprocess-hook)) (untabify (point-min) (point-max)) (org-expo= rt-handle-include-files-recurse) (run-hooks (quote org-export-preprocess-af= ter-include-files-hook)) (org-export-remove-archived-trees archived-trees) = (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-t= ags (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 parame= ters :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-e= xport-protect-colon-examples) (org-export-convert-protected-spaces) (setq t= arget-alist (org-export-define-heading-targets target-alist)) (run-hooks (q= uote org-export-preprocess-after-headline-targets-hook)) (org-export-rememb= er-html-container-classes) (org-export-remove-or-extract-drawers drawers (p= list-get parameters :drawers)) (when (plist-get parameters :skip-before-1st= -heading) (goto-char ...) (when ... ... ... ...)) (when (plist-get paramete= rs :add-text) (goto-char ...) (insert ... "\n")) (org-export-remove-headlin= e-metadata parameters) (setq target-alist (org-export-handle-invisible-targ= ets 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-protec= t-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks (quote org= -export-preprocess-after-blockquote-hook)) (unless (plist-get parameters :t= imestamps) (org-export-remove-timestamps)) (setq target-alist (org-export-a= ttach-captions-and-attributes target-alist)) (org-export-mark-radio-links) = (run-hooks (quote org-export-preprocess-after-radio-targets-hook)) (org-exp= ort-concatenate-multiline-links) (run-hooks (quote org-export-preprocess-be= fore-normalizing-links-hook)) (org-export-normalize-links) ...) (unwind-protect (progn (erase-buffer) (insert string) (setq case-fold-sea= rch t) (let ... ...) (org-export-kill-licensed-text) (let ... ...) (setq ca= se-fold-search t) (org-clone-local-variables source-buffer "^\\(org-\\|orgt= bl-\\)") (org-install-letbind) (run-hooks ...) (untabify ... ...) (org-expo= rt-handle-include-files-recurse) (run-hooks ...) (org-export-remove-archive= d-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (or= g-export-handle-export-tags ... ...) (run-hooks ...) (org-export-remove-tas= ks ...) (when ... ...) (org-export-mark-list-end) (org-export-preprocess-ap= ply-macros) (run-hooks ...) (org-export-blocks-preprocess) (org-export-mark= -list-properties) (org-export-replace-src-segments-and-examples) (org-expor= t-protect-colon-examples) (org-export-convert-protected-spaces) (setq targe= t-alist ...) (run-hooks ...) (org-export-remember-html-container-classes) (= org-export-remove-or-extract-drawers drawers ...) (when ... ... ...) (when = ... ... ...) (org-export-remove-headline-metadata parameters) (setq target-= alist ...) (run-hooks ...) (org-export-select-backend-specific-text) (org-e= xport-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-export-= protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks ...)= (unless ... ...) (setq target-alist ...) (org-export-mark-radio-links) (ru= n-hooks ...) (org-export-concatenate-multiline-links) (run-hooks ...) (org-= export-normalize-links) ...) (and (buffer-name temp-buffer) (kill-buffer te= mp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... = ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...= ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ..= . ... ... ... ... ... ... ... ... ... ... ...) (and ... ...))) (with-current-buffer temp-buffer (unwind-protect (progn ... ... ... ... .= .. ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... = ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...= ... ... ... ... ... ... ... ...) (and ... ...))) (let ((temp-buffer ...)) (with-current-buffer temp-buffer (unwind-protect= ... ...))) (with-temp-buffer (erase-buffer) (insert string) (setq case-fold-search t= ) (let (...) (remove-text-properties ... ... ...)) (org-export-kill-license= d-text) (let (...) (org-mode)) (setq case-fold-search t) (org-clone-local-v= ariables 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-pr= eprocess-after-include-files-hook)) (org-export-remove-archived-trees archi= ved-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-hand= le-export-tags (plist-get parameters :select-tags) (plist-get parameters :e= xclude-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-e= xport-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-examp= les) (org-export-protect-colon-examples) (org-export-convert-protected-spac= es) (setq target-alist (org-export-define-heading-targets target-alist)) (r= un-hooks (quote org-export-preprocess-after-headline-targets-hook)) (org-ex= port-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 ...) (when ... ... ... ...)) (when (plist-g= et parameters :add-text) (goto-char ...) (insert ... "\n")) (org-export-rem= ove-headline-metadata parameters) (setq target-alist (org-export-handle-inv= isible-targets target-alist)) (run-hooks (quote org-export-preprocess-befor= e-selecting-backend-code-hook)) (org-export-select-backend-specific-text) (= org-export-protect-quoted-subtrees) (org-export-remove-clock-lines) (org-ex= port-protect-verbatim) (org-export-mark-blockquote-verse-center) (run-hooks= (quote org-export-preprocess-after-blockquote-hook)) (unless (plist-get pa= rameters :timestamps) (org-export-remove-timestamps)) (setq target-alist (o= rg-export-attach-captions-and-attributes target-alist)) (org-export-mark-ra= dio-links) (run-hooks (quote org-export-preprocess-after-radio-targets-hook= )) (org-export-concatenate-multiline-links) (run-hooks (quote org-export-pr= eprocess-before-normalizing-links-hook)) (org-export-normalize-links) ...) (let* ((org-export-current-backend ...) (archived-trees ...) (inhibit-rea= d-only t) (drawers org-drawers) (source-buffer ...) target-alist rtn) (setq= org-export-target-aliases nil org-export-preferred-target-alist nil org-ex= port-id-target-alist nil org-export-code-refs nil) (with-temp-buffer (erase= -buffer) (insert string) (setq case-fold-search t) (let ... ...) (org-expor= t-kill-licensed-text) (let ... ...) (setq case-fold-search t) (org-clone-lo= cal-variables source-buffer "^\\(org-\\|orgtbl-\\)") (org-install-letbind) = (run-hooks ...) (untabify ... ...) (org-export-handle-include-files-recurse= ) (run-hooks ...) (org-export-remove-archived-trees archived-trees) (org-ex= port-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags ...= ...) (run-hooks ...) (org-export-remove-tasks ...) (when ... ...) (org-exp= ort-mark-list-end) (org-export-preprocess-apply-macros) (run-hooks ...) (or= g-export-blocks-preprocess) (org-export-mark-list-properties) (org-export-r= eplace-src-segments-and-examples) (org-export-protect-colon-examples) (org-= export-convert-protected-spaces) (setq target-alist ...) (run-hooks ...) (o= rg-export-remember-html-container-classes) (org-export-remove-or-extract-dr= awers drawers ...) (when ... ... ...) (when ... ... ...) (org-export-remove= -headline-metadata parameters) (setq target-alist ...) (run-hooks ...) (org= -export-select-backend-specific-text) (org-export-protect-quoted-subtrees) = (org-export-remove-clock-lines) (org-export-protect-verbatim) (org-export-m= ark-blockquote-verse-center) (run-hooks ...) (unless ... ...) (setq target-= alist ...) (org-export-mark-radio-links) (run-hooks ...) (org-export-concat= enate-multiline-links) (run-hooks ...) (org-export-normalize-links) ...) rt= n) org-export-preprocess-string("* Notes for 2011-09-16\n#+begin_src latex := file diag1.png\n some latex source\n#+end_src\n\n" :emph-multiline t :for-b= ackend html :skip-before-1st-heading nil :drawers nil :todo-keywords t :tas= ks t :tags not-in-toc :priority nil :footnotes t :timestamps t :archived-tr= ees headline :select-tags ("export") :exclude-tags ("noexport") :add-text n= il :LaTeX-fragments t) (org-split-string (org-export-preprocess-string region :emph-multiline t = :for-backend (quote html) :skip-before-1st-heading (plist-get opt-plist :sk= ip-before-1st-heading) :drawers (plist-get opt-plist :drawers) :todo-keywor= ds (plist-get opt-plist :todo-keywords) :tasks (plist-get opt-plist :tasks)= :tags (plist-get opt-plist :tags) :priority (plist-get opt-plist :priority= ) :footnotes (plist-get opt-plist :footnotes) :timestamps (plist-get opt-pl= ist :timestamps) :archived-trees (plist-get opt-plist :archived-trees) :sel= ect-tags (plist-get opt-plist :select-tags) :exclude-tags (plist-get opt-pl= ist :exclude-tags) :add-text (plist-get opt-plist :text) :LaTeX-fragments (= plist-get opt-plist :LaTeX-fragments)) "[=0D\n]") (let* ((opt-plist ...) (body-only ...) (style ...) (html-extension ...) v= alid thetoc have-headings first-heading-pos (odd org-odd-levels-only) (regi= on-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-offset ...) (opt-pli= st ...) (org-current-export-dir ...) (org-current-export-file buffer-file-n= ame) (level 0) (line "") (origline "") txt todo (umax nil) (umax-toc nil) (= filename ...) (current-dir ...) (auto-insert nil) (buffer ...) (org-levels-= open ...) (date ...) (author ...) (html-validation-link ...) (title ...) (l= ink-up ...) (link-home ...) (dummy ...) (html-table-tag ...) (quote-re0 ...= ) (quote-re ...) (inquote nil) (infixed nil) (inverse nil) (email ...) (lan= guage ...) (keywords ...) (description ...) (num ...) (lang-words nil) (hea= d-count 0) cnt ...) (let (...) (org-unmodified ...)) (message "Exporting...= ") (setq org-min-level (org-get-min-level lines level-offset)) (setq org-la= st-level org-min-level) (org-init-section-numbers) (cond (... ...) (date) (= t ...)) (setq lang-words (or ... ...)) (set-buffer buffer) (let (...) (eras= e-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp ...) (set= -buffer-file-coding-system coding-system-for-write)) (let (... ...) (mapc .= .. org-export-plist-vars) (setq umax ...) (setq umax-toc ...) (unless body-= only ... ... ...) (if ... ...) (setq head-count 0) (org-init-section-number= s) (org-open-par) (while ... ...) (when inquote ... ...) (org-html-level-st= art 1 nil umax ... head-count opt-plist) (when ... ...) (save-excursion ...= ...) (when footnotes ...) (let ... ...) (unless body-only ... ...) (if org= -export-html-with-timestamp ...) (unless body-only ...) (unless ... ... ...= ) (goto-char ...) (when thetoc ... ... ...) (goto-char ...) (while ... ...)= (goto-char ...) (goto-char ...) (let ... ...) (goto-char ...) (when ... ..= .) (remove-text-properties ... ... ...) (run-hooks ...) (or to-buffer ...) = (goto-char ...) (or ... ...) (if ... ... ...))) org-export-as-html(3) eval((org-export-as-html 3)) command-line-1(("--load" "min.el" "--eval" "(setq debug-on-error t)" "--e= val" "(find-file \"test.org\")" "--eval" "(org-version)" "-eval" "(org-expo= rt-as-html 3)")) command-line() normal-top-level() ------ =20