Thanks for the feedback.

I was proposing adding a 2nd set of bindings.  For folks with super-key,
the current bindings will be faster.  More obscure bindings won't get in
their way.

As for C-c %  vs C-c C-<key> - the Elisp manual is pretty specific saying
that C-<punctuation> is reserved for minor modes (excluding ; : { and } ).
 I picked % out of a hat since it is a comment character.

As for the bolding effect, that is an overlay in matlab-sections, and if
you turn off sections mode, then it goes away.  Sections mode just happens
to have also adopted the face used for %% comments.  It would be easy to
change the defface in sections to inherit from `font-lock-comment-face' and
fix general font locking.  I lost track of where the actual font lock usage
of it is, but the defface should be near the font-lock regexps.

As for auto-choosing when to enable detection of sections to avoid bolding
in functions 'matlab-guess-script-type' already detects the basics of what
is needed.  It could just not add its post-command-hook if not in a
script.  Sections would then also need to watch when this value changes and
reset itself - typically when one goes from an empty file to one with a
function decl in it.

I'll go look in that other thread too.  Thanks for pointing it out.  I
hadn't realized how much I missed b/c the emails are getting binned in a
weird place for me when I rearranged my mailing list subscriptions.

Eric

On Wed, Nov 20, 2024 at 2:28 PM John Ciolfi <cio...@mathworks.com> wrote:

> Hi
>
> I think we could keep the current settings for those that don't have
> issues with the super key. We could also have the C-c C-<ITEM> key binding
> witch is similar to the current settings.
>
> I'm not sure which is better using C-c C-<ITEM> or C-% <ITEM>? Both seem
> reasonable to me.
>
> We should probably have the super key bindings be "2nd" because it doesn't
> work in several cases. Windows can loose access to the super key, in cases
> it doesn't exist on Linux, and Mac doesn't have a super key.
>
> Thanks
>
>
> ------------------------------
> *From:* Uwe Brauer
> *Sent:* Wednesday, November 20, 2024 12:05 PM
> *To:* John Ciolfi via Matlab-emacs-discuss
> *Cc:* Eric Ludlam; John Ciolfi
> *Subject:* Re: [Matlab-emacs-discuss] matlab-sections.el
>
> >>> "JCvM" == John Ciolfi via Matlab-emacs-discuss <
> matlab-emacs-discuss@lists.sourceforge.net> writes:
>
> > 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)
>
>
> Do you mean: in addition to the current keybinding setting or replacing
> the  current keybinding?
>
>
> If the current keybinding is problematic for Linux users, can't we
> distinguish between the two or say  OS.
>
>
>     1. MacOS: darwin
>
>     2. Linux: gnu/linux
>
>     3. MS, windows-nt
> Like
>
> (if (eq system-type 'darwin)
>   ; something for OS X if true
>   ; optional something if not
> )
> --
> 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.
>
>
_______________________________________________
Matlab-emacs-discuss mailing list
Matlab-emacs-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss

Reply via email to