emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: could matlab-mode be in ELPA or the GNU emacs tree (like auctex and


From: Uwe Brauer
Subject: Re: could matlab-mode be in ELPA or the GNU emacs tree (like auctex and org-mode)?
Date: Sun, 21 Nov 2021 09:51:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:

>> From: Uwe Brauer <oub@mat.ucm.es>
>> Date: Sun, 21 Nov 2021 09:32:10 +0100
>> 
>> 1. You can use your favorite editor for writing code.

> The Matlab code editor is IMNSHO vastly superior, as it has code
> completion, links to the Matlab documentation, etc.  Emacs can at best
> be a dumb text editor in this regard.

I disagree with the use of the term vastly superior: we have code completion and
you can use the matlab-shell to access the matlab documentation if you
desire. I can also use my favorite editor as the swiss knife it is to
write my code, I have tried the matlab editor in several occasion and
find it superior. Here is a simple example.

I have to check a lot of matlab files students present in an exam, so I
have to read the code execute parts of it, write comments, use the spell
checker, access my email etc etc in that process, and I don't have to
use an external editor, that is different from emacs to do this. Heck
even at mathworks there are, I think hundreds of users (or at least a
dozen that use emacs for hacking and not the internal editor).

It seems that you are acquainted with matlab, why don't you give
matlab-mode a try?
 


>> 2. Matlab-mode has a specific syntax support (like auctex does) that
>> concerns keyword expansion, fontification and these sorts of things.

> That could be easily merged into Octave mode, I think.  the syntax is
> similar, right?

Yes, but since matlab contains more commands, it supports, logically,
more


>> 3. It has a function matlab-shell that does allow you execute
>> code, either the whole part or just parts of it (you have a similar
>> feature using org mode, the python kernel, and jupyter, however not
>> all commands are supported using org mode, plotting for example is
>> not, debugging neither). Again a similarity with auctex
>> 
>> 4. You can debug code, although that worked better in the past, but it is 
>> still quite reasonable 

> Don't these work much better in the Matlab interpreter?

Do you mean, does debugging work better using the internal editor. It
depends, the pointer when moving is  bit better explained, but I have
tried both and I prefer emacs for debugging, but again that might be a
personal preference.

>> > I'm asking because I never understood why people who use Matlab would
>> > like to use Emacs in conjunction with Matlab, since the Matlab
>> > interactive mode provides so many features that are practically
>> > necessary for any reasonable use of Matlab.  So what can Emacs
>> > possibly add to that?
>> 
>> I am not sure what you mean by interactive mode here?

> Where you get the ">>" prompt and can examine data, run code
> fragments, etc.  The REPL.

But this is not an editor, I don't understand you. I am given a single
matlab file what I need to examine, you want to do this from the command
line?




>> If this is the case, then, you cannot debug, and you cannot execute
>> code from emacs, it is more of a one way thing.

> Given the above, I still don't understand why you'd want to have Emacs
> support for it.  Why not use the Matlab facilities, which AFAIK are
> significantly more powerful and flexible than anything Emacs can
> reasonably provide?

All I can say is, I have to use matlab more than 15 years, and I have
tried it both ways, I much prefer emacs, it is more, when I am forced to
use Windows (no surprise my university uses MS windows for their PC,
than I am much slower in debugging and checking students code, the emacs
matlab shell does not work in MS Windows, only in GNU/Linux and MacOs,
most likely in BSD as well)

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]