[ESS] 3 separate Emacs-ESS SAS problems

Paul Johnson pauljohn32 at gmail.com
Thu Nov 22 00:05:05 CET 2012

Hello, Rodney

I'm back to say I've isolated the 2 separate SAS problems.

1. As you explained, there's a difference between "local" and
"global". I don't know how to make local work (tried plenty...).  This
in init.el does not cause errors at start time

(load "ess-site")

But I can't find any example where the local variant works. It always
returns the keymap is nil, the error I mentioned before.

2. filename.sas -> *shell* mysteriously!

I just tested a Centos system where i built Emacs-24 and it DOES NOT
have this problem. But on Debian linux, using their stock emacs-23.4
with ess 12.09, this bad thing happens.

If I open a SAS file and hit F3, it tries to do what it is supposed
to, but the string "*shell*" is sent to the on the command line where
it should see the SAS filename. This is the output in Emacs *shell*

cd /tmp/flop.sas/
nohup nice sas *shell* -rsasuser &
[1]+  Exit 102                nohup nice sas *shell* -rsasuser
pauljohn at pjlap-124:flop.sas$ pauljohn at pjlap-124:flop.sas$ [1] 6472
pauljohn at pjlap-124:flop.sas$ nohup: ignoring input and appending
output to `nohup.out'

If I manually run "sas flop.sas" in the shell, that creates the lst
and log files, and after that Emacs does understand what to do. F5
opens the log, F6 opens the listing.

I've removed every customized bit from my init.el, except for the 2
lines above. So I'm pretty sure I'm not to blame for this.  I may
blame someone at Debian, or something they put somewhere in the system

Now that I've seen with my own eyes that SAS can work in batch from
Emacs on Centos Linux, I'm encouraged to think that this *shell*
weirdness I see is a result of some funny Debian packaging. So I'll
keep trying.

3. Some interactive SAS progress! Can send one line at a time, but not
a selected region.

I'm finding that my init.el interferes a lot with that. I can send one
line at a time to a running SAS session like so:

$ emacs flop.sas

That splits the frame 4 ways, and in going back to flop.sas, I find
that the ESS pull down
ESS-eval region line sends a line to a SAS session. Control-Return also works.

However, Send region or send buffer don't work, they cause the Emacs
session to "freeze" until C-g, which then reveals that the first
selected line has been sent to the SAS session.

But that's progress.  So far, I find it does not coexist with any ESS
customizations from my init.el, but I expect I can live with that.
The ESS 12.09 implements may nice features that I used to try to do
myself. I will test to see what I did that interferes.

Finally, a question. If someone likes the SAS gui, but just wants
Emacs to be the editor, is it possible to send commands from Emacs to
that running SAS gui thing?


Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu

More information about the ESS-help mailing list