[ESS] ess, SAS, and MS Windows 7

Paul Johnson pauljohn32 at gmail.com
Fri Mar 19 23:54:01 CET 2010

> It looks like you stopped reading before the most important part:

You guys use so many big words :)

>          ;;2; (setq ess-sas-local-unix-keys t)
>          ;;3; (setq ess-sas-local-pc-keys t)
>          ;;4; (setq ess-sas-global-unix-keys t)
>          ;;5; (setq ess-sas-global-pc-keys t)
>     The names `-unix-' and `-pc-' have nothing to do with the
>     operating system that you are running.  Rather, they mimic the
>     definitions that the SAS Display Manager uses by default on those
>     platforms.
>  b. If your site installation has configured the keys contrary to your
>     liking, then you must call the appropriate function.
>           (load "ess-site") ;; local-unix-keys
>           (ess-sas-global-pc-keys)

OK, that's the magic.  Works for me.

Is there a way to document this so that people who don't understand
Emacs could understand what they need to do?  Basically, after I
selected a key stroke preference, I just had to tack on the last line

Here's the ess-sas.el file, which lives in that site-start.d now:

(setq ess-sas-edit-keys-toggle nil)
;Windows example
(setq-default ess-sas-submit-command "c:/Program

  ;;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)
;;; Next required to activate preceding selection


So that part's good. F8 sends things to SAS batch, F7 F6 F5 cycle
through the files.  Awesome!

>> 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.
> So you want, C-F3 for submit region.

OK, well, I'm still missing something.  how does Emacs/ESS find the
running SAS instance?  I don't start SAS from inside ESS, do I?

When I try C-F8 (pc style keys, remember) to send over a region, I see

SAS Message Log

ERROR: Unrecognised SAS option name
ERROR: Unable to initialize the SAS kernel

Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas

More information about the ESS-help mailing list