[ESS] ESS and Stata problem

Eshien Chong ceshien at gmail.com
Wed Nov 19 14:59:13 CET 2014

Dear list members,

I’m new to Emacs and I’m trying to use R and Stata through ESS. I’ve added (require ‘ess-site) in my .emacs file, set the environmental path leading to Stata 11 in .bashrc (I’m using Mac OS Mavericks). I’m able to start Stata both in Emacs (in *shell*) and from in the command line,  but when I try to send my Stata codes in a do file using C-c C-c, Stata’s GUI launches, but the codes are not received by Stata. The buffer hangs unless I do a C-g. I do not get any errors in the *Messages* buffer, and I get the following message in *ESS* buffer:

Finished setting up ESS-mode.
ess-request-a-process: {beginning}
 ... request-a-process:
  major mode ess-mode; current buff: test3.do; ess-language: STA, ess-dialect: stata
 ..start-process-specific: lang:dialect= STA:stata, current-buf=test3.do
(STA): ess-dialect=stata , buf=test3.do 
(inf-ess 1): lang=STA, dialect=stata, tmp-dialect=stata, buf=test3.do
(inf-ess 1.1): procname=stata temp-dialect=stata, buf-name=*stata* 
(inf-ess 2.0) Method #3 start=/Users/eshienchong/Documents/Projets/ buf=*stata*
(ess-setq-vars-LOCAL): language=STA, dialect=stata, buf=nil, comint..echoes=nil, comint..sender=comint-simple-send
(inf-ess 2.1): ess-language=STA, ess-dialect=stata buf=*stata* 
(ess-setq-vars-LOCAL): language=STA, dialect=stata, buf=nil, comint..echoes=nil, comint..sender=inferior-ess-input-sender
(i-ess 1): buf=*stata*, lang=STA, comint..echo=t, comint..sender=inferior-ess-input-sender,
(i-ess end): buf=*stata*, lang=STA, comint..echo=t, comint..sender=inferior-ess-input-sender,
(inf-ess 3.0): prog=stata, start-args=, echoes=t
Making Process...Buf *stata*, :Proc stata, :Prog stata
Start File=nil
(inferior-ess: waiting for process to start (before hook)

Evaluating the code using debug-on-quit yields the following backtrace:

Debugger entered--Lisp error: (quit)
  accept-process-output(#<process stata> 0.5)
  ess-wait-for-process(#<process stata> nil 0.01)
  ess-start-process-specific("STA" "stata")
  ess-request-a-process("Process to use: " no-switch nil)
  ess-force-buffer-current("Process to use: ")
  ess-eval-region(1 39 nil)
  call-interactively(ess-eval-region-or-function-or-paragraph-and-step nil nil)

I tried the solution suggested here: http://permalink.gmane.org/gmane.emacs.ess.general/6051 and http://article.gmane.org/gmane.emacs.ess.general/6065, but I ran into the same issue. I’ve also tried changing the prompt defined in ess-sta-d.el, but to no avail.

I would appreciate any suggestions and help on this issue. For info, I’m running Emacs for Mac OS X (http://emacsformacosx.com/) and ESS 14.11. I would really like ESS to work for Stata since I plan on using org babel.



	[[alternative HTML version deleted]]

More information about the ESS-help mailing list