salte@milton.u.washington.edu (Guess who) (05/19/91)
Emacs has a limited set of functions available for accessing subprocesses on VMS. Trying to use these functions I have encountered the following problems: 1) spawn-subprocess creates an asynchronous process to do command processing, sending a command to be processed by send-command-to-subprocess will then return immediately and the problem is then to detect when the command is finished. If the command happened to send a fixed string saying "I am done" when it's done, it's ok, you can detect it through a filter. But if the command under certain conditions do no output, there is as far as I can see, no way to detect when it's finished. I have thought about doing sending a COPY sys$input sys$output or something similar so that when DCL is done with the command you actually want it to do, it will do some output. But this solution is not a good one, and if anyone have a better solution I would greatly appreciate it. 2) span-subprocess do not return an ID, instead you GIVE an id as input to id. THe problem is then to make sure to use a unique process id. Is there any way to guarantee that there is no other part of emacs that spawns a subprocess with the same id as you? I used '1' as process id to start with ESC $ (subprocess-command) also appearantly used '1' and therefore all output from there went into my buffer instead of to *COMMAND* as it normally do. (I used a filter to catch the output from my process). 3) The manual says that version 19 will remove these horrible hacks and implement the same functionality as one have under UNIX, when will version 19 with this be available? 4) I am looking at the various language modes under emacs and I see that the syntax table et.c. is (perhaps too much) taylored towards C/lisp. a simple thing like ada's or C++ comments (--.*\n for ada and //.*\n for C++) have no support as far as I can see, althought it should be simple enough by defining - or / as ". 12" and \n as ">", would it work if one made such a definition? secondly the /n here is actually overloaded since it is both a whitespace as well as comment ender. Is there any hope that the defintion of the syntax table might be improved in the future? I would also like to see a following general search functions that operators on some mode-specific variables. comment-regexp, character-regexp, string-regexp re-search-forward-skipping-comments-characters-and-strings and ditto backward. et.c. I am sure that that would be a useful set of functions, I can write it, but if it is already written I wold not like to reinvent the wheel. If it is not written I would like to know if there is general interest for such functions, if so I can make them publicly available once I have written them. Thanks in advance for all help. Alf
sss@max.physics.sunysb.edu (Scott S. Snyder) (05/25/91)
Well, this isn't v19, but I have managed get most of the unix subprocess interface working on VMS. I added VMS 5.4 pseudoterminal support as well; however, there seems to be a bug in the driver, as the the system will occasionally crash during heavy paging [has anyone else seen this?]. Anyway, if anyone would be interested in playing with this, I'd be happy to send patches relative to the 18.57 distribution. scott snyder sss@max.physics.sunysb.edu