From: Daniel H. <dan...@gm...> - 2010-04-05 18:37:35
|
Thanks for the quick response Eric. I think you are on to something. Running the edit test fails. >> edit ls ??? Error using ==> edit at 57 Could not find external editor Before running server-start emacsclient does not work, after running it starts a new emacs buffer as expected. Starting the matlab-shell after the server is started does not help. However, after I start the matlab-shell there is a line printet in the matlab promt: >> addpath('/Path/to/Matlab/Emacs/Matlab/toolbox,'-begin'); rehash; emacsinit('emacsclient -n'); I am suspecting it is the last one that is the perpetrator. I hunted it down to line 4160 in matlab.el (defvar matlab-shell-emacsclient-command "emacsclient -n" "The command to use as an external editor for MATLAB. Using emacsclient allows the currently running Emacs to also be the external editor for MATLAB.") Checkin what is does in emacsinit.el i found this on line 11-14 if nargin == 0 clientcommand = 'emacsclient -n'; end com.mathworks.services.Prefs.setStringPref('EditorOtherEditor', clientcommand); Simply running >> com.mathworks.services.Prefs.setStringPref('EditorOtherEditor', 'emacsclient'); fixed so that edit opens a buffer in emacs. I changed line 4160 in matlab.el and 12 in emacsinit.el and hoped this would solve all my problems. Now edit works but the error links are still missing. Testing the old configuration again I don't think they ever where there. It is only the statements that appear clickable (makes the mouse change when I scroll over) not the errors. Sorry for the misinformation in the previous mail. I have no Idea what to do next Cheers Daniel On 5 Apr 2010, at 14:39, Eric Ludlam wrote: > Hi, > > The links in the shell buffer may do one of two things. They will > either cause local code to run, like 'find-file-other-window', or it > will ask MATLAB to execute the 'opentoline' or 'edit' commands. If > the anchor in the output text is a matlab: style anchor it may cause > MATLAB to run that code. If so, MATLAB will execute 'emacsclient' > with some arguments and then your running emacs will pick up on > that. This is similar to if you ran MATLAB and Emacs separately, > and changed the editor to be emacsclient. > > Anyway, a simple test is at the >> prompt in matlab-shell to type: > >>> edit ls > > And see if that brings up ls.m in Emacs. If not, you may need to > start the Emacs server with > > M-x server-start > > Or some equivalent in you .emacs. > > Then try from the Unix shell to type: > > $ emacsclient foo.txt > > And see if that works. > > Eric > > -----Original Message----- > From: Daniel Haugstvedt [mailto:dan...@gm...] > Sent: Sunday, April 04, 2010 4:53 PM > To: mat...@li... > Subject: [Matlab-emacs-discuss] Links and tab completion in matlab- > shell > > Hi all, > During my six years at the university matlab-emacs have been my > weapon of choice for editing. During christmas I saw the matlab-shell > in action and I definitely want to change my workflow to incorporate > it. Sadly I am unable to get it to function without major limitations. > Assuming that I was just making an obvious beginner mistake I have > been watching the mailing list since new year hoping to get some > pointers on how to go about. > > It looks like others are having similar problems, but I have yet to > see a solution to my main problem: All links are present (mouse > changes when i scroll over them) but pressing have no effect. I > suspect the reason can be found in the error messages I receive when > starting up matlab-shell: > - Error in menu-bar-update-hook: (void-variable gdb-active-process) > - Warning: Bug in matlab-shell-mode: it forgets to call `run-mode- > hooks' > - Error in menu-bar-update-hook: (void-variable gdb-active-process) > Googling has not helped, and I really don't know where to start. > > In addition to this there is the problem of tab completion. When > trying it I only get the message: > - ad-Orig-error: No tags table loaded; try M-x visit-tags-table > > My setup is GNU Emacs 22.3.1 (i386-apple-darwin9.8.0, Carbon Version > 1.6.0) > of 2009-09-30 on braeburn.aquamacs.org - Aquamacs Distribution 1.9 > with matlab 7.9.0.529 (R2009b) and I presume the latest version of > matlab-emacs > > All help is greatly appreciated! > Cheers > /Daniel > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matlab-emacs-discuss mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss |