[ESS] ESS/iESS SAS problems...

Erik Iverson eriki at ccbr.umn.edu
Mon Nov 15 20:17:02 CET 2010


> For ESS(SAS) mode (batch processing), I have
> (ess-sas-global-unix-keys) in my .emacs.  When I submit my sas
> program, emacs switches to the *shell* and stays there.  

That happens to me for the first time in an Emacs session, too.
I simply switch back to the .sas file and use the function keys
from there. This won't happen on subsequent batch submits.

I have the following in my .emacs:

(setq ess-sas-local-unix-keys t)

which differs from how you're setting it, and I have
no idea if that relates to your issues or not. (I also use
local and not global keys)

> The sas
> program runs, and the output is in the log file, but I'm stuck in
> *shell* and the function key settings don't work there.  

Go back to the SAS file by switching the buffer.
What does C-h k F5 RET say that F5 is bound to?

In a SAS file, If I do the above command, I see:

<f5> runs the command ess-sas-goto-log, which is an interactive Lisp
function in `ess-sas-a.el'.

It is bound to <f5>.

(ess-sas-goto-log &optional ESS-TMP-NO-ERROR-CHECK)

Switch to the .log file, revert from disk and search for error messages.

> I can open
> the log, but it opens as a text file, and I have to M-x sas-log-mode.
> Even then, I still can't switch between the code and the log.

I don't know what "opens as a text file means", but I assume you
just mean the Emacs mode is not ESS[SAS] mode.  That's because
.log is a common extension, and to 'take over' the .log extension
would be presumptuous.  If you want your .log files syntax
highlighted etc, do something like the following:

(setq auto-mode-alist
        '(("\\.log\\'"	. SAS-log-mode)
	 ("\\.lst\\'"	. SAS-listing-mode))

> I have ess-sas-submit-command, ess-sas-submit-post-command and
> ess-sas-submit-pre-command variables set to non-defaults for my
> particular version of sas.  I also hand edited
> ess/etc/ess-sas-sh-command (but that should only affect interactive
> ESS(SAS)?).  I'm running emacs 21.3.2 with ess 5.12 on a redhat with
> kernel 2.6.9-89.0.3.ELhugemem.

Well, that's a *really* old version of emacs, and could very well
be contributing to the issues at hand.  Emacs 23.2 is the latest
stable as far as I know.

More information about the ESS-help mailing list