From: Eric L. <Eri...@ma...> - 2011-12-08 15:52:40
|
Hi, Good Luck getting your matlab shell working. It sounds like a tricky environment. EmacsLink depended on some Java APIs that aren't available any more. Most of what you may think of as EmacsLink, however, is the same as matlab-emacs except that matlab-emacs on SourceForge has a bunch of misc bug fixes. The matlab-shell command was an EmacsLink predecessor, and fortunately, still works. The breakpoint feature was one of the things not available. I would be possible to fake it out by reading commands that set breakpoints, and using linemark to remember them, but I imagine that would be quite tricky. It would probably work to have some command for matlab-shell that calls dbstatus, reads the breakpoints, and dumps out a lisp struct that could be read in to populate a linemark database. I picture a couple pages of code for that. You'd have to run the command to show the BP though. If someone would like to give it a try, I'll be happy to give some pointers. Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 10:23 AM To: Eric Ludlam; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi Eric, Many thanks for your swift reply !! In fact I've just realised things are more complicated than that... Eventually I did manage to submit matlab as a Sun Grid Engine job, but then, the communication between emacs and matlab is broken because the two processes do not necessarily run on the same machine.... So it looks like the only way is to submit emacs as a job first, and start matlab normally from there (on the same machine !). On a slightly different note, I've been using EmacsLink for years, but only now am I starting to look at matlab-emacs. Undoubtedly there are a few things I need to learn and to get used to, but one thing that I miss terribly is the ability to "see" where my breakpoints are in the source code, pretty much in the same way as mlint warnings are reported (with linemark.el). Is this feature not supported ? Or is something broken in my configuration ? Cheers, David. ________________________________ From: Eric Ludlam [mailto:Eri...@ma...] Sent: 08 December 2011 15:07 To: David Chappaz; mat...@li... Subject: RE: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi, The variable 'matlab-shell-command' needs to be a string that represents a single executable. In your case, you want it to just be "qrsh". You would then set 'matlab-shell-command-switches' to be '("-b" "y" "-q" "single" "-V" ...) with all your switches spelled out. It seems outlook is messing with my 'quote' marks, so you will need to type it in and not copy what I typed here. Good Luck Eric From: David Chappaz [mailto:dav...@fr...] Sent: Thursday, December 08, 2011 7:51 AM To: mat...@li... Subject: [Matlab-emacs-discuss] Matlab-Shell & Sun Grid Engine Hi everyone, I'm having a simple problem configuring matlab-shell-command. The thing is I actually never run matlab locally on the machine I am logged on, but matlab is submitted as a job to a large pool of linux machines with the Sun Grid Engine. In other words, I don't use the "matlab" command at the shell prompt, but instead I use something like: qrsh -b y -q single -V -cwd -noshell matlab Now, everything works fine by default, if I set matlab-shell-command to "matlab". But if I set matlab-shell-command to "qrsh -b y -q single -V -cwd -noshell matlab", a problem occurs in matlab.el (matlab-shell function), and more specifically on this line : (switch-to-buffer (apply 'make-comint matlab-shell-buffer-name matlab-shell-command nil matlab-shell-command-switches)) which returns the error message Searching for program: no such file or directory, qrsh -b y -q single -V -cwd -noshell matlab As a workaround, I have tried defining an alias in my .cshrc, something like: alias sge_matlab 'qrsh -b y -q single -V -cwd -noshell matlab' and this works to manually start matlab from the shell. But again if I set matlab-shell-command to "sge_matlab", then I get apply: Searching for program: no such file or directory, sge_matlab So what is the proper way to get everything to work in my case ? Many thanks in advance ! Cheers, David. |