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

Prefix for "search-map" in prelude-vertico.el shadowed by smartparens #1400

Open
bgschaid opened this issue Mar 20, 2023 · 1 comment
Open

Comments

@bgschaid
Copy link

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

@byronclark
Copy link
Contributor

byronclark commented May 16, 2023

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:

  1. Change the bindings prefixed with M-s in consult
    • Downside is that these appear to be commonly used bindings for consult
  2. Make the smartparens keybinding set configurable in prelude
    • Downside is that using the paredit style bindings and M-s for consult still isn't possible

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

No branches or pull requests

2 participants