Hi David,

On 2/26/21 9:05 PM, david.chap...@free.fr wrote:
[...]

With the disappearance of EEI, things weren’t quite the same. It was no longer possible to debug within emacs.

This week however, I decided to check again the latest version of matlab-emacs…. Oh joy !


Glad you found it and it works for you!


Despite what the matlab-emacs documentation says (https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/README.org <https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/README.org>), I discovered that debugging *.m files using Emacs as a debugger was possible again ! Add/remove breakpoints, step in and out ! That really made my day !


Thanks for identifying the old statements in the README.  I had forgotten that was there.


I think this should really be highlighted and advertised; I’m sure lots of people would love to learn it’s possible again !


We can always use some help fixing up stuff like that.


Just a couple of question now.

The only thing that seems to be missing is tooltips showing the value of variables as the mouse hovers over the code.

I don’t expect that to happen overnight, but is there any hope ? is it technically possible ?


You need to set `matlab-shell-debug-tooltips-p' to t to enable. They are off by default because it can flood the channel between Emacs and MATLAB and slow down.  But maybe they will work for you?

Also, to make previous outputs uneditable in shell/term-mode, I use the trick explained here https://emacs.stackexchange.com/a/2897 <https://emacs.stackexchange.com/a/2897>

Although it fundamentally cohabitates with matlab-shell, there seems to be a number of side effects


I have vague recollections of this.  I think there was just too much code around that assumed it could edit the buffer.  I also thought something with the prompt was broken, but maybe not anymore?

[...]

Can anyone confirm these side effects, and does anyone know how to avoid them ?

If that’s the price to pay to debug in emacs, I am more than happy to renounce using the trick from https://emacs.stackexchange.com/a/2897 <https://emacs.stackexchange.com/a/2897> 😊


MATLAB shell's process has to do a lot of gymnastics to do it's work.  Some of the issue is related to MATLAB not always dumping it's output in contiguous blocks.  New output can result in needing to go back and modify old output.  Sometimes that's just about re-fonting, but we also go backward and delete old prompts and output once we know the output was designated from a command Emacs sent.


Each of the functions that does that needs to set inhibit-read-only. I think someone just needs to go in and find these cases and set inhibit-read-only to t.  I spend most of my days on Windows now so this sort of thing doesn't get in my way. Instead, there is a network based shell connection that works on Windows, but it doesn't support debugging due to the way K>> prompt & stack stuff works.  It does let you do some simple stuff, like running files you're working on from an Emacs keystroke.


PS: last note for anybody at Mathworks reading this.

The information found at https://blogs.mathworks.com/community/2009/09/14/matlab-emacs-integration-is-back/ <https://blogs.mathworks.com/community/2009/09/14/matlab-emacs-integration-is-back/> seems a little out of date. For windows users it suggests using:

emacsinit('c:/applications/Emacs/lib-src/emacsclient -n');

But the current version of emacsinit doesn’t take any arguments….


We don't go back and modify old blog posts.  It might be time to post a new one though, and we could post a note on the old one to refer to the update.


If only work didn't keep me so busy... :)

Eric



_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to