From: L. L. S. <ls...@gm...> - 2013-12-02 16:20:08
|
All, I just tried renaming a *shell* buffer running Matlab to *MATLAB*. It kinda works, but not completely. "Run Region" for example, works, but inserts an extra ">" prompt that must be removed by hand, unlike a buffer actually created by "matlab-shell". Am I missing something? Thanks, Larrabee On Dec 2, 2013, at 10:44 AM, Stefan Harmeling wrote: > Hi there, > > On 02.12.2013, at 15:45, Tristan Nakagawa <tri...@gm...> 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'. > > All you have to to do is to rename the buffer to *MATLAB*. Then it behaves like the matlab-shell, i.e. you can send code from matlab code buffers, etc. You could use "rename-buffer", i.e. "M-x rename-buffer", or use the following function (put the following code into ".emacs.d/init.el"). Restart your emacs and then "M-x rename-matlab". > > (defun rename-matlab () > "Renames the current buffer to *MATLAB*. Useful when running several matlabs." > (interactive) > (rename-buffer "*MATLAB*") > ) > >> 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. > > Not completely sure how to do that. I don't think that the matlab-mode must be changed for that. Instead, you have to figure out how to create an emacs command that creates a new buffer e.g. for an 'ansi-term', then does ssh somewhere, and starts matlab. Finally you rename the buffer to "*MATLAB*", that's it! Possibly the people at http://stackoverflow.com/ can help you with writing the necessary elisp code. I would be also interested in such a emacs command. > > Best wishes, > Stefan. > >> 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 >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss > > > ------------------------------------------------------------------------------ > 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 > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss ---------------------------------------- L. Larrabee Strow Physics Department UMBC Email: st...@um... Office: 724-663-7341 Google Voice: 724-663-1441 Cell: 724-288-6933 (usually OFF) (Please use Office/GVoice for messages) |