[R] Configuring ESS for SAS on Win NT & Win 2000
Brett Presnell
presnell at stat.ufl.edu
Mon Jul 8 00:22:33 CEST 2002
I should start by confessing possible ignorance about using SAS
interactively. I don't use SAS interactively, and the last time I did
use the SAS interface, I wouldn't have said that it was interactive in
any meaningful sense of the word anyway, just an editor and windows to
look at the log and out files and so forth. Maybe that has changed
without my knowledge.
Anyway, the way I work with SAS under UNIX is to edit the code using
ESS and then execute it using dired's dired-do-shell-command, which
just require positioning the cursor over the .sas file in the dired
listing and typing an exclamation point (!) and return. Then I move
down to the log and out files to see what I got (just type "f" to open
a file in an emacs buffer). It doesn't take much to get pretty fast
with this and it works very well for me (my students are always
impressed).
To make this work, you need something like the following in your
.emacs file:
(setq dired-guess-shell-alist-user
(list (list "\\.sas$" "sas")))
Actually, my dired-guess-shell-alist-user is much longer than this,
because I use dired all the time and I like to be able to type ! to
"open" pdf files and whatnot. Dired is actually a pretty good "file
manager" and like most things emacs, the more you use it the more you
learn to do with it. Lots of people on this list probably know more
about this than I do, but FWIW I've appended below what I actually
have in my .emacs for dired mode.
--
Brett Presnell
Department of Statistics
University of Florida
http://www.stat.ufl.edu/~presnell/
;;
;; Uncomment this if you have problems due to Solaris's grep:
;;
;(setq find-grep-options "-l")
;;
;; dired-x mode provides some nice extensions to dired.
;;
(add-hook 'dired-load-hook
(function (lambda ()
(load "dired-x")
;; Set dired-x global variables here. For example:
;; (setq dired-guess-shell-gnutar "gtar")
;; (setq dired-x-hands-off-my-keys nil)
)))
;;
;; A quick way to mark TeX .dvi, .log, .aux, .bbl, and .blg files for
;; deletion by mapping dired-clean-tex to the "t" key.
;;
(add-hook 'dired-load-hook
'(lambda nil
(define-key dired-mode-map [menu-bar mark dvi-and-friends]
'("Flag .dvi and related files for deletion" .
dired-clean-tex))
(define-key dired-mode-map "t" 'dired-clean-tex)
))
(add-hook 'dired-mode-hook
'(lambda nil
(setq dired-tex-unclean-extensions
(cons ".dvi" dired-tex-unclean-extensions))
))
;;
;; Make emacs/dired offer gv as the default shell command for
;; PostScript files, sas for sas files, and so forth:
;;
(setq dired-guess-shell-alist-user
(list (list "\\.ps$" "gv * &")
(list "\\.ps.g?z$" "gv * &")
(list "\\.ps.Z$" "gv * &")
(list "\\.eps$" "gv * &")
(list "\\.eps.g?z$" "gv * &")
(list "\\.eps.Z$" "gv * &")
(list "\\.pdf$" "acroread * &")
(list "\\.jpg$" "xv * &")
(list "\\.jpeg$" "xv * &")
(list "\\.gif$" "xv * &")
(list "\\.dvi$" "xdvi * &")
(list "\\.sas$" "sas")))
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
ess-help mailing list -- To (un)subscribe, send
subscribe or unsubscribe
(in the "body", not the subject !) To: ess-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the ESS-help
mailing list