Dear all, I am not sure if this an orgmode-, an ESS- or an Emacs-related question.
I am working on an orgmode-file with embedded R code. Since I am using a build tool called waf, I would like to call Emacs from command line like this: emacs --batch --load "e:/config/.emacs" --visit test.org --funcall org-export-as-pdf (or call org-babel-tangle) However, it stops with "Type C-h m for help on ESS version 12.03". If I remove the R part (#+begin_src etc.), everything works as expected. This is my (hopefully) minimal example, the command line output and the orgmode related infos. Thanks, Bernd -------------------minimal example: test.org--------------------------- # Babel settings #+PROPERTY: session *R* #+PROPERTY: tangle test.R #+PROPERTY: comments yes #+PROPERTY: results output #+PROPERTY: exports both #+BEAMER_FRAME_LEVEL: 1 #+startup: beamer #+LaTeX_CLASS: beamer #+LaTeX_CLASS_OPTIONS: [bigger] #+latex_header: %%\mode<beamer>{\usetheme{Madrid}} * test heading lsals #+begin_src R 1+1 #+end_src -------------------minimal example: text.org--------------------------- -------------------cl-output------------------------------------------ wmx336@fi-weiss-50 /cygdrive/e/projects/software/ps2012r_intro/test $ emacs --batch --load "e:/config/.emacs" --visit test.org --funcall org-export-as-pdf customizing GNU Emacs customizing GNU Emacs for Win 7 Loading e:/config/.recentf... Cleaning up the recentf list... Cleaning up the recentf list...done (0 removed) Loading tex-mik... Ido mode enabled Source file `d:/programme/emacs/site-lisp/org-mode/contrib/lisp/org-contacts.el' newer than byte-compiled file Ido mode enabled Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-example.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-example.elc... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-library.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-library.elc... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-tango.el (source)... Loading d:/programme/emacs/site-lisp/color-theme/themes/color-theme-tango.elc... [yas] warning: keybinding "(rinari-minor-mode-map . C-c C-c C-r)" invalid for snippet "#+begin_src R...#+end_" since keymap "rinari-minor-mode-map" does not (yet?) exist. [yas] warning: keybinding "(rinari-minor-mode-map . C-c C-c C-b)" invalid for snippet "beamer_envargs" since keymap "rinari-minor-mode-map" does not (yet?) exist. Loading d:/programme/emacs/site-lisp/graphviz-dot-mode.el (source)... OVERVIEW Local Ispell dictionary set to nil Starting new Ispell process [default] ... File mode specification error: (error "d:\\programme\\Aspell\\bin\\aspell.exe did not output version line") Loading vc-git... Exporting to PDF... Exporting to LaTeX... Local Ispell dictionary set to nil Automatic display of crossref information was turned on Applying style hooks... Applying style hooks... done Local Ispell dictionary set to nil Local Ispell dictionary set to nil executing R code block... Type C-h m for help on ESS version 12.03 -------------------cl-output------------------------------------------ -------------------org-related-infos----------------------------------- Emacs : GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-03-10 on 3249CTO Package: Org-mode version 7.8.06 (release_7.8.06.180.g22bfd) current state: ============== (setq org-export-preprocess-before-backend-specifics-hook '(org-inlinetask-export-handler) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-export-latex-listings t org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '(("c" "conferences" ((tags "CONFERENCE")) ((org-tags-match-list-sublevels nil)) ((org-columns-default-format "%DATE %LOCATION"))) ("d" "Upcoming deadlines" agenda "" ((org-agenda-time-grid nil) (org-deadline-warning-days 365) (org-agenda-entry-types (quote (:deadline))))) ("W" "Weekly Review" ((agenda "" ((org-agenda-ndays 14))) (todo "WRITING")))) org-agenda-files '("e:/projects/habilitation/org/prHabilitation.org" "e:/projects/org/agendas/2011fall.org" "e:/projects/org/agendas/2011springterm.org" "e:/projects/org/agendas/SynRG.org" "e:/projects/org/agendas/capture.org" "e:/projects/org/agendas/d_2011a.org" "e:/projects/org/agendas/prDAAD-ipd-ma-divorce.org" "e:/projects/org/agendas/prDAAD-ma-simulation.org" "e:/projects/org/agendas/privat.org" "e:/projects/org/agendas/pu2012bbbook_basic_meta-analysis.org" "e:/projects/org/agendas/te2012sose.org" "e:/projects/org/agendas/te2012spring.org" "e:/projects/org/agendas/work.org") org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-src-fontify-natively t org-babel-load-languages '((emacs-lisp . t) (maxima . t) (R . t) (python . t) (latex . t) (dot . t) (sh . t)) org-ctrl-k-protect-subtree t org-completion-use-ido t org-metaup-hook '(org-babel-load-in-session-maybe) org-after-todo-state-change-hook '(org-clock-out-if-current) org-babel-tangle-lang-exts '(("python" . "py") ("maxima" . "max") ("emacs-lisp" . "el")) org-edit-src-content-indentation 0 org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-tab-first-hook '(yas/org-very-safe-expand org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-confirm-shell-link-function 'yes-or-no-p org-export-first-hook '(org-beamer-initialize-open-trackers) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-export-latex-packages-alist '(("" "color") ("" "listings")) org-default-notes-file "e:/projects/org/agendas/capture.org" org-directory "e:/projects/org/" org-babel-pre-tangle-hook '(save-buffer) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-mode-hook '((lambda nil (make-variable-buffer-local (quote yas/trigger-key)) (setq yas/trigger-key [tab]) (add-to-list (quote org-tab-first-hook) (quote yas/org-very-safe-expand)) (define-key yas/keymap [tab] (quote yas/next-field))) turn-on-org-cdlatex turn-on-auto-fill turn-on-font-lock #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes turn-on-visual-line-mode) org-font-lock-hook '(org-inlinetask-fontify) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-confirm-elisp-link-function 'yes-or-no-p org-export-interblocks '((src org-babel-exp-non-block-elements)) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) org-enforce-todo-dependencies t org-occur-hook '(org-first-headline-recenter) org-from-is-user-regexp nil org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-confirm-babel-evaluate nil org-hierarchical-checkbox-statistics nil org-src-tab-acts-natively t org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-metadown-hook '(org-babel-pop-to-session-maybe) org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) ) -------------------org-related-infos-----------------------------------