Hi,

thanks for the answers,

@Larrabee:
the first one really isn't what I want since I want to use my local
emacs with local scripting files, being the newest version with
org-babel integration etc, to interact with the remote, detachable
matlab. This would be much easier than to potentially periodically ask
administrator to update the emacs installations and/or update the
configuration on various servers myself, and having problems with keys
not being sent right  (e.g. Capslock -> Ctrl).

And I haven't quite figured out how to use tramp (except if it runs
anyways in the background and its the default matlab via ssh in emacs
terminal-emulator solution), but the whole Idea is to have it interact
with my script as *Matlab* in matlab-shell mode anyways.

@Stefan:

That does work beautifully and simply.
and with the ansi-term is even better! I just fought with not being able
to run tmux in emacs term or shell, and didn't know about ansi-term
now I can do, to start my session with local script and remote matlab:
M-x ansi-term
TERM=screen ssh server
M-x rename-buffer RET *MATLAB*
tmux
matlab

When done, distach Matlab by tmux command:
C-b d

Now I can close everything, and reconnect with the same procedure as
before, only this time using:
tmux attach


, and my matlab is still open. Awesome!

I will worry about a function for all this another time, great to have
it working! Thanks!

and
@Larrabee:
No, for me the commands work fine, only if there is already a character
given on the command prompt it doesn't ignore it but adds it to the
command from the other buffer, resulting in an error

cheers
T



On 2013-12-02 16:39, L. Larrabee Strow wrote:
> Hi,
> 
> On your remote system, start emacs in daemon mode.  Then start matlab shell.  
> Then, you can connect to you emacs and thus your matlab-shell via the 
> emacsclient command any time.   Emacs stays up, matlab stays up.  Plus you 
> can move from machine to machine and always connect to your original matlab 
> session.   I *think* this is what you want?  
> 
> You can do something similar with your local emacs and tramp.  If you are 
> sitting on a remote filesystem (M-x cd remote_file_system) and then M-x 
> shell, you can start matlab up from that shell and it won't go away.  But, 
> that shell is not a "matlab-shell". 
> 
> Larrabee
> 
> On Dec 2, 2013, at 9:45 AM, Tristan Nakagawa wrote:
> 
>> Hi, great tool!
>>
>> I was wondering if it's possible to connect to a running matlab session
>> and designate it as the current *matlab* M-shell?
>>
>> I am running a remote (ssh) matlab, which works by editing the matlab.el
>> matlab-shell command to an ssh script.
>>
>> However, it would be most amazing if I could connect to an already
>> running matlab process (in the background on the server) via terminal,
>> and then just 'make' that shell my current matlab shell in emacs, with
>> something like 'matlab-shell-mode'.
>>
>> Also, it would be great to be able to have an interactive matlab-shell
>> with default 'matlab' as command, but the possibility to change that
>> command, so to be able to launch remote matlabs without having to change
>> matlab.el every time...
>> Maybe that would even elegantly solve the above process by using a
>> command that just connects to the running matlab and puts it to the
>> foreground? I wouldnt mind doing that manually with a bash command.
>>
>> Any chances to integrate that?
>>
>> cheers,
>>
>> Tristan
>>
>> ------------------------------------------------------------------------------
>> Rapidly troubleshoot problems before they affect your business. Most IT 
>> organizations don't have a clear picture of how application performance 
>> affects their revenue. With AppDynamics, you get 100% visibility into your 
>> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics 
>> Pro!
>> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Matlab-emacs-discuss mailing list
>> Matlab-emacs-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss
> 
> 
> ----------------------------------------
> L. Larrabee Strow
> Physics Department
> UMBC
> Email: st...@umbc.edu
> Office: 724-663-7341
> Google Voice: 724-663-1441
> Cell: 724-288-6933 (usually OFF)
> (Please use Office/GVoice for messages)
> 


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to