running opensees.exe as a process in emacs

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
rafal
Posts: 51
Joined: Sun Feb 22, 2015 5:58 am

running opensees.exe as a process in emacs

Post by rafal » Mon Jul 06, 2015 2:50 pm

I would like to run opensees.exe as a process in emacs under Windows 7.
In windows command line when running opensees.exe I get both the header and the prompt "Opensees >"
However when running opensees in emacs after "M-x comint-run" opensees is run as process but in the emacs buffer(window) I don't get the opensees Copyright and Disclaimer header nor the Opensees prompt. The emacs buffer is empty, but when typing for instance: "set a 1" RET then "puts $a" I finally get the header and the value of $a, but still no prompt. Then I can issue "exit" to exit the opensees process.
It seems that python has the command line "interactive" option '-i' which solves similar issue.

The issue is described here:
https://www.masteringemacs.org/article/ ... nterpreter
Citation:
"Important caveat about pipe redirection: Oftentimes programs will detect that you are redirecting its pipes to a dumb terminal or file and it disables its shell prompt; this is extremely frustrating as not all programs detect that it is running inside Emacs by looking for the signature environment variables Emacs will set: EMACS and INSIDE_EMACS. If that happens you may get lucky and find a flag you can set to force it to run in “interactive” mode – for example, in Python it’s -i."

Any idea how this can be fixed?

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Re: running opensees.exe as a process in emacs

Post by fmk » Tue Jul 07, 2015 8:27 am

all output from opensees other than that issued with the puts command is redirected to stderr; when running in a terminal you do not notice this fact.

Post Reply