The following config:

(require 'smartparens)
(smartparens-mode t)
(smartparens-global-mode t)
(sp-pair "⟨" "⟩" :wrap "C-*")

doesn't work. Indeed:

  • running C-x C-e on the last line seems to be OK (the minibuffer just contains a very long list starting with ((LaTeX-mode (:open "\\lvert" :close "\\rvert" :trigger "\\lvert" :actions (wrap insert autoskip navigate) :when,

  • but, if I run C-*, the *Messages* buffer just displays:

      Mark set
      Wrong type argument: char-or-string-p, nil

and the cursor jumps to the end of the following word.

Do you know how to fix this issue?


I must admit my config file is not trivial (it is essentially based on [emacs-leuven][1]) but I couldn't test with an empty config. Indeed, despite:

$ ls /home/bitouze/.emacs.d/elpa/smartparens-20220623.1523/smartparens.el

in an emacs -Q session, running M-x load-file RET /home/bitouze/.emacs.d/elpa/smartparens-20220623.1523/smartparens.el RET leads to:

Loading /home/bitouze/.emacs.d/elpa/smartparens-20220623.1523/smartparens.el (source)...
eval-buffer: Cannot open load file: Aucun fichier ou dossier de ce type, dash

1 Answer 1


Define your pair before enabling the mode. Try:

(require 'smartparens)
(sp-pair "⟨" "⟩" :wrap "C-*")
(smartparens-mode t)
(smartparens-global-mode t)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.