[ESS] some recent bugs/annoyances
Vitalie Spinu
spinuvit at gmail.com
Mon Nov 12 16:57:54 CET 2012
>> gerald.jean at dgag.ca
>> on Mon, 12 Nov 2012 10:16:26 -0500 wrote:
gj> Hello,
gj> another annoyance, for me anyway, is when I am in a "*.q" buffer, that I
gj> used to run Splus code, if I have no sessions opened, neither R, nor S+,
gj> ..., if I don't remember no Splus session is opened and submit some code
gj> from that buffer, ESS just starts a new R session WITHOUT asking or
gj> anything???
I was also surprised to see this in the code. What shall we call by
default then? I am not using S+ at all so have no clue. What is the
universal emacs function to start it?
Can you please check if this version works for you. If so I will commit.
(defun ess-start-process-specific (language dialect)
"Start an ESS process typically from a language-specific buffer, using
LANGUAGE (and DIALECT)."
(unless dialect
(error "The value of `dialect' is nil"))
(save-current-buffer
(let ((dsymb (intern dialect)))
(ess-write-to-dribble-buffer
(format " ..start-process-specific: lang:dialect= %s:%s, current-buf=%s\n"
language dialect (current-buffer)))
(cond ((string= dialect "R") (R))
;; ((string= language "S") ;VS[03-09-2012]: cannot start s+?
;; (message "ESS process not running, trying to start R, since language = 'S")
;; (R))
((string= dialect "Stata") (stata))
;;general case
((fboundp dsymb)
(funcall dsymb))
(t ;; else: ess-language is not S
;; Typically triggered from
;; ess-force-buffer-current("Process to load into: ")
;; \--> ess-request-a-process("Process to load into: " no-switch)
(error "No ESS processes running; not yet implemented to start (%s,%s)"
language dialect)))
;; save excursion is not working here !!! bad bad bad !!
)))
It basically relies on the value of ess-dialect and calls the function
indicated by the dialect if such exists. Topically it is "S+6".
Vitalie
More information about the ESS-help
mailing list