User manual

Chapter 13: ESS for SAS 71
F5 (F6)
Now, refresh the .lst and go to it’s buffer.
F6 (F7)
If you wish to make changes, go to the .sas file with.
F4 (F5)
Make your editing changes and submit again.
F3 (F8)
13.5 ESS[SAS]–Function keys for batch processing
The setup of function keys for SAS batch processing is unavoidably complex, but the usage
of function keys is simple. There are five distinct options:
Option 1 (default). Function keys in ESS[SAS] are not bound to elisp commands. This is
in accordance with the GNU Elisp Coding Standards (GECS) which do not allow function
keys to be bound so that they are available to the user.
Options 2-5. Since GECS does not allow function keys to be bound by modes, these keys
are often unused. So, ESS[SAS] provides users with the option of binding elisp commands to
these keys. Users who are familiar with SAS will, most likely, want to duplicate the function
key capabilities of the SAS Display Manager. There are four options (noted in parentheses).
a. SAS Display Manager has different function key definitions for UNIX (2, 4) and Windows
(3, 5); ESS[SAS] can use either.
b. The ESS[SAS] function key definitions can be active in all buffers (global: 4, 5) or
limited (local: 2, 3) only to buffers with files that are associated with ESS[SAS] as
specified in your auto-mode-alist.
The distinction between local and global is subtle. If you want the ESS[SAS] definitions to
work when you are in the ‘*shell* buffer or when editing files other than the file extensions
that ESS[SAS] recognizes, you will most likely want to use the global definitions. If you want
your function keys to understand SAS batch commands when you are editing SAS files, and
to behave normally when editing other files, then you will choose the local definitions. The
option can be chosen by the person installing ESS for a site or by an individual.
a. For a site installation or an individual, place ONLY ONE of the following lines in
your initialization file prior to a require/load. ESS[SAS] function keys are available
in ESS[SAS] if you choose either 2 or 3 and in all modes if you choose 4 or 5:
;;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)