emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
613 stars 160 forks source link

ess-remote not working with SAS #385

Open rsparapa opened 7 years ago

rsparapa commented 7 years ago

Hi All,

I'm having trouble running SAS remotely on a Unix server using the latest versions of ESS/Emacs. The following is my process that worked on ESS 5.14 / Emacs 23.3.1, but stopped working at some point in the versions after that.

1) Start Xming in the background.

2) Start Emacs.

3) Log in to remote server using M-x ssh (and enter appropriate information)

4) Start SAS from the command line using the following command:

sas -stdio -linesize 80 -noovp -nosyntaxcheck -autoexec autoexec.sas -display IP Address Here

5) In ssh buffer with SAS process running, call M-x ess-remote (and enter "sas" as language).

6) Open SAS file.

7) In the buffer with SAS file highlight region of code to run and submit code using command M-x ess-eval-region.

In the current versions of ESS/Emacs, the following happens upon completion of step 7 above:

a) A new buffer with title shell is created.

b) An error is displayed in the mini-buffer: "Spawning child process: Invalid argument."

Also, when executing step 5 above, I also get the following message in the mini buffer: Wrong type argument: stringp nil

In the older versions of ESS/Emacs the code that I highlighted would appear in the buffer of the remote SAS session and the results of the SAS code would be displayed below the submitted code. (With this workflow, I could interact with SAS in much the same way I interact with R.)

Under the newer versions of ESS/Emacs I am also no longer able to enter commands directly at the "command line" in the remote SAS buffer. When I hit Enter at the command line, the process in the buffer freezes.

Any thoughts on how to fix?

(I've posted on this before, but there were multiple issues with running SAS processes at that time, and this particular issue was thought to be related. But the issue still persists in the latest versions of ESS/Emacs.)

Thanks!! McKay https://stat.ethz.ch/pipermail/ess-help/2016-October/011075.html

Rodney says... I have the same problem with ESS 16.04 and I am creating an issue on github. It looks like the bug is coming from ess-remote. Doing a backtrace, I see… Debugger entered--Lisp error: (wrong-type-argument stringp nil) get-process(nil) ess-process-put(funargs-cache #s(hash-table size 65 test equal rehash-size 1.5 rehash-threshold 0.8 data ( ...))) ess-remote() call-interactively(ess-remote record nil) command-execute(ess-remote record) execute-extended-command(nil "ess-remote") call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)

rsparapa commented 7 years ago

I don't know how to fix it, but I have a workaround. In a shell buffer, ssh into the remote host. Then run M-x ess-sas-interactive. This creates an iESS[SAS] buffer that allows you to interact with the SAS process by entering commands. And from a .sas buffer you can send lines, regions, buffer, etc.