On a linux machine, with Matlab 2016a:
system ('emacs -nw')
emacs: Terminal type "dumb" is not powerful enough to run Emacs.
It lacks the ability to position the cursor.
If that is not the actual type of terminal you have,
use the Bourne shell command `TERM=... export TERM' (C-shell:
`setenv TERM ...') to specify the correct type. It may be necessary
to do `unset TERMINFO' (C-shell: `unsetenv TERMINFO') as well.
ans =
1
system ('export TERM=xterm; emacs -nw')
[?1049h[?1049h[?12;25h[?1h=[H[2J[35d[?25l[7m-=--:----F1
[0m[39;49m[27m[7m[1m*scratch* [0m[39;49m[27m[7m All L1
(Fundamental)------------[0m[39;49m[27m
....
The terminal then becomes unusable (e.g. can't "C-x C-c") then I have kill
Matlab.
As for the pager, I don't know how to determine if it is a separate process
since my ML session is run on a separate node from the one I launch it from
(i.e. "ps -u $USER" in the launching terminal won't even list Matlab). All I
can tell is that the pager is pretty basic: "space" scrolls one page
forward, any other key scrolls one line forward, "q" quits the pager. Looks
like its no more than "more", much less capable than "less".