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

remove action from global pair #1187

Open
astholkohtz opened this issue Feb 7, 2024 · 0 comments
Open

remove action from global pair #1187

astholkohtz opened this issue Feb 7, 2024 · 0 comments

Comments

@astholkohtz
Copy link

Expected behavior

Executing at least one of these commands should remove the insert action from the "(" pair

(sp-pair "(" ")" :actions '(:rem insert)
;; or 
(sp-pair "(" nil :actions '(:rem insert)
;; or
(sp-pair "(" ")" :actions '(wrap navigate autoskip))
;; or 
(sp-pair "(" nil :actions '(wrap navigate autoskip))
;; I've also tried this (and similar)
(sp-pair "(" nil :actions :rem)
(sp-pair "(" ")" :actions '(wrap navigate autoskip))

Actual behavior

All actions are retained by the pairs. I can tell from inspecting the global and local pair variables.

Steps to reproduce the problem

Try the above

Environment & version information

In recent enough smartparens you can call M-x sp-describe-system to generate this report. Please fill manually what we could not detect automatically. Edit the output as you see fit to protect your privacy.

  • smartparens version: master branch
  • Active major-mode: emacs-lisp-mode
  • Smartparens strict mode: nil
  • Emacs version (M-x emacs-version): GNU Emacs 29.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-25
  • Starterkit/Distribution: Doom
  • OS: gnu/linux

A working solution

This works

  (sp-pair "(" ")" :actions nil)

  (add-hook 'prog-mode-hook (lambda ()
                              (sp-local-pair major-mode "(" ")" :actions '(wrap autoskip navigate))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To triage
Development

No branches or pull requests

1 participant