[ESS] ess, SAS, and MS Windows 7
Paul Johnson
pauljohn32 at gmail.com
Fri Mar 19 06:39:09 CET 2010
<Apology>
I'm not a Windows guy. I keep telling everybody that. But I keep
getting drafted to setup Windows systems. So I have to show up here
asking about how to use Emacs in Windows. Which is sorta like wearing
a "kick-me" sign on the playground.
But, in the end, I like setting up Windows because I install all the
free programs I like! If you try hard enough, you can make MS Windows
look quite a bit like the Gnome desktop :)
Anyway, I've got a bunch of Win 7 systems and they have 64bit SAS-9.2.
Seems to run OK.
Also, we have R, and just for fun I wrote a script that downloads and
installs every single package on CRAN. It only uses about 2.5 GB of
disk space (as of 2010-03-12).
I've also installed Prof Goulet's Emacs for Windows, and that's fun too.
</Apology>
I'm trying to make Emacs work with SAS in Windows. I really did read
the manual, even though I still seem not to know anything. I see that
ESS interactive does not work in Windows. But, the SAS batch mode
does work, and there is a hint that a "one way" interactive mode may
work as well.
About the batch mode.
The Batch mode is a bit tricky. I put in several elements in the ESS
site-start file. I cribbed these out of the ESS-SAS part of the info
output.
(setq ess-sas-edit-keys-toggle nil)
;Windows example
(setq-default ess-sas-submit-command "c:/Program
Files/SAS/SASFoundation/9.2/sas.exe")
;;2; (setq ess-sas-local-unix-keys t)
;;(setq ess-sas-local-pc-keys t)
;;4; (setq ess-sas-global-unix-keys t)
(setq ess-sas-global-pc-keys t)
I wrote some sas commands, hit F8, and, to my astonishment, the sas
startup splash appeared, the program ran, and Emacs left me in a
shell. It appears to be a MS Command Shell, it answers to "dir" and
such.
What am I supposed to do in that shell? Anybody? Aside from creating
an irritating "open sessions" warning when you try to close EMACS, I
can't see any purpose in it.
The FN keys are supposed to work universally, but they don't work to
transport me to the other SAS files. They work while I'm in ESS-SAS
mode in the buffer "myfile.SAS". F8 sends the job to SAS batch. But
after, F6 should take me to the SAS log file, F7 to the lst file, but
when I hit those keys, the Emacs status says <F6> not defined.
It may be I'm "punch drunk" now and it will all seem clear to me in
the morning. But I doubt it. Do I configure Emacs so that files with
suffixes log and lst are open in ESS-SAS mode files?
Now, about the one-way interactive mode, pushing commands from Emacs to SAS.
In section 10.9 of ESS info "ESS(SAS) Windows" it says:
" Or you can mark regions with the mouse and submit the code with
`submit-region' or paste them into SAS Display Manager.
I can paste :) But the part before the "or" aboutthe 'submit-region'
thing has me stumped. How does the code get from Emacs into the SAS
session?
--
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas
More information about the ESS-help
mailing list