Yes, it's a good feature when working with scripts. The key binding is an issue I see too, though when using VNC. Sometimes the super key isn't passed through. It's also common for the windows super key to not work on Windows, see https://answers.microsoft.com/en-us/windows/forum/all/windows-key-not-working/0c796f79-0aa8-466e-ab44-802005d1791b which gives 8 methods for fixing that. I've hit this in the past.
What about: (define-key map (kbd "C-c C-<down>") #'matlab-sections-forward-section) (define-key map (kbd "C-C C-<up>") #'matlab-sections-backward-section) (define-key map (kbd "C-C C-<left>") #'matlab-sections-beginning-of-section) (define-key map (kbd "C-C C-<right>") #'matlab-sections-end-of-section) (define-key map (kbd "C-c M-<up>") #'matlab-sections-move-section-up) (define-key map (kbd "C-c M-<down>") #'matlab-sections-move-section-down) (define-key map (kbd "C-c M-<return>") #'matlab-sections-run-till-point) (define-key map (kbd "C-c C-SPC") #'matlab-sections-mark-section) Eric - another issue is that there are many files, including files shipped with MATLAB such as matlab/toolbox/matlab/uitools/uitools/msgbox.m which have %% characters that aren't sections and we get odd bolding as shown below. We also see odd bolding when %% are used and there are functions in the script. Nidish and I have been discussing this in https://github.com/mathworks/Emacs-MATLAB-Mode/issues/14. Maybe you have some thoughts on how to improve this? If we had better semantic understanding in matlab-sections.el, perhaps we could better understand where the sections are? function varargout=msgbox(varargin) %MSGBOX Message box. % msgbox(Message) creates a message box that automatically wraps % Message to fit an appropriately sized Figure. Message is a string % vector, string matrix or cell array. % <snip> %%%%%%%%%%%%%%%%%%%% %%% Nargin Check %%% %%%%%%%%%%%%%%%%%%%% narginchk(1,6); nargoutchk(0,1); %check for support in deployed web apps matlab.ui.internal.NotSupportedInWebAppServer('msgbox'); ________________________________ From: Eric Ludlam <ericlud...@gmail.com> Sent: Tuesday, November 19, 2024 5:08 PM To: matlab-emacs-discuss <matlab-emacs-discuss@lists.sourceforge.net> Subject: [Matlab-emacs-discuss] matlab-sections.el Hi all, I missed the discussions about the new matlab-sections.el that was added to matlab-mode recently. I like the idea, thanks Nidish for working on it. I spent a little time trying it out and wanted to share a few thoughts: * matlab-sections-break-face no longer inherits from font-lock-comment-face. Why is that? My %% comments really stand out now that they aren't comment colored. I could customize, but it seems like comments should color as comments. * Not everyone has a functional super-key. I'm using Windows/cygwin and the windows key does Windows stuff. :( Emacs guidelines says that C-<punctuation> is reserved as a prefix for minor modes. While inconvenient to type, using C-% as a prefix for matlab-sections (that start with %) as a backup prefix could be handy. Thanks Eric
_______________________________________________ Matlab-emacs-discuss mailing list Matlab-emacs-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss