From: Eric L. <Eri...@ma...> - 2013-07-08 16:29:58
|
Hi, I think I understand a bit better. Clicking on the "line 3" which is supposed to call 'opentoline' is not calling the shadowed version. I gave this a try and discovered the same problem with newer MATLABs. I don't know what the problem is. Mostly it looks like the command window isn't actually running the MATLAB command in the link since the debugger won't stop there either. I'll need to look into it to see what's going on. In the meantime, you may need to use the matlab-shell in Emacs to get those links to work. Eric From: emacs user [mailto:use...@gm...] Sent: Tuesday, July 02, 2013 5:17 PM To: Eric Ludlam Cc: mat...@li... Subject: Re: [Matlab-emacs-discuss] emacsinit/ using emacs as an external Matlab editor Hi, thanks for the prompt response, I think I didn't explain that very clearly, let me try again. I have an init.m file: addpath('~/.emacs.d/matlab-emacs/toolbox','-begin'); rehash; emacsinit('/Applications/Emacs.app/Contents/MacOS/bin/emacsclient'); and then a opentoline_test.m file: a=zeros(3,4); b=zeros(3,3); c=a+b; in Matlab I do: >> which opentoline /Applications/MATLAB_R2013a.app/toolbox/matlab/codetools/opentoline.m >> init >> which opentoline /Users/eli/.emacs.d/matlab-emacs/toolbox/opentoline.m so the correct opentoline seems to be shadowing. Next, >> opentoline_test Error using + Matrix dimensions must agree. Error in opentoline_test (line 3) c=a+b; now if I click on "line 3" I get the matlab editor, if instead, I say >> opentoline('opentoline_test.m',3,0) then emacs is correctly invoked. does this help, or did I simply misunderstand your response? thanks again, best, Eli On Tue, Jul 2, 2013 at 4:46 PM, Eric Ludlam <Eri...@ma...<mailto:Eri...@ma...>> wrote: Hi, Not all the 'edit' like functions obey the preference to use an alternate editor. If you look in the toolbox directory that came with matlab.el, you will see "opentoline.m" which shadows the one that comes with matlab. Chances are that netcdf.open (which I am not familiar with at all) might need something similar. If you look at that fcn, it calls some lib function that you might be able to shadow in order to get what you want. Just stick it in the toolbox directory for Emacs, and you'll be all set. If it isn't related to some MATLAB toolbox, perhaps we can add the shadow to the matlab-emacs repository. Good Luck Eric From: emacs user [mailto:use...@gm...<mailto:use...@gm...>] Sent: Monday, July 01, 2013 3:01 PM To: mat...@li...<mailto:mat...@li...> Subject: [Matlab-emacs-discuss] emacsinit/ using emacs as an external Matlab editor hi, I am trying the above using Emacs 24.3 on Mac OSX, using a fresh download of matlab-emacs and Matlab 2013a. when I follow the install directions, trying to click on the line number in something like this: Error using netcdf.open (line 45) brings up the matlab editor instead of emacsclient. if I try >> opentoline('myfile.m',1477,0) emacsclient is invoked and goes to the right line etc. Any idea what I may be doing wrong? additional information I can povide? many thanks... |