emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
@ 2010-09-13 11:33 Sébastien Vauban
  2010-09-17 14:08 ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-09-13 11:33 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

With latest git pull'ed, I now have such an error when exporting to LaTeX:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (args-out-of-range 0 0)
  replace-match("" t t)
  (progn (replace-match replacement t t) (unless preserve-indent (indent-code-rigidly ... ... indentation)))
  (if replacement (progn (replace-match replacement t t) (unless preserve-indent ...)))
  (when replacement (replace-match replacement t t) (unless preserve-indent (indent-code-rigidly ... ... indentation)))
  (let ((replacement ...)) (when replacement (replace-match replacement t t) (unless preserve-indent ...)))
  (progn (let (...) (when replacement ... ...)))
  (if (setq func (cadr ...)) (progn (let ... ...)))
  (when (setq func (cadr ...)) (let (...) (when replacement ... ...)))
  (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\r\n]\\([^\0]*?\\)[\r\n][ 	]*#\\+end_\\S-+.*[\r\n]?" nil t) (setq indentation (length ...)) (setq type (intern ...)) (setq headers (save-match-data ...)) (setq body (match-string 4)) (setq preserve-indent (or org-src-preserve-indentation ...)) (unless preserve-indent (setq body ...)) (unless (memq type types) (setq types ...)) (save-match-data (interblock start ...)) (when (setq func ...) (let ... ...)) (setq start (match-end 0)))
  (progn (fset (quote interblock) (function* ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\r\n]\\([^\0]*?\\)[\r\n][ 	]*#\\+end_\\S-+.*[\r\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
  (unwind-protect (progn (fset ... ...) (goto-char ...) (setq start ...) (while ... ... ... ... ... ... ... ... ... ... ...) (interblock start ...) (run-hooks ...)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
  (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ... ... ... ... ...) (if --cl-letf-bound-- ... ...)))
  (letf ((... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\r\n]\\([^\0]*?\\)[\r\n][ 	]*#\\+end_\\S-+.*[\r\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
  (letf* ((... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\r\n]\\([^\0]*?\\)[\r\n][ 	]*#\\+end_\\S-+.*[\r\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
  (flet ((interblock ... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\r\n]\\([^\0]*?\\)[\r\n][ 	]*#\\+end_\\S-+.*[\r\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
  (let ((case-fold-search t) (types ...) indentation type func start body headers preserve-indent progress-marker) (flet (...) (goto-char ...) (setq start ...) (while ... ... ... ... ... ... ... ... ... ... ...) (interblock start ...) (run-hooks ...)))
  (save-window-excursion (let (... ... indentation type func start body headers preserve-indent progress-marker) (flet ... ... ... ... ... ...)))
  org-export-blocks-preprocess()
  run-hooks(org-export-preprocess-after-include-files-hook)
  (save-current-buffer (set-buffer (get-buffer-create " org-mode-tmp")) (erase-buffer) (insert string) (setq case-fold-search t) (let (...) (remove-text-properties ... ... ...)) (org-export-kill-licensed-text) (let (...) (org-mode)) (setq case-fold-search t) (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-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-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when (plist-get parameters :footnotes) (org-footnote-normalize nil t)) (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) backend) (when (plist-get parameters :skip-before-1st-heading) (goto-char ...) (when ... ... ... ...)) (when (plist-get parameters :add-text) (goto-char ...) (insert ... "\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 backend) (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 backend 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) (org-export-target-internal-links target-alist) (when (plist-get parameters :emph-multiline) (org-export-concatenate-multiline-emphasis)) (when org-export-table-remove-special-lines (org-export-remove-special-table-lines)) (run-hooks (quote org-export-preprocess-before-backend-specifics-hook)) ...)
  (with-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer) (insert string) (setq case-fold-search t) (let (...) (remove-text-properties ... ... ...)) (org-export-kill-licensed-text) (let (...) (org-mode)) (setq case-fold-search t) (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-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-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when (plist-get parameters :footnotes) (org-footnote-normalize nil t)) (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) backend) (when (plist-get parameters :skip-before-1st-heading) (goto-char ...) (when ... ... ... ...)) (when (plist-get parameters :add-text) (goto-char ...) (insert ... "\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 backend) (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 backend 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) (org-export-target-internal-links target-alist) (when (plist-get parameters :emph-multiline) (org-export-concatenate-multiline-emphasis)) (when org-export-table-remove-special-lines (org-export-remove-special-table-lines)) (run-hooks (quote org-export-preprocess-before-backend-specifics-hook)) ...)
  (let* ((htmlp ...) (asciip ...) (latexp ...) (docbookp ...) (backend ...) (archived-trees ...) (inhibit-read-only t) (drawers org-drawers) (outline-regexp "\\*+ ") 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-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer) (insert string) (setq case-fold-search t) (let ... ...) (org-export-kill-licensed-text) (let ... ...) (setq case-fold-search t) (org-install-letbind) (run-hooks ...) (org-export-preprocess-apply-macros) (run-hooks ...) (untabify ... ...) (org-export-handle-include-files-recurse) (run-hooks ...) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags ... ...) (run-hooks ...) (org-export-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when ... ...) (setq target-alist ...) (run-hooks ...) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers ... backend) (when ... ... ...) (when ... ... ...) (org-export-remove-headline-metadata parameters) (setq target-alist ...) (run-hooks ...) (org-export-select-backend-specific-text backend) (org-export-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) (run-hooks ...) (org-export-concatenate-multiline-links) (run-hooks ...) (org-export-normalize-links) (org-export-target-internal-links target-alist) (when ... ...) (when org-export-table-remove-special-lines ...) (run-hooks ...) ...) (kill-buffer " org-mode-tmp") rtn)
  org-export-preprocess-string(#("#+TITLE:     Org-isodoc\n#+AUTHOR:    Seb Vauban\n#+DATE:      2010-09-13\n#+LANGUAGE:  en_US\n\n* Context\n\nThis is a letter sample.\n\n* Subject\n#+srcname: subject\n#+begin_src org :results latex\nComposing letters using Org mode and the LaTeX isodoc class\n#+end_src\n\n" 0 1 (font-lock-fontified t fontified nil) 1 7 (font-lock-fontified t fontified nil pabbrev-added t) 7 8 (font-lock-fontified t fontified nil) 8 13 (fontified nil) 13 23 (font-lock-fontified t fontified nil pabbrev-added t) 23 24 (fontified nil) 24 25 (font-lock-fontified t fontified nil) 25 32 (font-lock-fontified t fontified nil pabbrev-added t) 32 33 (font-lock-fontified t fontified nil) 33 37 (fontified nil) 37 40 (font-lock-fontified t fontified nil pabbrev-added t) 40 41 (font-lock-fontified t fontified nil) 41 47 (font-lock-fontified t fontified nil pabbrev-added t) 47 48 (fontified nil) 48 49 (font-lock-fontified t fontified nil) 49 54 (font-lock-fontified t fontified nil pabbrev-added t) 54 55 (font-lock-fontified t fontified nil) 55 61 (fontified nil) 61 71 (fontified nil font-lock-fontified t pabbrev-added t) 71 72 (fontified nil) 72 73 (font-lock-fontified t fontified nil) 73 82 (font-lock-fontified t fontified nil pabbrev-added t) 82 85 (font-lock-fontified t fontified nil) 85 87 (font-lock-fontified t fontified nil pabbrev-added t) 87 90 (font-lock-fontified t fontified nil pabbrev-added t) 90 91 (fontified nil) 91 92 (fontified nil) 92 93 (fontified nil pabbrev-added t) 93 94 (fontified nil) 94 101 (fontified nil pabbrev-added t) 101 102 (fontified nil) 102 103 (fontified nil) 103 107 (fontified nil pabbrev-added t) 107 108 (fontified nil) 108 110 (fontified nil pabbrev-added t) 110 111 (fontified nil) 111 112 (fontified nil pabbrev-added t) 112 113 (fontified nil) 113 119 (fontified nil pabbrev-added t) 119 120 (fontified nil) 120 126 (fontified nil pabbrev-added t) 126 127 (fontified nil) 127 128 (fontified nil) 128 129 (fontified nil) 129 130 (fontified nil pabbrev-added t) 130 131 (fontified nil) 131 138 (fontified nil pabbrev-added t) 138 139 (fontified nil) 139 140 (font-lock-fontified t fontified nil) 140 148 (font-lock-fontified t fontified nil pabbrev-added t) 148 150 (font-lock-fontified t fontified nil) 150 157 (font-lock-fontified t fontified nil pabbrev-added t) 157 158 (fontified nil) 158 159 (font-lock-fontified t fontified nil) 159 165 (font-lock-fontified t fontified nil pabbrev-added t) 165 169 (font-lock-fontified t fontified nil pabbrev-added t) 169 170 (font-lock-fontified t fontified nil) 170 173 (font-lock-fontified t fontified nil pabbrev-added t) 173 175 (font-lock-fontified t fontified nil) 175 182 (font-lock-fontified t fontified nil pabbrev-added t) 182 183 (font-lock-fontified t fontified nil) 183 188 (font-lock-fontified t fontified nil pabbrev-added t) 188 189 (font-lock-fontified t fontified nil) 189 198 (font-lock-fontified t fontified nil pabbrev-added t) 198 199 (font-lock-fontified t fontified nil) 199 206 (font-lock-fontified t fontified nil pabbrev-added t) 206 207 (font-lock-fontified t fontified nil) 207 212 (font-lock-fontified t fontified nil pabbrev-added t) 212 213 (font-lock-fontified t fontified nil) 213 216 (font-lock-fontified t fontified nil pabbrev-added t) 216 217 (font-lock-fontified t fontified nil) 217 221 (font-lock-fontified t fontified nil pabbrev-added t) 221 222 (font-lock-fontified t fontified nil) 222 225 (font-lock-fontified t fontified nil pabbrev-added t) 225 226 (font-lock-fontified t fontified nil) 226 229 (font-lock-fontified t fontified nil pabbrev-added t) 229 230 (font-lock-fontified t fontified nil) 230 235 (font-lock-fontified t fontified nil pabbrev-added t) 235 236 (font-lock-fontified t fontified nil) 236 242 (font-lock-fontified t fontified nil pabbrev-added t) 242 243 (font-lock-fontified t fontified nil) 243 248 (font-lock-fontified t fontified nil pabbrev-added t) 248 249 (font-lock-fontified t fontified nil) 249 250 (font-lock-fontified t fontified nil) 250 254 (font-lock-fontified t fontified nil pabbrev-added t) 254 258 (font-lock-fontified t fontified nil pabbrev-added t) 258 259 (fontified nil) 259 260 (fontified nil)) :emph-multiline t :for-LaTeX t :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil)
  (let* ((wcf ...) (opt-plist org-export-latex-options-plist) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (opt-plist ...) (org-export-latex-options-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (title ...) (filename ...) (filename ...) (buffer ...) (odd org-odd-levels-only) (header ...) (skip ...) (text ...) (org-export-preprocess-hook ...) (first-lines ...) (coding-system ...) (coding-system-for-write ...) (save-buffer-coding-system ...) (region ...) (text ...) (string-for-export ...)) (set-buffer buffer) (erase-buffer) (org-install-letbind) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (unless (or ... body-only) (insert header)) (when (and text ...) (insert ... "\n\n")) (unless skip (insert first-lines)) (org-export-latex-global (with-temp-buffer ... ... ...)) (unless body-only (insert "\n\\end{document}")) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\([ 	]+\\)\\[" nil t) (delete-region ... ...)) (goto-char (point-min)) (when (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t) (goto-char ...) (while ... ...) (goto-char ...) (and ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\>.*\\(\\\\\\\\\\)[ 	]*\\(\n\\\\label.*\\)*\n\\\\begin" nil t) (delete-region ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\>.*\\(\\\\\\\\\\)[ 	]*\\(\n\\\\label.*\\)*" nil t) (if ... ...)) (run-hooks (quote org-export-latex-final-hook)) (if to-buffer (unless ... ...) (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 ... ... ...) (set-window-configuration wcf)))
  org-export-as-latex(nil nil nil nil nil nil)
  (let* ((wconfig ...) (lbuf ...) (file ...) (base ...) (pdffile ...) (cmds org-latex-to-pdf-process) (outbuf ...) (bibtex-p ...) cmd output-dir) (with-current-buffer outbuf (erase-buffer)) (message (concat "Processing LaTeX file " file "...")) (setq output-dir (file-name-directory file)) (if (and cmds ...) (funcall cmds ...) (while cmds ... ... ... ... ...)) (message (concat "Processing LaTeX file " file "...done")) (if (not ...) (error ...) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles ...) (message "Exporting to PDF...done") pdffile))
  org-export-as-pdf(nil)
  (let ((pdffile ...)) (if pdffile (progn ... ...) (error "PDF file was not produced")))
  org-export-as-pdf-and-open(nil)
  call-interactively(org-export-as-pdf-and-open)
  (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...)))
  (let* ((bg ...) subtree-p (help "[t]   insert the export option template\n[v]   limit export to visible part of outline tree\n[1]   only export the current subtree\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[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 ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...)))
  org-export(nil)
  call-interactively(org-export nil nil)
--8<---------------cut here---------------end--------------->8---

I don't have the impression to have changed anything else (than pulling latest
version) on my side, though I don't really understand the above.

The error occurs with such a simple document:

--8<---------------cut here---------------start------------->8---
#+TITLE:     Org-isodoc
#+AUTHOR:    Seb Vauban
#+DATE:      2010-09-13
#+LANGUAGE:  en_US

* Context

This is a letter sample.

* Subject
#+srcname: subject
#+begin_src org :results latex
Composing letters using Org mode and the LaTeX isodoc class
#+end_src
--8<---------------cut here---------------end--------------->8---

And, what's weird, is that Org text is inserted in many other Emacs buffers,
such as dired or Gnus buffers!!

For example:

--8<---------------cut here---------------start------------->8---
  /home/sva/Examples/Org-scraps:
  total used in directory 416 available 2070788
  drwxr-xr-x 3 sva sva   4096 2010-09-13 13:20 ./
  drwxr-xr-x 7 sva sva   4096 2010-09-07 09:56 ../
  -rw-r--r-- 1 sva sva  46503 2010-09-13 13:19 ecm-org-isodoc.pdf
  -rw-r--r-- 1 sva sva    734 2010-09-13 13:19 ecm-org-isodoc.tex
  lrwxrwxrwx 1 sva sva     29 2010-09-13 13:20 .#ecm-org-isodoc.txt -> sva@mundaneum.3478:1284361988
  -rw-r--r-- 1 sva sva    260 2010-09-13 13:20 #ecm-org-isodoc.txt#
  -rw-r--r-- 1 sva sva    261 2010-09-13 13:19 #+BEGIN_LaTeX
Composing letters using Org mode and the \LaTeX{} isodoc class
#+END_LaTeX
ecm-org-isodoc.txt
  -rw-r--r-- 1 sva sva     41 2010-09-06 15:37 myscript.gp
  -rw-r--r-- 1 sva sva    981 2010-09-06 15:53 org-babel-elisp.txt
  drwxr-xr-x 6 sva sva   4096 2010-09-13 11:06 .svn/
--8<---------------cut here---------------end--------------->8---

Hope this can "say" something to someone...

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-13 11:33 [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0) Sébastien Vauban
@ 2010-09-17 14:08 ` Eric Schulte
  2010-09-17 15:18   ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-09-17 14:08 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Hi Sébastien,

This is a tricky problem indeed.  After some debugging, it appears that
the problem is the result of the "org" code block calling
`org-export-as-latex' on its body, while `org-export-as-latex' is
already called on the entire org-mode file.  Apparently the Org-mode
exporter is not currently able to handle nested export calls, because
the name of the temporary export buffer is hard coded into
`org-export-preprocess-string', meaning that the buffer is re-used and
deleted by the nested export call.

This fix will probably take some time to implement, and until then I
don't think it will be possible to evaluate org-mode blocks during
export.

Best -- Eric

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hello,
>
> With latest git pull'ed, I now have such an error when exporting to LaTeX:
>
> Debugger entered--Lisp error: (args-out-of-range 0 0)
>   replace-match("" t t)
>   (progn (replace-match replacement t t) (unless preserve-indent (indent-code-rigidly ... ... indentation)))
>   (if replacement (progn (replace-match replacement t t) (unless preserve-indent ...)))
>   (when replacement (replace-match replacement t t) (unless preserve-indent (indent-code-rigidly ... ... indentation)))
>   (let ((replacement ...)) (when replacement (replace-match replacement t t) (unless preserve-indent ...)))
>   (progn (let (...) (when replacement ... ...)))
>   (if (setq func (cadr ...)) (progn (let ... ...)))
>   (when (setq func (cadr ...)) (let (...) (when replacement ... ...)))
>   (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ 	]*#\\+end_\\S-+.*[\n]?" nil t) (setq indentation (length ...)) (setq type (intern ...)) (setq headers (save-match-data ...)) (setq body (match-string 4)) (setq preserve-indent (or org-src-preserve-indentation ...)) (unless preserve-indent (setq body ...)) (unless (memq type types) (setq types ...)) (save-match-data (interblock start ...)) (when (setq func ...) (let ... ...)) (setq start (match-end 0)))
>   (progn (fset (quote interblock) (function* ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ 	]*#\\+end_\\S-+.*[\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
>   (unwind-protect (progn (fset ... ...) (goto-char ...) (setq start ...) (while ... ... ... ... ... ... ... ... ... ... ...) (interblock start ...) (run-hooks ...)) (if --cl-letf-bound-- (fset ... --cl-letf-save--) (fmakunbound ...)))
>   (let* ((--cl-letf-bound-- ...) (--cl-letf-save-- ...)) (unwind-protect (progn ... ... ... ... ... ...) (if --cl-letf-bound-- ... ...)))
>   (letf ((... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ 	]*#\\+end_\\S-+.*[\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
>   (letf* ((... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ 	]*#\\+end_\\S-+.*[\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
>   (flet ((interblock ... ...)) (goto-char (point-min)) (setq start (point)) (while (re-search-forward "^\\([ 	]*\\)#\\+begin_\\(\\S-+\\)[ 	]*\\(.*\\)?[\n]\\([^]*?\\)[\n][ 	]*#\\+end_\\S-+.*[\n]?" nil t) (setq indentation ...) (setq type ...) (setq headers ...) (setq body ...) (setq preserve-indent ...) (unless preserve-indent ...) (unless ... ...) (save-match-data ...) (when ... ...) (setq start ...)) (interblock start (point-max)) (run-hooks (quote org-export-blocks-postblock-hook)))
>   (let ((case-fold-search t) (types ...) indentation type func start body headers preserve-indent progress-marker) (flet (...) (goto-char ...) (setq start ...) (while ... ... ... ... ... ... ... ... ... ... ...) (interblock start ...) (run-hooks ...)))
>   (save-window-excursion (let (... ... indentation type func start body headers preserve-indent progress-marker) (flet ... ... ... ... ... ...)))
>   org-export-blocks-preprocess()
>   run-hooks(org-export-preprocess-after-include-files-hook)
>   (save-current-buffer (set-buffer (get-buffer-create " org-mode-tmp")) (erase-buffer) (insert string) (setq case-fold-search t) (let (...) (remove-text-properties ... ... ...)) (org-export-kill-licensed-text) (let (...) (org-mode)) (setq case-fold-search t) (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-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-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when (plist-get parameters :footnotes) (org-footnote-normalize nil t)) (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) backend) (when (plist-get parameters :skip-before-1st-heading) (goto-char ...) (when ... ... ... ...)) (when (plist-get parameters :add-text) (goto-char ...) (insert ... "\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 backend) (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 backend 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) (org-export-target-internal-links target-alist) (when (plist-get parameters :emph-multiline) (org-export-concatenate-multiline-emphasis)) (when org-export-table-remove-special-lines (org-export-remove-special-table-lines)) (run-hooks (quote org-export-preprocess-before-backend-specifics-hook)) ...)
>   (with-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer) (insert string) (setq case-fold-search t) (let (...) (remove-text-properties ... ... ...)) (org-export-kill-licensed-text) (let (...) (org-mode)) (setq case-fold-search t) (org-install-letbind) (run-hooks (quote org-export-preprocess-hook)) (org-export-preprocess-apply-macros) (run-hooks (quote org-export-preprocess-after-macros-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-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when (plist-get parameters :footnotes) (org-footnote-normalize nil t)) (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) backend) (when (plist-get parameters :skip-before-1st-heading) (goto-char ...) (when ... ... ... ...)) (when (plist-get parameters :add-text) (goto-char ...) (insert ... "\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 backend) (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 backend 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) (org-export-target-internal-links target-alist) (when (plist-get parameters :emph-multiline) (org-export-concatenate-multiline-emphasis)) (when org-export-table-remove-special-lines (org-export-remove-special-table-lines)) (run-hooks (quote org-export-preprocess-before-backend-specifics-hook)) ...)
>   (let* ((htmlp ...) (asciip ...) (latexp ...) (docbookp ...) (backend ...) (archived-trees ...) (inhibit-read-only t) (drawers org-drawers) (outline-regexp "\\*+ ") 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-current-buffer (get-buffer-create " org-mode-tmp") (erase-buffer) (insert string) (setq case-fold-search t) (let ... ...) (org-export-kill-licensed-text) (let ... ...) (setq case-fold-search t) (org-install-letbind) (run-hooks ...) (org-export-preprocess-apply-macros) (run-hooks ...) (untabify ... ...) (org-export-handle-include-files-recurse) (run-hooks ...) (org-export-remove-archived-trees archived-trees) (org-export-remove-comment-blocks-and-subtrees) (org-export-handle-export-tags ... ...) (run-hooks ...) (org-export-mark-list-ending backend) (org-export-replace-src-segments-and-examples backend) (org-export-protect-colon-examples) (when ... ...) (setq target-alist ...) (run-hooks ...) (org-export-remember-html-container-classes) (org-export-remove-or-extract-drawers drawers ... backend) (when ... ... ...) (when ... ... ...) (org-export-remove-headline-metadata parameters) (setq target-alist ...) (run-hooks ...) (org-export-select-backend-specific-text backend) (org-export-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) (run-hooks ...) (org-export-concatenate-multiline-links) (run-hooks ...) (org-export-normalize-links) (org-export-target-internal-links target-alist) (when ... ...) (when org-export-table-remove-special-lines ...) (run-hooks ...) ...) (kill-buffer " org-mode-tmp") rtn)
>   org-export-preprocess-string(#("#+TITLE:     Org-isodoc\n#+AUTHOR:    Seb Vauban\n#+DATE:      2010-09-13\n#+LANGUAGE:  en_US\n\n* Context\n\nThis is a letter sample.\n\n* Subject\n#+srcname: subject\n#+begin_src org :results latex\nComposing letters using Org mode and the LaTeX isodoc class\n#+end_src\n\n" 0 1 (font-lock-fontified t fontified nil) 1 7 (font-lock-fontified t fontified nil pabbrev-added t) 7 8 (font-lock-fontified t fontified nil) 8 13 (fontified nil) 13 23 (font-lock-fontified t fontified nil pabbrev-added t) 23 24 (fontified nil) 24 25 (font-lock-fontified t fontified nil) 25 32 (font-lock-fontified t fontified nil pabbrev-added t) 32 33 (font-lock-fontified t fontified nil) 33 37 (fontified nil) 37 40 (font-lock-fontified t fontified nil pabbrev-added t) 40 41 (font-lock-fontified t fontified nil) 41 47 (font-lock-fontified t fontified nil pabbrev-added t) 47 48 (fontified nil) 48 49 (font-lock-fontified t fontified nil) 49 54 (font-lock-fontified t fontified nil pabbrev-added t) 54 55 (font-lock-fontified t fontified nil) 55 61 (fontified nil) 61 71 (fontified nil font-lock-fontified t pabbrev-added t) 71 72 (fontified nil) 72 73 (font-lock-fontified t fontified nil) 73 82 (font-lock-fontified t fontified nil pabbrev-added t) 82 85 (font-lock-fontified t fontified nil) 85 87 (font-lock-fontified t fontified nil pabbrev-added t) 87 90 (font-lock-fontified t fontified nil pabbrev-added t) 90 91 (fontified nil) 91 92 (fontified nil) 92 93 (fontified nil pabbrev-added t) 93 94 (fontified nil) 94 101 (fontified nil pabbrev-added t) 101 102 (fontified nil) 102 103 (fontified nil) 103 107 (fontified nil pabbrev-added t) 107 108 (fontified nil) 108 110 (fontified nil pabbrev-added t) 110 111 (fontified nil) 111 112 (fontified nil pabbrev-added t) 112 113 (fontified nil) 113 119 (fontified nil pabbrev-added t) 119 120 (fontified nil) 120 126 (fontified nil pabbrev-added t) 126 127 (fontified nil) 127 128 (fontified nil) 128 129 (fontified nil) 129 130 (fontified nil pabbrev-added t) 130 131 (fontified nil) 131 138 (fontified nil pabbrev-added t) 138 139 (fontified nil) 139 140 (font-lock-fontified t fontified nil) 140 148 (font-lock-fontified t fontified nil pabbrev-added t) 148 150 (font-lock-fontified t fontified nil) 150 157 (font-lock-fontified t fontified nil pabbrev-added t) 157 158 (fontified nil) 158 159 (font-lock-fontified t fontified nil) 159 165 (font-lock-fontified t fontified nil pabbrev-added t) 165 169 (font-lock-fontified t fontified nil pabbrev-added t) 169 170 (font-lock-fontified t fontified nil) 170 173 (font-lock-fontified t fontified nil pabbrev-added t) 173 175 (font-lock-fontified t fontified nil) 175 182 (font-lock-fontified t fontified nil pabbrev-added t) 182 183 (font-lock-fontified t fontified nil) 183 188 (font-lock-fontified t fontified nil pabbrev-added t) 188 189 (font-lock-fontified t fontified nil) 189 198 (font-lock-fontified t fontified nil pabbrev-added t) 198 199 (font-lock-fontified t fontified nil) 199 206 (font-lock-fontified t fontified nil pabbrev-added t) 206 207 (font-lock-fontified t fontified nil) 207 212 (font-lock-fontified t fontified nil pabbrev-added t) 212 213 (font-lock-fontified t fontified nil) 213 216 (font-lock-fontified t fontified nil pabbrev-added t) 216 217 (font-lock-fontified t fontified nil) 217 221 (font-lock-fontified t fontified nil pabbrev-added t) 221 222 (font-lock-fontified t fontified nil) 222 225 (font-lock-fontified t fontified nil pabbrev-added t) 225 226 (font-lock-fontified t fontified nil) 226 229 (font-lock-fontified t fontified nil pabbrev-added t) 229 230 (font-lock-fontified t fontified nil) 230 235 (font-lock-fontified t fontified nil pabbrev-added t) 235 236 (font-lock-fontified t fontified nil) 236 242 (font-lock-fontified t fontified nil pabbrev-added t) 242 243 (font-lock-fontified t fontified nil) 243 248 (font-lock-fontified t fontified nil pabbrev-added t) 248 249 (font-lock-fontified t fontified nil) 249 250 (font-lock-fontified t fontified nil) 250 254 (font-lock-fontified t fontified nil pabbrev-added t) 254 258 (font-lock-fontified t fontified nil pabbrev-added t) 258 259 (fontified nil) 259 260 (fontified nil)) :emph-multiline t :for-LaTeX t :comments nil :tags not-in-toc :priority nil :footnotes t :drawers nil :timestamps t :todo-keywords t :add-text nil :skip-before-1st-heading nil :select-tags ("export") :exclude-tags ("noexport") :LaTeX-fragments nil)
>   (let* ((wcf ...) (opt-plist org-export-latex-options-plist) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (opt-plist ...) (org-export-latex-options-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (title ...) (filename ...) (filename ...) (buffer ...) (odd org-odd-levels-only) (header ...) (skip ...) (text ...) (org-export-preprocess-hook ...) (first-lines ...) (coding-system ...) (coding-system-for-write ...) (save-buffer-coding-system ...) (region ...) (text ...) (string-for-export ...)) (set-buffer buffer) (erase-buffer) (org-install-letbind) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (unless (or ... body-only) (insert header)) (when (and text ...) (insert ... "\n\n")) (unless skip (insert first-lines)) (org-export-latex-global (with-temp-buffer ... ... ...)) (unless body-only (insert "\n\\end{document}")) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\([ 	]+\\)\\[" nil t) (delete-region ... ...)) (goto-char (point-min)) (when (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t) (goto-char ...) (while ... ...) (goto-char ...) (and ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\>.*\\(\\\\\\\\\\)[ 	]*\\(\n\\\\label.*\\)*\n\\\\begin" nil t) (delete-region ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ 	]*\\\\item\\>.*\\(\\\\\\\\\\)[ 	]*\\(\n\\\\label.*\\)*" nil t) (if ... ...)) (run-hooks (quote org-export-latex-final-hook)) (if to-buffer (unless ... ...) (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 ... ... ...) (set-window-configuration wcf)))
>   org-export-as-latex(nil nil nil nil nil nil)
>   (let* ((wconfig ...) (lbuf ...) (file ...) (base ...) (pdffile ...) (cmds org-latex-to-pdf-process) (outbuf ...) (bibtex-p ...) cmd output-dir) (with-current-buffer outbuf (erase-buffer)) (message (concat "Processing LaTeX file " file "...")) (setq output-dir (file-name-directory file)) (if (and cmds ...) (funcall cmds ...) (while cmds ... ... ... ... ...)) (message (concat "Processing LaTeX file " file "...done")) (if (not ...) (error ...) (set-window-configuration wconfig) (when org-export-pdf-remove-logfiles ...) (message "Exporting to PDF...done") pdffile))
>   org-export-as-pdf(nil)
>   (let ((pdffile ...)) (if pdffile (progn ... ...) (error "PDF file was not produced")))
>   org-export-as-pdf-and-open(nil)
>   call-interactively(org-export-as-pdf-and-open)
>   (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...)))
>   (let* ((bg ...) subtree-p (help "[t]   insert the export option template\n[v]   limit export to visible part of outline tree\n[1]   only export the current subtree\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[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 ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...)))
>   org-export(nil)
>   call-interactively(org-export nil nil)
>
> I don't have the impression to have changed anything else (than pulling latest
> version) on my side, though I don't really understand the above.
>
> The error occurs with such a simple document:
>
> #+TITLE:     Org-isodoc
> #+AUTHOR:    Seb Vauban
> #+DATE:      2010-09-13
> #+LANGUAGE:  en_US
>
> * Context
>
> This is a letter sample.
>
> * Subject
> #+srcname: subject
> #+begin_src org :results latex
> Composing letters using Org mode and the LaTeX isodoc class
> #+end_src
>
> And, what's weird, is that Org text is inserted in many other Emacs buffers,
> such as dired or Gnus buffers!!
>
> For example:
>
>   /home/sva/Examples/Org-scraps:
>   total used in directory 416 available 2070788
>   drwxr-xr-x 3 sva sva   4096 2010-09-13 13:20 ./
>   drwxr-xr-x 7 sva sva   4096 2010-09-07 09:56 ../
>   -rw-r--r-- 1 sva sva  46503 2010-09-13 13:19 ecm-org-isodoc.pdf
>   -rw-r--r-- 1 sva sva    734 2010-09-13 13:19 ecm-org-isodoc.tex
>   lrwxrwxrwx 1 sva sva     29 2010-09-13 13:20 .#ecm-org-isodoc.txt -> sva@mundaneum.3478:1284361988
>   -rw-r--r-- 1 sva sva    260 2010-09-13 13:20 #ecm-org-isodoc.txt#
>   -rw-r--r-- 1 sva sva    261 2010-09-13 13:19 #+BEGIN_LaTeX
> Composing letters using Org mode and the \LaTeX{} isodoc class
> #+END_LaTeX
> ecm-org-isodoc.txt
>   -rw-r--r-- 1 sva sva     41 2010-09-06 15:37 myscript.gp
>   -rw-r--r-- 1 sva sva    981 2010-09-06 15:53 org-babel-elisp.txt
>   drwxr-xr-x 6 sva sva   4096 2010-09-13 11:06 .svn/
>
> Hope this can "say" something to someone...
>
> Best regards,
>   Seb

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

* Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-17 14:08 ` Eric Schulte
@ 2010-09-17 15:18   ` Sébastien Vauban
  2010-09-17 16:55     ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-09-17 15:18 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

"Eric Schulte" wrote:
>> The error occurs with such a simple document:
>>
>> #+TITLE:     Org-isodoc
>> #+LANGUAGE:  en_US
>>
>> * Context
>>
>> This is a letter sample.
>>
>> * Subject
>> #+srcname: subject
>> #+begin_src org :results latex
>> Composing letters using Org mode and the LaTeX isodoc class
>> #+end_src
>
> This is a tricky problem indeed. After some debugging, it appears that the
> problem is the result of the "org" code block calling `org-export-as-latex'
> on its body, while `org-export-as-latex' is already called on the entire
> org-mode file. Apparently the Org-mode exporter is not currently able to
> handle nested export calls, because the name of the temporary export buffer
> is hard coded into `org-export-preprocess-string', meaning that the buffer
> is re-used and deleted by the nested export call.
>
> This fix will probably take some time to implement, and until then I don't
> think it will be possible to evaluate org-mode blocks during export.

OK. Am I right, then, to conclude that the discussed Noweb route must be
abandoned (at least, temporarily) for writing isodoc letters?

What could be a workaround?

Thanks a lot...

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-17 15:18   ` Sébastien Vauban
@ 2010-09-17 16:55     ` Eric Schulte
  2010-09-20 22:10       ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-09-17 16:55 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Hi Seb,

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric,
>
> "Eric Schulte" wrote:
>>> The error occurs with such a simple document:
>>>
>>> #+TITLE:     Org-isodoc
>>> #+LANGUAGE:  en_US
>>>
>>> * Context
>>>
>>> This is a letter sample.
>>>
>>> * Subject
>>> #+srcname: subject
>>> #+begin_src org :results latex
>>> Composing letters using Org mode and the LaTeX isodoc class
>>> #+end_src
>>
>> This is a tricky problem indeed. After some debugging, it appears that the
>> problem is the result of the "org" code block calling `org-export-as-latex'
>> on its body, while `org-export-as-latex' is already called on the entire
>> org-mode file. Apparently the Org-mode exporter is not currently able to
>> handle nested export calls, because the name of the temporary export buffer
>> is hard coded into `org-export-preprocess-string', meaning that the buffer
>> is re-used and deleted by the nested export call.
>>
>> This fix will probably take some time to implement, and until then I don't
>> think it will be possible to evaluate org-mode blocks during export.
>
> OK. Am I right, then, to conclude that the discussed Noweb route must be
> abandoned (at least, temporarily) for writing isodoc letters?
>

Noweb expansion is still possible, however explicitly performing the
export is not.

>
> What could be a workaround?
>

Simply change =:results latex= to =:results org= and the code block body
will be harmlessly expanded and deposited in the org buffer on export,
then carried along with the rest of the file for export.

--8<---------------cut here---------------start------------->8---
#+TITLE:     Org-isodoc
#+AUTHOR:    Seb Vauban
#+DATE:      2010-09-13
#+LANGUAGE:  en_US

* Context

This is a letter sample.

* Subject
#+source: me
#+begin_src org
  I am *eric*.
#+end_src

#+srcname: subject
#+begin_src org :results org replace :noweb yes
Composing letters using *Org mode* and the LaTeX isodoc class

<<me>>
#+end_src
--8<---------------cut here---------------end--------------->8---

I should have mentioned this in my earlier email.

>
> Thanks a lot...
>

My pleasure.

Best -- Eric

>
> Best regards,
>   Seb

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

* Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-17 16:55     ` Eric Schulte
@ 2010-09-20 22:10       ` Sébastien Vauban
  2010-09-21 16:19         ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Sébastien Vauban @ 2010-09-20 22:10 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric and all the others,

"Eric Schulte" wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> "Eric Schulte" wrote:
>>>> The error occurs with such a simple document:
>>>>
>>>> #+TITLE:     Org-isodoc
>>>> #+LANGUAGE:  en_US
>>>>
>>>> * Context
>>>>
>>>> This is a letter sample.
>>>>
>>>> * Subject
>>>> #+srcname: subject
>>>> #+begin_src org :results latex
>>>> Composing letters using Org mode and the LaTeX isodoc class
>>>> #+end_src
>>>
>>> This is a tricky problem indeed. [...] This fix will probably take some
>>> time to implement, and until then I don't think it will be possible to
>>> evaluate org-mode blocks during export.
>
> Noweb expansion is still possible, however explicitly performing the export
> is not.
>
>> What could be a workaround?
>
> Simply change =:results latex= to =:results org= and the code block body
> will be harmlessly expanded and deposited in the org buffer on export, then
> carried along with the rest of the file for export.
>
> * Subject
> #+source: me
> #+begin_src org
>   I am *eric*.
> #+end_src
>
> #+srcname: subject
> #+begin_src org :results org replace :noweb yes
> Composing letters using *Org mode* and the LaTeX isodoc class
>
> <<me>>
> #+end_src

Question: =:results org replace= (instead of =:results org=) is necessary if
we wanna see the results expanded in the Org buffer, on key =C-c C-v C-e=.
Why?

Trying to build on the route you mention, I come up with different solutions,
such as:

--8<---------------cut here---------------start------------->8---
#+TITLE:     Org-isodoc
#+AUTHOR:    Seb Vauban
#+DATE:      2010-09-20

* COMMENT Parameters

#+source: contents
#+begin_src org
My body includes a list:

- one
- two

and a small table:

| first | second |
| other | last   |

Not more.
#+end_src

#+srcname: letter
#+begin_src org :results org replace :noweb yes
Composing letters using *Org mode* and the LaTeX isodoc class

<<contents>>
#+end_src

* Results

#+LaTeX: \documentclass[11pt]{isodoc}
#+LaTeX: \usepackage[utf8x]{inputenc}
#+LaTeX: \usepackage[T1]{fontenc}

#+LaTeX: \setupdocument{
#+LaTeX:     to = {Eric},
#+LaTeX:     subject = {Tough to understand what to do...},
#+LaTeX:     opening = {Hi},
#+LaTeX:     closing = {Best}
#+LaTeX: }

#+LaTeX: \begin{document}
#+LaTeX: {}\letter{%

#+results: letter
#+BEGIN_SRC org
Composing letters using *Org mode* and the LaTeX isodoc class

My body includes a list:

- one
- two

and a small table:

| first | second |
| other | last   |

Not more.
#+END_SRC

#+LaTeX: }
#+LaTeX: \end{document}
--8<---------------cut here---------------end--------------->8---

Asking for Org results, as you mentioned, made me dream about a direct export
to PDF on =C-c C-v C-e=. However, when the Org results block =letter= is
surrounded by LaTeX code, items and tables aren't translated anymore to their
LaTeX counterparts.

OK, even if it doe, I still have a couple of problems to resolve:

- How to avoid generating the title of the exported headline (=* Results=)?
- How to impose my =documentclass isodoc= instead of =article=?

and maybe more.

Then, if I understand correctly, the only fallback is the tangling solution:

--8<---------------cut here---------------start------------->8---
* Letter
  :PROPERTIES:
  :ID:       02360e5c-8f76-4e6d-a98f-b8c5fa2a3da4
  :END:

#+source: body
#+begin_src org :results latex
My body includes a list:

- one
- two

and a small table:

| first | second |
| other | last   |

Not more.
#+end_src

#+begin_src latex :noweb yes :tangle yes
\documentclass[11pt]{isodoc}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\setupdocument{
    to = {Eric},
    subject = {Tough to understand what to do...},
    opening = {Hi},
    closing = {Best}
}

\begin{document}
\letter{%
<<body()>>
}
\end{document}
#+end_src

#+results:
#+BEGIN_LaTeX
\documentclass[11pt]{isodoc}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}

\setupdocument{
    to = {Eric},
    subject = {Tough to understand what to do...},
    opening = {Hi},
    closing = {Best}
}

\begin{document}
\letter{%
My body includes a list:

\begin{itemize}
\item one
\item two
\end{itemize}

and a small table:


\begin{center}
\begin{tabular}{ll}
 first  &  second  \\
 other  &  last    \\
\end{tabular}
\end{center}



Not more.

}
\end{document}
#+END_LaTeX
--8<---------------cut here---------------end--------------->8---

Here, the above results is perfectly translated into LaTeX. But trying to
export this buffer raises the =Args out of range: 0, 0= error.

The solution is to tangle it, and launch pdflatex on the tangled file.

Questions:

- Is the above overview right, or am I *still* missing things?

- Couldn't =C-c C-v C-e= tangle to files, when the =tangle= parameter is
  present?  FYI, I've lost some amount of time (won't tell you how much, I'm
  ashamed) thinking that the tangling process did not work anymore on my
  machine, because I was expecting it on =C-c C-v C-e=. At my discharge, I
  only used tangling once, a couple of months ago, but...

  ... and I think I already had once that request in mind, maybe even asked on
  the list.

Idealistic goal that I have in mind (so that I share upfront which directions
I would enjoy to be able to follow):

- be able to produce =isodoc= letter in PDF just by =C-c C-v C-e=

- next step: be able to produce /mail merge/ ("publiposting"), having in Org
  the list of recipients and the letter's contents -- both in one unique Org
  file --, and producing all the letters at once (in one PDF), just by =C-c
  C-v C-e=...

Thanks for your help (past, present... and future)!

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-20 22:10       ` Sébastien Vauban
@ 2010-09-21 16:19         ` Eric Schulte
  2010-09-21 20:54           ` Sébastien Vauban
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2010-09-21 16:19 UTC (permalink / raw)
  To: Sébastien Vauban; +Cc: emacs-orgmode

Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:

> Hi Eric and all the others,
>
> "Eric Schulte" wrote:
>> Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
>>> "Eric Schulte" wrote:
>>>>> The error occurs with such a simple document:
>>>>>
>>>>> #+TITLE:     Org-isodoc
>>>>> #+LANGUAGE:  en_US
>>>>>
>>>>> * Context
>>>>>
>>>>> This is a letter sample.
>>>>>
>>>>> * Subject
>>>>> #+srcname: subject
>>>>> #+begin_src org :results latex
>>>>> Composing letters using Org mode and the LaTeX isodoc class
>>>>> #+end_src
>>>>
>>>> This is a tricky problem indeed. [...] This fix will probably take some
>>>> time to implement, and until then I don't think it will be possible to
>>>> evaluate org-mode blocks during export.
>>
>> Noweb expansion is still possible, however explicitly performing the export
>> is not.
>>
>>> What could be a workaround?
>>
>> Simply change =:results latex= to =:results org= and the code block body
>> will be harmlessly expanded and deposited in the org buffer on export, then
>> carried along with the rest of the file for export.
>>
>> * Subject
>> #+source: me
>> #+begin_src org
>>   I am *eric*.
>> #+end_src
>>
>> #+srcname: subject
>> #+begin_src org :results org replace :noweb yes
>> Composing letters using *Org mode* and the LaTeX isodoc class
>>
>> <<me>>
>> #+end_src
>
> Question: =:results org replace= (instead of =:results org=) is necessary if
> we wanna see the results expanded in the Org buffer, on key =C-c C-v C-e=.
> Why?
>

by default org mode blocks do not insert their results, this was due to
their initial use to wrap results of code blocks.  This can be changed
in your personal configuration by customizing the value of the
`org-babel-default-header-args:org' variable.

>
> Trying to build on the route you mention, I come up with different
> solutions, such as:
>
> #+TITLE:     Org-isodoc
> #+AUTHOR:    Seb Vauban
> #+DATE:      2010-09-20
>
> * COMMENT Parameters
>
> #+source: contents
> #+begin_src org
> My body includes a list:
>
> - one
> - two
>
> and a small table:
>
> | first | second |
> | other | last   |
>
> Not more.
> #+end_src
>
> #+srcname: letter
> #+begin_src org :results org replace :noweb yes
> Composing letters using *Org mode* and the LaTeX isodoc class
>
> <<contents>>
> #+end_src
>
> * Results
>
> #+LaTeX: \documentclass[11pt]{isodoc}
> #+LaTeX: \usepackage[utf8x]{inputenc}
> #+LaTeX: \usepackage[T1]{fontenc}
>
> #+LaTeX: \setupdocument{
> #+LaTeX:     to = {Eric},
> #+LaTeX:     subject = {Tough to understand what to do...},
> #+LaTeX:     opening = {Hi},
> #+LaTeX:     closing = {Best}
> #+LaTeX: }
>
> #+LaTeX: \begin{document}
> #+LaTeX: {}\letter{%
>
> #+results: letter
> #+BEGIN_SRC org
> Composing letters using *Org mode* and the LaTeX isodoc class
>
> My body includes a list:
>
> - one
> - two
>
> and a small table:
>
> | first | second |
> | other | last   |
>
> Not more.
> #+END_SRC
>
> #+LaTeX: }
> #+LaTeX: \end{document}
>
> Asking for Org results, as you mentioned, made me dream about a direct export
> to PDF on =C-c C-v C-e=. However, when the Org results block =letter= is
> surrounded by LaTeX code, items and tables aren't translated anymore to their
> LaTeX counterparts.
>

true, your outer-most block would have to be an org-mode block, which
could include LaTeX sections if they were already surrounded in
begin/end_latex blocks.

>
> OK, even if it doe, I still have a couple of problems to resolve:
>
> - How to avoid generating the title of the exported headline (=* Results=)?
> - How to impose my =documentclass isodoc= instead of =article=?
>
> and maybe more.
>

Yes, it may not be possible to export directly to a latex letter using
Org-mode's build latex exporter.  I think the tangling solution you
mention below may be preferable.

>
> Then, if I understand correctly, the only fallback is the tangling
> solution:
>

agreed.

>
> * Letter
>   :PROPERTIES:
>   :ID:       02360e5c-8f76-4e6d-a98f-b8c5fa2a3da4
>   :END:
>
> #+source: body
> #+begin_src org :results latex
> My body includes a list:
>
> - one
> - two
>
> and a small table:
>
> | first | second |
> | other | last   |
>
> Not more.
> #+end_src
>
> #+begin_src latex :noweb yes :tangle yes
> \documentclass[11pt]{isodoc}
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
>
> \setupdocument{
>     to = {Eric},
>     subject = {Tough to understand what to do...},
>     opening = {Hi},
>     closing = {Best}
> }
>
> \begin{document}
> \letter{%
> <<body()>>
> }
> \end{document}
> #+end_src
>
> #+results:
> #+BEGIN_LaTeX
> \documentclass[11pt]{isodoc}
> \usepackage[utf8x]{inputenc}
> \usepackage[T1]{fontenc}
>
> \setupdocument{
>     to = {Eric},
>     subject = {Tough to understand what to do...},
>     opening = {Hi},
>     closing = {Best}
> }
>
> \begin{document}
> \letter{%
> My body includes a list:
>
> \begin{itemize}
> \item one
> \item two
> \end{itemize}
>
> and a small table:
>
>
> \begin{center}
> \begin{tabular}{ll}
>  first  &  second  \\
>  other  &  last    \\
> \end{tabular}
> \end{center}
>
>
>
> Not more.
>
> }
> \end{document}
> #+END_LaTeX
>
> Here, the above results is perfectly translated into LaTeX. But trying to
> export this buffer raises the =Args out of range: 0, 0= error.
>

This is the same error we discovered earlier, namely trying to export
the body of an Org-mode block to latex in the middle of a latex export.
I've pushed up a more useful error message.

>
> The solution is to tangle it, and launch pdflatex on the tangled file.
>

agreed.  BTW: I've just pushed up a code block to the library of babel
which makes it possible to include headlines into noweb exports.  I
imagine this would be very useful when composing letters in this manner.
See the email where I initially mention this
http://thread.gmane.org/gmane.emacs.orgmode/29926/focus=30667

>
> Questions:
>
> - Is the above overview right, or am I *still* missing things?
>



>
> - Couldn't =C-c C-v C-e= tangle to files, when the =tangle= parameter is
>   present?  FYI, I've lost some amount of time (won't tell you how much, I'm
>   ashamed) thinking that the tangling process did not work anymore on my
>   machine, because I was expecting it on =C-c C-v C-e=. At my discharge, I
>   only used tangling once, a couple of months ago, but...
>
>   ... and I think I already had once that request in mind, maybe even asked on
>   the list.
>

=C-c C-v C-e= is already used for executing code blocks, unfortunately
key-bindings are at a premium, so I don't think it is worth re-binding
this -- although I do see how you could be confused

>
> Idealistic goal that I have in mind (so that I share upfront which directions
> I would enjoy to be able to follow):
>
> - be able to produce =isodoc= letter in PDF just by =C-c C-v C-e=
>

by =C-c C-v C-e= do you mean tangle or execute?

>
> - next step: be able to produce /mail merge/ ("publiposting"), having in Org
>   the list of recipients and the letter's contents -- both in one unique Org
>   file --, and producing all the letters at once (in one PDF), just by =C-c
>   C-v C-e=...
>

this shouldn't be impossible with the current setup, maybe use sbe to
call a code block on every row of a table with the table holding the
recipients.  Certainly wouldn't be trivial though.

Best -- Eric

>
> Thanks for your help (past, present... and future)!
>
> Best regards,
>   Seb

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

* Re: [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0)
  2010-09-21 16:19         ` Eric Schulte
@ 2010-09-21 20:54           ` Sébastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sébastien Vauban @ 2010-09-21 20:54 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Eric,

"Eric Schulte" wrote:
> Sébastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>> "Eric Schulte" wrote:
>>> [...]
>>> #+srcname: subject
>>> #+begin_src org :results org replace :noweb yes
>>> Composing letters using *Org mode* and the LaTeX isodoc class
>>>
>>> <<me>>
>>> #+end_src
>>
>> Question: =:results org replace= (instead of =:results org=) is necessary
>> if we wanna see the results expanded in the Org buffer, on key =C-c C-v
>> C-e=. Why?
>
> by default org mode blocks do not insert their results, this was due to
> their initial use to wrap results of code blocks. This can be changed in
> your personal configuration by customizing the value of the
> `org-babel-default-header-args:org' variable.

OK. Clear.


>> Asking for Org results, as you mentioned, made me dream about a direct
>> export to PDF on =C-c C-v C-e=. However, when the Org results block
>> =letter= is surrounded by LaTeX code, items and tables aren't translated
>> anymore to their LaTeX counterparts.
>
> true, your outer-most block would have to be an org-mode block, which could
> include LaTeX sections if they were already surrounded in begin/end_latex
> blocks.

Never thought about having blocks *inside* blocks...

Tried things such as the following:

--8<---------------cut here---------------start------------->8---
#+OPTIONS:   H:3 num:nil toc:nil
#+LaTeX_CLASS: isodoc

#+LaTeX_HEADER: \setupdocument{
#+LaTeX_HEADER:     to = {%
#+LaTeX_HEADER:           Org mode user group \\
#+LaTeX_HEADER:           World Wide Web
#+LaTeX_HEADER:           },
#+LaTeX_HEADER:     subject = {Composing letters using Org mode and the \LaTeX{} isodoc class},
#+LaTeX_HEADER:     opening = {Dear Org mode users},
#+LaTeX_HEADER:     closing = {Yours Truly}
#+LaTeX_HEADER: }

#+source: contents
#+begin_src org :results silent :exports none
My body includes a list:

- one
- two

and a small table:

| here  | second |
| other | last   |

Not more.
#+end_src

#+BEGIN_SRC org

#+BEGIN_LaTeX
\letter{%
#+END_LaTeX

#+srcname: letter
#+begin_src org :results raw :noweb yes
Composing letters using *Org mode* and the LaTeX isodoc class

<<contents>>
#+end_src

#+BEGIN_LaTeX
}
#+END_LaTeX

#+END_SRC
--8<---------------cut here---------------end--------------->8---

> It may not be possible to export directly to a latex letter using Org-mode's
> build latex exporter. I think the tangling solution you mention below may be
> preferable.

I'm approaching, but am not still where I need to be: the =#+END_SRC= does not
seem to be correctly nested... The inner one gets related to the outer
=#+BEGIN_SRC=.


>> Then, if I understand correctly, the only fallback is the tangling
>> solution:
>
> agreed.
>
>> Here, the above results is perfectly translated into LaTeX. But trying to
>> export this buffer raises the =Args out of range: 0, 0= error.
>
> This is the same error we discovered earlier, namely trying to export the
> body of an Org-mode block to latex in the middle of a latex export. I've
> pushed up a more useful error message.

Yes. I was re-injecting previous results, to make the overview complete.


>> The solution is to tangle it, and launch pdflatex on the tangled file.
>
> agreed. BTW: I've just pushed up a code block to the library of babel which
> makes it possible to include headlines into noweb exports. I imagine this
> would be very useful when composing letters in this manner. See the email
> where I initially mention this
> http://thread.gmane.org/gmane.emacs.orgmode/29926/focus=30667

Thanks.


>> - Couldn't =C-c C-v C-e= tangle to files, when the =tangle= parameter is
>>   present?  FYI, I've lost some amount of time (won't tell you how much, I'm
>>   ashamed) thinking that the tangling process did not work anymore on my
>>   machine, because I was expecting it on =C-c C-v C-e=. At my discharge, I
>>   only used tangling once, a couple of months ago, but...
>>
>>   ... and I think I already had once that request in mind, maybe even asked
>>   on the list.
>
> =C-c C-v C-e= is already used for executing code blocks, unfortunately
> key-bindings are at a premium, so I don't think it is worth re-binding this
> -- although I do see how you could be confused

I meant: for me, when there is a tangle directive, executing the code block
*is* tangling. Or, at least, tangling should be done at the same time as the
execution.

Maybe, you want to explicitly separate both functions, though.


>> Idealistic goal that I have in mind (so that I share upfront which
>> directions I would enjoy to be able to follow):
>>
>> - be able to produce =isodoc= letter in PDF just by =C-c C-v C-e=
>
> by =C-c C-v C-e= do you mean tangle or execute?

I meant, thus, when executing (here, producing the letter).


>> - next step: be able to produce /mail merge/ ("publiposting"), having in
>>   Org the list of recipients and the letter's contents -- both in one
>>   unique Org file --, and producing all the letters at once (in one PDF),
>>   just by =C-c C-v C-e=...
>
> this shouldn't be impossible with the current setup, maybe use sbe to call a
> code block on every row of a table with the table holding the recipients.
> Certainly wouldn't be trivial though.

I'll try to understand all of this in my next work session...

Thanks for all help provided so far...

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2010-09-21 20:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-13 11:33 [Babel] Can't export to LaTeX anymore (args-out-of-range 0 0) Sébastien Vauban
2010-09-17 14:08 ` Eric Schulte
2010-09-17 15:18   ` Sébastien Vauban
2010-09-17 16:55     ` Eric Schulte
2010-09-20 22:10       ` Sébastien Vauban
2010-09-21 16:19         ` Eric Schulte
2010-09-21 20:54           ` Sébastien Vauban

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).