default option for submitting code to the same process without any questions?

Stephen Eglen stephen at
Tue Aug 5 12:47:53 CEST 2003

 > Hi,
 > When using R and Sweave, I normally have only one R process running.
 > Each time the cursor moves to a new chunk of code,
 > the first submission (e.g. C-c C-n) results in the question
 > 'Process to load into: R'
 > and I have to hit return before that first line is submitted.
 > Is there some way to avoid having to hit return
 > each time I move to a new code chunk?
 > i.e. once a process is selected 
 > (R in my case as I rarely code in anything else), 
 > I want ESS to resubmit to that process 
 > without repeatedly asking me the same question.
 > I am on R 1.7.1, ess 5.1.24, XEmacs 21.4 and XP.

hi John,

I *think* the following defun might help you; put it in your .emacs
after your code that loads up ESS.

Tony: did you send this to me, I can't recall whether someone else
sent this to me or not?  The new code is the "(if (cdr pair)" line.
Should I commit it to CVS?


;; Tue 26 Mar 2002.  Temporary addition so that ess-local-process-name 
;; is not reset to nil everytime I re-enter a code chunk.  This is useful
;; when in .Rnw buffers.
(defun ess-setq-vars-local (alist &optional buf)
  "Set language variables from ALIST, in buffer BUF, if desired."
  (if buf (set-buffer buf))
  (mapcar (lambda (pair)
	    (make-local-variable (car pair))
	    (if (cdr pair)
		(set (car pair) (eval (cdr pair)))))
   (format "(ess-setq-vars-LOCAL): language=%s, dialect=%s, buf=%s, comint..echoes=%s, comint..sender=%s\n"
           ess-language ess-dialect buf comint-process-echoes comint-input-sender)))

More information about the ESS-help mailing list