Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add micros keybinds to lisp-mode #1715

Merged
merged 1 commit into from
Dec 27, 2024
Merged

Conversation

jfaz1
Copy link
Contributor

@jfaz1 jfaz1 commented Dec 24, 2024

Starting/restarting slime (micros) is a common-enough task I think it makes sense for it to have default keybinds.

I used the C-c m prefix, so e.g. C-c m s to start micros, C-c m r to restart, etc. Originally wanted C-c C-m but C-m is reserved for return.

Side-note, we should rename the slime-* commands at some point to micros-*. I didn't want to include that here since that's a breaking change.

Also, merry christmas 🎄 🎅

@SequentialDesign
Copy link
Contributor

i don't know what kind of keybind conventions LEM has, but at least in GNU Emacs, C-c <letter> is reserved for the user. i think that is an important convention to have. how about using C-c C-s as in slime/swank since micros is micro slime/swank ?

@cxxxr
Copy link
Member

cxxxr commented Dec 27, 2024

I think it's good PR, thank you.
I also agree with changing the command name from slime to micros.
I'd like to do it someday, but first I have to make the existing slime commands deprecated and add micros commands, which is a bit of a hassle, so I haven't done it yet.

i don't know what kind of keybind conventions LEM has, but at least in GNU Emacs, C-c is reserved for the user. i think that is an important convention to have. how about using C-c C-s as in slime/swank since micros is micro slime/swank ?

If C-c s is allowed, then C-c m should be fine, right? (Because lem uses micros instead of slime)

I thought that anything starting with C-c was a mode-specific definition.
This has the potential to conflict with user-specific definitions, so how about adopting a different prefix that is only used by the user?
For example, S-, but this can't be used on a terminal.

@cxxxr
Copy link
Member

cxxxr commented Dec 27, 2024

And, although it was a little late, Merry Christmas!

@cxxxr cxxxr merged commit cc37f10 into lem-project:main Dec 27, 2024
2 checks passed
@SequentialDesign
Copy link
Contributor

I think C-c C-m is a good place to put it, but that is currently lisp-macrostep-expand which i like. i could also see lisp-macrostep-expand on C-c C-x. i like S- for the user, but i disagree with using C-c <letter> since modes usually take C-c C-<letter>, and that should be plenty of keys to choose from without infringing on the user's safe space

@jfaz1
Copy link
Contributor Author

jfaz1 commented Dec 27, 2024

i don't know what kind of keybind conventions LEM has, but at least in GNU Emacs, C-c <letter> is reserved for the user. i think that is an important convention to have. how about using C-c C-s as in slime/swank since micros is micro slime/swank ?

I generally agree which is why C-c C-m fits the best (but would break in the shell). That being said, there are other default binds like C-c z for switch to repl, C-c g for interrupt, C-c i/C-c I for inspect, etc. that don't follow the convention already, so I felt it's most likely fine for micros as well. Those binds are also in sly/emacs by default.

@jfaz1 jfaz1 deleted the micros-keybinds branch December 27, 2024 04:42
@SequentialDesign
Copy link
Contributor

ahh, i did not know about C-c z, C-c g, and C-c I. good to know. C-c C-m works for me in either sdl2 or the terminal, but it is lisp-macrostep-expand currently

i don't want to be pedantic about it, but i hope we can move those keys to C-c C-<letter> or at least a moratorium on adding new ones. it's one of the conventions from GNU Emacs that i really like since it gives users an area that is just for them

@jfaz1
Copy link
Contributor Author

jfaz1 commented Dec 27, 2024

ahh, i did not know about C-c z, C-c g, and C-c I. good to know. C-c C-m works for me in either sdl2 or the terminal, but it is lisp-macrostep-expand currently

i don't want to be pedantic about it, but i hope we can move those keys to C-c C-<letter> or at least a moratorium on adding new ones. it's one of the conventions from GNU Emacs that i really like since it gives users an area that is just for them

Isn't macroexpand C-c M-m? I also use C-c Return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants