[ESS-bugs] [ESS] Getting SAS to work
Cameron Hooper
chooper at umich.edu
Sat Jul 30 00:39:41 CEST 2005
> From within the test.sas buffer, enter
> C-h k C-c C-r
> and send us what you get.
> I am getting ess-sas-submit-region
> What I wanted to get was ess-eval-region
I also get ess-sas-submit-region:
C-c C-r runs the command ess-sas-submit-region
which is an interactive Lisp function in `essa-sas'.
(ess-sas-submit-region)
Write region to temporary file, and submit to SAS.
> Let us switch the key definition. From within the test.sas buffer enter
> M-:(define-key sas-mode-local-map "\C-c\C-r" 'ess-sas-submit-region)
> RETURN
> and then try C-c C-r again.
Didn't work ... Did you mean:
M-:(define-key sas-mode-local-map "\C-c\C-r" 'ess-eval-region)? This
did work!
Great stuff. Thanks.
> You might want to switch to the function key method of accessing SAS
> from
> emacs. The M-x SAS approach was designed for a 9600 baud terminal,
> not for
> today's workstation. The function keys are better in today's
> technology.
Thanks for the suggestion. Are you referring to the material covered in
10.4 and 10.5 of the manual?
Thanks again for your help.
Cameron
> Rich
>
> ---- Original message ----
>> Date: Fri, 29 Jul 2005 17:07:35 -0400
>> From: Cameron Hooper <chooper at umich.edu>
>> Subject: Re: [ESS] Getting SAS to work
>> To: "Richard M. Heiberger" <rmh at temple.edu>
>>
>> Thanks for your reply Rich
>>
>> It would not surprise me if I am confusing things. Let me try to give
>> a
>> clear a picture as possible of what I am doing.
>>
>> I have not touched any function keys. I have not edited any of the
>> files that came with the ESS distribution. I had a look at ess-site.el
>> and decided to leave well alone.
>>
>> I opened a sas file in emacs, and typed M-x SAS. After a moment the
>> following message appeared in the minibuffer:
>>
>> ESS [SAS(SAS):
>> /home/usr13/chooper/emacs/ess-5.2.8/etc/ess-sas-sh-command] starting
>> data directory? ~/
>>
>> I hit return and the following 4 buffers appeared
>>
>> 1. test.sas (ESS[SAS] [none])
>> 2. *SAS (iESS [SAS]: run)
>> 3. *SAS.log* (Shell [] ESStr)
>> 4. *SAS.lst* (Shell [] ESSlst)
>>
>> Buffer 1 contains my SAS code.
>>
>> Buffer 2 contains
>> + set +x
>> sas </dev/tty 1>/dev/pts/7 2>/dev/pts/23 -stdio -linesize 80 -noovp
>> -nosyntaxcheck
>>
>> Buffer 3 contains
>> NOTE: AUTOEXEC processing completed.
>>
>> Buffer 4 contains
>> $ tty
>> /dev/pts/7
>> $
>>
>> The cursor is in Buffer 2 which I believe is the communications
>> buffer,
>> which I should never use directly. So I assume the fact that the
>> cursor
>> goes to this window by default is not the correct behaviour.
>>
>> I move to Buffer 1, select my sas code and type C-c C-r.
>>
>> The buffer containing my sas code (buffer 1) disappears and is
>> replaced
>> by a new buffer titled (Shell:run) containing the information I gave
>> previously, repeated here:
>>
>> cd "/home/usr13/chooper/"
>> nohup nice +6 sas ess-temp -rsasuser &
>> [northrup][~]> [northrup][~]> [1] 18945
>> [northrup][~]>
>>
>> C-x C-b reveals the test.sas buffers still exists, it is just hidden.
>>
>> I appreciate any help anyone can offer. Please be patient as I am not
>> an expert.
>>
>> Thanks
>>
>> Cameron
>>
>> On Jul 29, 2005, at 4:46 PM, Richard M. Heiberger wrote:
>>
>>> I am puzzled by your experience. I think you are confusing two
>>> distinct
>>> ways of running SAS from within ESS.
>>>
>>> Where did the *shell* buffer come from? It is not a buffer
>>> that ESS uses with the M-x SAS command. M-x SAS uses the *SAS:1*
>>> buffer.
>>> Please let us know whether the *SAS:1* buffer appears, and what is in
>>> it.
>>>
>>> The "nohup nice" command that you report does not belong to M-x SAS.
>>> It belongs to the alternate way of submitting SAS jobs with the
>>> function
>>> keys. See the section of the ESS manual
>>> ESS[SAS]-Function keys for batch processing
>>>
>>> Rich
>>>
>>>
>>
>
>
More information about the ESS-bugs
mailing list