Okay I've pushed the first version of the cell utils. This is the first time I'm making a substantial contribution to a package, so please forgive me if something I'm doing is not how you'd rather have it - happy to learn! :)

A few pointers:

 * All the new contributions are in a new branch called "matlab-cells":
   https://sourceforge.net/p/matlab-emacs/src/ci/matlab-cells/tree/
 * I've dumped all the code in matlab-cell.el and made it a minor-mode.
   All the new variables and functions are prefixed with "matlab-cell-"
 * The new minor-mode is enabled by default by calling its setup
   function in the define-derived-mode of matlab-mode in matlab.el
 * I see that matlab-cellbreak-face already exists so perhaps there's
   some duplication of efforts - it would make sense to remove 
   redundancies.
 * A large portion of the code is based on another package, python-cell
   : https://github.com/twmr/python-cell.el

The main features that the new minor-mode enables are:

 * It redefines the page-break character to "%%" so an overline is
   drawn over those, making it visually look better.
 * The current cell that point is in is highlighted by being boldfaced
   (this is customizable).
 * Convenience functions for moving point forward and backward by one
   cell (also support being called with prefix arguments).
 * Convenience functions for moving a cell up or down by a block
   (number-prefixes supported too).
 * Some more non-interactive convenience functions to help development.
 * I've not bound any of the functions to any keymap within the package
   yet.
   In my config though, these are the bindings I'm using (in case
   someone's interested):

                ("C-v" . 'matlab-cell-forward-cell)
                ("M-v" . 'matlab-cell-backward-cell)
                ("C-<return>" . matlab-shell-run-cell)
                ("C-c C-b" . (lambda () (interactive)
                               (save-window-excursion
                                 (matlab-shell-run-cell))
                               (matlab-cell-forward-cell)))
                ("C-x n c" . 'matlab-cell-narrow-to-cell)
                ("M-[" . 'backward-paragraph)
                ("M-]" . 'forward-paragraph)
                ("C-c <down>" . 'matlab-cell-move-cell-down)
                ("C-c <up>" . 'matlab-cell-move-cell-up)

I'll appreciate comments and suggestions! :)

Best,
Nidish

On 5/14/24 19:44, Nidish Narayanaa Balaji wrote:
On 5/14/24 19:37, Uwe Brauer wrote:
On 5/14/24 17:39, Uwe Brauer wrote:
Yes I do - my ID is:  nidish96
Ok, so you should have write access now.

BTW, maybe it is better you create a branch for testing and then I (or
you merge that later into master)?
so that at least we can do some testing.

Thank you!

And yes, I agree - I'll create a testing branch for my latest edits and then you can test it out before merging! :)



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

Reply via email to