I finally got the S-Plus 4.x Commands window to appear in the *S+4* buffer. http://astro.ocis.temple.edu/~rmh/essd-sp4com.el There are four functions in the file essd-sp4com.el. 1. The primary user command is `M-x S+4-command'. This starts up the S-Plus GUI and sinks the output from the Commands window to the *S+4* buffer. The user then enters commands in the buffer myfile.s, sends them to S-Plus with C-c C-n and reads S output in the *S+4* buffer. `S+4-command' works by using the file S-transcript.st in the current directory as a communication file. S-Plus sinks its output to that file. *S+4* uses 'tail -f' to read the file. The author of tail was very clever. The ls or dir of the file S-transcript.st shows it to have 0 bytes. Windows does not place a positive byte count on it until after the file is closed by the process writing to it. tail sneaks around the back and manages to read the file contents from the cache where it lives before the file is closed. 2. The second user command is `M-x S+4-tail'. S+4-command calls S+4-tail, so the user may not need to call it directly. S+4-tail asks the user for permission to delete the previous instance of S-transcript.st. You must say yes to continue. Should you say no, you will be given the opportunity to rename the file and then continue by re-issuing the command `M-x S+4-tail'. The internal functions are: 3. `ess-mark-pop-up' is based on `dired-mark-pop-up'. It is used to query you about deleting the file. 4.`S+4-command-startup' is almost identical to `S+4'. The only real difference is that it starts S-Plus with the "&" and `S+4' does not use the "&". ;;; The advantages: ;;; * S text output is in an emacs buffer and therefore searchable ;;; using emacs commands. ;;; * All GUI graphics and buttons are accessible. ;;; ;;; The characteristics of this version of the ESS interface: ;;; * We can't type in the *S+4* buffer. ;;; * Prompts do NOT appear in the *S+4* buffer. ;;; * All error messages appear only in the S-Plus Commands window, ;;; NOT in the *S+4* buffer. ;;; * We can type in the S-Plus Commands window, but no results ;;; appear there, all results appear in the *S+4* buffer. ;;; * Echoed input is reformatted by S-Plus.