[ESS-bugs] ESS 5.3.7: Bug

Will will.eagle at gmx.net
Tue May 13 16:37:11 CEST 2008


Hi,

I'd like to point out a bug in the function <ess-sas-submit-region>.
The <ess-sas-submit-command-options> and the file extension ".sas" and 
necessary empty spaces " " have been missing here. This can cause errors 
in SAS if the "-sysin" option is placed in 
<ess-sas-submit-command-options>. Below is the corrected version. Apart 
from reformating 2 lines have been corrected (cf. comments ;;).

As I have reported this bug already in the last ESS version 5.3.6, and 
now in 5.3.7, I hope it will be included in version 5.3.8.

Best, Will

;; corrected function

(defun ess-sas-submit-region ()
     "Write region to temporary file, and submit to SAS."
     (interactive)
     (ess-sas-file-path)
     (write-region (region-beginning) (region-end)
	(concat (ess-sas-temp-root) ".sas"))

     (save-excursion
       (ess-sas-goto-shell t)

     (if (and (w32-shell-dos-semantics)
	(string-equal ":" (substring ess-sas-file-path 1 2)))
	(progn
		(insert (substring ess-sas-file-path 0 2))
		(comint-send-input)
     ))

     (insert "cd \"" (convert-standard-filename
	(file-name-directory ess-sas-file-path)) "\"")
     (comint-send-input)

     (insert (concat ess-sas-submit-pre-command " "
                     ess-sas-submit-command " "
                     ess-sas-submit-command-options " " ;; corrected l. 
1
                    (ess-sas-temp-root) ".sas" " " ;; corrected l. 2
		    ess-sas-submit-post-command)
	    )
     (comint-send-input)
     )
)



More information about the ESS-bugs mailing list