From: Eric L. <Eri...@ma...> - 2010-04-06 15:21:00
|
Hi, In the past, I know I've posted that this worked for me. I'm not sure what changed, but my MATLAB is now outputting something different, so I was able to reproduce the problem as described here. The issue I see is that errors for me used to be prefixed like this: {??? Error in And now they are not. I've re-written and checked in a series of changes that are robust to this lack of error text prefix, and I ran some error and debugging samples through my MALTLAB shell, and got the errors to get hyperlinked, and the debugging is also still working for me all in the matlab-shell. If you experienced this problem, you can get the latest from CVS and give it a try. Hopefully it will work with both variations of output. Let me know if there are any more issues. Thanks Eric -----Original Message----- From: Dineva, Evelina E [mailto:eve...@ui...] Sent: Monday, April 05, 2010 3:20 PM To: Daniel Haugstvedt Cc: Eric Ludlam; mat...@li... Subject: Re: [Matlab-emacs-discuss] Links and tab completion in matlab-shell Hello. Thanks for the hints and all the work on this packages. Here is a just my two cents: Both, "$ emacsclient foo.txt" in the terminal and ">> edit someting.m" in matlab-shell (via emacs) or in the native matlab command window both open my default emacs client (aqua on mac, snapshot on linux). Also, warnings do provide correct clickable links for emacs. However, the error messages in the matlab-shell provide no links. In the native matlab command window there are links that open the matlab editor, not emacs (although edit opens emacs!). So probably there is something wrong with editorservices.openAndGoToLine functions ?? -- beats me. Evelna On Apr 5, 2010, at 1:37 PM, Daniel Haugstvedt wrote: > 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 > > > ------------------------------------------------------------------------------ > 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 |