Prefix for "search-map" in prelude-vertico.el shadowed by smartparens
bgschaid opened this issue · 1 comments
Expected behavior
M-s should be the prefix for some commands (the mapping is defined in prelude-vertico.el
Actual behavior
In programming modes the key does nothing or moves text around.
Steps to reproduce the problem
In a buffer with a programming mode enter C-h k M-s
and the buffer should show
M-s (translated from <escape> s) runs the command sp-splice-sexp
(found in smartparens-mode-map), which is an interactive native
compiled Lisp function in ‘smartparens.el’.
It is bound to M-s.
Environment & Version information
Emacs version
GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-05-31
Mark set
Operating system
Linux Ubuntu 22.04
Just ran into this today and I'm not sure how to best resolve it.
In prelude-editor.el
, smartparens is being set up using the paredit
based keybindings:
(require 'smartparens-config)
(setq sp-base-key-bindings 'paredit)
(setq sp-autoskip-closing-pair 'always)
(setq sp-hybrid-kill-entire-symbol nil)
(sp-use-paredit-bindings)
Those bindings include M-s
for sp-slice-sexp
(which I use pretty frequently). If it weren't frequently used, I'd vote for unmapping that key.
We could use the sp
set of keybindings instead for smartparens, but that's would be fairly surprising to users who are used to the paredit
bindings.
The two good options I see are:
- Change the bindings prefixed with
M-s
in consult- Downside is that these appear to be commonly used bindings for consult
- Make the smartparens keybinding set configurable in prelude
- Downside is that using the
paredit
style bindings andM-s
for consult still isn't possible
- Downside is that using the