I thought Run
will do the trick:
Run["emacs -q " <> myfile]
Run["! emacs -q " <> myfile]
But it does not! I'm using M 10 and Ubuntu Linux + Zsh.
In[11]:= RunProcess[$SystemShell,All,"emacs -q "<>"/tmp/XXX.txt"<>" \n \n exit \n \n "]
Out[11]= <|ExitCode->127,
StandardOutput->,
StandardError->emacs: symbol lookup error: /usr/lib/x86_64-linux-gnu/libatspi.so.0:
undefined symbol: g_type_class_adjust_private_offset |>
The following runs, but Emacs did not get started:
In[12]:= Run["! /usr/bin/emacs " <> "/tmp/XXX.txt"]
Out[12]= 0
In[13]:= Run["!/usr/bin/emacs " <> "/tmp/XXX.txt"]
Out[13]= 32512
vim
on Mac easily withRun
... $\endgroup$/bin/emacs
to find it for sure runwhereis emacs
in terminal. Also to debug a terminal process, it is best to run RunProcess, as it is able to return the standard output and error output. Dont forget to keep the returns (\n) and the exit since otherwise it will run forever and never return and answer.RunProcess[$SystemShell, All, "emacs -q " <> mifile <> " \n \n exit \n \n " ]
$\endgroup$SetEnvironment["LD_LIBRARY_PATH" -> ""]
first. $\endgroup$LD_LIBRARY _PATH
needs to be set to empty string? $\endgroup$