[ESS] Execute (ess-eval-buffer) when running emacs -batch

Rodney Sparapani rsparapa at mcw.edu
Fri Apr 13 15:49:27 CEST 2012


Bernd Weiss wrote:
> Dear all,
> 
> Given the following R file:
> 
> ---- test.R ------------
> pdf("testplot.pdf")
> hist(rnorm(100))
> dev.off()
> ---- test.R ------------
> 
> I now want to call emacs + ESS from command line like this (I know that
> this does not make any sense at all, see "Background" below for more
> information):
> 
> emacs -batch -l e:/config/.emacs --visit test.R --eval="(progn (require
> 'ess) (R) (ess-eval-buffer))"
> 
> 
> When I execute this command, it stops with
> 
> ---- cl output ----------
> weiss at weiss-notebook /cygdrive/e/projects/software/ps2012r_intro/test
> $ emacs -batch -l e:/config/.emacs --visit test.R --eval="(progn
> (require 'ess) (R) (ess-eval-buffer))"
> 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)...
> Loading vc-git...
> Type C-h m for help on ESS version 12.04
> ---- cl output ----------

Hi Bernd:

Hmm...  I get...

emacs -batch -l /opt/local/share/emacs/site-lisp/default.el --visit 
test.R --eval="(progn (require 'ess) (R) (ess-eval-buffer))"
Loading tramp...
Loading /home/rsparapa/.recentf...
Cleaning up the recentf list...
Cleaning up the recentf list...done (0 removed)
Type C-h m for help on ESS version 12.04
`ess-tracebug-prefix' is not defined, tracebug bindings are not active ...
ess-tracebug mode enabled
Wrong number of arguments: #[(vis) "ÁeÂ$‡" [vis ess-eval-region "Eval 
buffer"] 5 ("/opt/local/share/emacs/site-lisp/ess/ess-inf.elc" . 30810) 
"P"], 0

Perhaps it is an ESS bug; but that is not really clear to me.

Rodney



More information about the ESS-help mailing list