mathworks / Emacs-MATLAB-Mode

Edit, lint, debug, and run MATLAB in Emacs
GNU General Public License v3.0
10 stars 1 forks source link

matlab-cell, rename to matlab sections #5

Closed JohnC32 closed 1 month ago

JohnC32 commented 1 month ago

MATLAB cells are things like {1, 2, 3}.

At one point in the past MathWorks all called the "%% sections" in *.m files cells, but this terminology no longer exists. MathWorks now uses sections of the m-file, see https://www.mathworks.com/help/matlab/matlab_prog/create-and-run-sections.html

Therefore, it would be good to switch from matlab-cell's to matlab-code-sections.el

ouboub commented 1 month ago

"JC" == John Ciolfi @.***> writes:

MATLAB cells are things like {1, 2, 3}. At one point in the past MathWorks all called the "%% sections" in *.m files cells, but this terminology no longer exists. MathWorks now uses sections of the m-file, see https://www.mathworks.com/help/matlab/matlab_prog/create-and-run-sections.html

Therefore, it would be good to switch from matlab-cell's to matlab-code-sections.el

Nidish is on it, but then also the command command matlab-shell-run-cell

Should be renamed.

-- I strongly condemn Hamas heinous despicable pogroms/atrocities on Israel I strongly condemn Putin's war of aggression against Ukraine. I support to deliver weapons to Ukraine's military. I support the EU and NATO membership of Ukraine.

Nidish96 commented 1 month ago

I had a brief email exchange with Uwe about this since I'm personally just too used to referring to these as cells. I'm not opposed to renaming.

Renaming, however, requires a more extensive change since the term cell does not only occur in matlab-cell.el. It occurs in matlab-shell.el also, for instance (matlab-shell-run-cell). This may cause confusions to other devs if done very abruptly. I personally don't have too much experience in maintaining so I'll defer this decision to you guys.

I've created a pull request from the matlab-cells branch for now. Everything in matlab-cell.el (including the name) has been converted to using the matlab-sections terminology and I have verified them to work.

JohnC32 commented 1 month ago

Thanks - I'll take it from here and merge your changes.