Closed ilyagr closed 2 years ago
Rather than (require 'smartparens-mode)
you could add the following in your startup file:
(defun smartparens-mode () (debug))
Once this is defined, then any attempt at calling this function will print stack trace. Using that stack trace you can figure out who is calling this and take corrective action to fix it.
If you are not comfortable with stack traces, then you can cut and paste it into this report and others may be able to help you.
@emacs18 Thank you for the very helpful suggestion!
I had to put this line into user-init
and not user-config
to get a stacktrace after startup. Here's a stacktrace I get after running emacs ~/.spacemacs
.
Debugger entered: nil
smartparens-mode()
run-hooks(change-major-mode-after-body-hook prog-mode-hook emacs-lisp-mode-hook)
apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook emacs-lisp-mode-hook))
run-mode-hooks(emacs-lisp-mode-hook)
emacs-lisp-mode()
set-auto-mode-0(emacs-lisp-mode nil)
set-auto-mode()
normal-mode(t)
after-find-file(nil t)
find-file-noselect-1(#<buffer .spacemacs> "~/.spacemacs" nil nil "~/stow/dotfiles/.spacemacs" (693697 52))
find-file-noselect("/home/ilyagr/.spacemacs")
#f(compiled-function (displayable-buffers dir line column name) #<bytecode 0x1ef047293473>)((nil) "~/.local/app/Spacemacs/" (0) (0) "/home/ilyagr/.spacemacs")
command-line-1(("/home/ilyagr/.spacemacs"))
command-line()
normal-top-level()
So, it seems the culprit in this particular case is emacs-lisp-mode-hook
. Edit I tried disabling the elisp
layer to see if it's the only thing triggering the error, but it didn't help. I get exactly the same backtrace.
Here's what I get when searching inside ~/.emacs.d/elpa/27.1/develop/
, exluding the directory of the smartparens
package itself:
$ cd ~/.emacs.d/elpa/27.1/develop/ && rg --files-with-matches smartparens -g "!smartparens*/"
evil-cleverparens-20170718.413/evil-cleverparens.el
evil-cleverparens-20170718.413/evil-cleverparens-pkg.el
evil-cleverparens-20170718.413/evil-cleverparens-text-objects.el
evil-cleverparens-20170718.413/evil-cleverparens-autoloads.el
archives/melpa/archive-contents
evil-cleverparens-20170718.413/evil-cleverparens-util.el
evil-lisp-state-20160404.248/evil-lisp-state.el
evil-lisp-state-20160404.248/evil-lisp-state-pkg.el
None of the results seem like the obvious problem, though I'm not sure if I'm qualified to tell. On first look, the following seems the most suspicious (but it's not very suspicious either):
https://github.com/syl20bnr/evil-lisp-state/blob/master/evil-lisp-state.el#L117-L124
Let me know if you have any further advice.
The issue you describe sounds like smartparens-mode
is not loaded when emacs-lisp-mode
is started. This could be an issue with deferred loading of that package. However I do not have this issue on my linux box when I execute the code you have posted.
Do you have any specfic user-config
or user-init
?
Here is my system:
((lsp :variables lsp-headerline-breadcrumb-enable nil lsp-remap-xref-keybindings t lsp-navigation 'peek)
dap eaf command-log
(crystal :variables crystal-backend 'company-crystal)
(ess :variables ess-r-backend 'lsp)
helm
(scala :variables scala-backend 'scala-metals)
(nim :variables nim-backend 'company-nim)
spacemacs-purpose elasticsearch
(yang :variables yang-pyang-rules "ietf")
ietf scheme
(auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle auto-completion-complete-with-key-sequence nil auto-completion-complete-with-key-sequence-delay 0.1 auto-completion-minimum-prefix-length 1 auto-completion-idle-delay 0.0 auto-completion-private-snippets-directory nil auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t auto-completion-use-company-box nil auto-completion-enable-sort-by-usage t)
syntax-checking better-defaults
(clojure :variables clojure-backend 'cider clojure-enable-fancify-symbols t clojure-enable-sayid t clojure-enable-clj-refactor t clojure-enable-linters
'(clj-kondo joker))
gpu graphviz
(plantuml :variables plantuml-jar-path "~/.plantuml/plantUml.jar" org-plantuml-jar-path "~/.plantuml/plantUml.jar")
salt ipython-notebook ibuffer emacs-lisp
(org :variables org-enable-org-journal-support t org-want-todo-bindings t org-enable-github-support t org-enable-bootstrap-support t org-enable-reveal-js-support t org-enable-hugo-support t org-enable-trello-support t org-enable-org-contacts-support t org-enable-epub-support t org-enable-jira-support t org-enable-roam-support nil org-enable-sticky-header nil)
(shell :variables shell-enable-smart-eshell nil shell-default-shell 'vterm shell-default-height 30 shell-default-position 'bottom shell-default-full-span nil shell-default-term-shell "/usr/bin/fish")
version-control import-js
(cmake :variables cmake-enable-cmake-ide-support t cmake-backend 'company-cmake)
(c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-backend 'lsp-clangd c-c++-lsp-enable-semantic-highlight 'rainbow c++-enable-organize-includes-on-save t c-c++-enable-clang-format-on-save t c-c++-adopt-subprojects t)
web-beautify semantic templates epub themes-megapack git github sml bm
(copy-as-format :variables copy-as-format-default "markdown" copy-as-format-asciidoc-include-file-name t)
pass common-lisp
(python :variables python-backend 'lsp python-lsp-server 'pyls python-test-runner 'pytest python-formatter 'lsp python-format-on-save t python-save-before-test t python-sort-imports-on-save t)
windows-scripts jr
(shell-scripts :variables shell-scripts-backend 'lsp)
prodigy emoji
(markdown :variables markdown-live-preview-engine 'vmd)
bibtex
(json :variables json-fmt-tool 'web-beautify json-backend 'lsp json-fmt-on-save t)
debug
(latex :variables latex-backend 'lsp latex-enable-auto-fill t latex-enable-magic nil latex-enable-folding t)
lua
(html :variables web-fmt-tool 'web-beautify css-enable-lsp t less-enable-lsp t scss-enable-lsp t html-enable-lsp t)
(javascript :variables javascript-import-tool 'import-js javascript-backend 'lsp javascript-fmt-tool 'web-beautify javascript-repl 'nodejs js2-basic-offset 2 js-indent-level 2)
react
(yaml :variables yaml-enable-lsp t)
prettier
(multiple-cursors :variables multiple-cursors-backend 'evil-mc)
nginx
(docker :variables docker-dockerfile-backend 'lsp)
csv search-engine
(restclient :variables restclient-use-org t)
restructuredtext selectric octave purescript
(kotlin :variables kotlin-backend 'lsp kotlin-lsp-jar-path "~/.kotlin-lsp/install/server/bin/kotlin-language-server")
speed-reading systemd imenu-list
(java :variables java-backend 'lsp)
(groovy :variables groovy-backend 'lsp groovy-lsp-jar-path "~/.groovy-lsp/groovy-lsp-all.jar")
(go :variables go-backend 'lsp go-use-golangci-lint t gofmt-command "goimports" go-tab-width 4 go-format-before-save t go-use-gocheck-for-testing t go-use-test-args "-race -timeout 10s" godoc-at-point-function 'godoc-gogetdoc)
coq django
(elm :variables elm-backend 'lsp elm-sort-imports-on-save t elm-format-on-save t)
kubernetes idris
(haskell :variables haskell-completion-backend 'lsp haskell-enable-hindent t haskell-process-type 'stack-ghci)
pandoc sphinx parinfer asciidoc
(treemacs :variables treemacs-use-follow-mode t treemacs-use-filewatch-mode t treemacs-collapse-dirs 3 treemacs-use-icons-dired t treemacs-use-all-the-icons-theme nil treemacs-use-git-mode 'deferred)
ansible puppet rust xkcd typography
(vimscript :variables vimscript-backend 'lsp)
(terraform :variables terraform-auto-format-on-save t terraform-backend 'lsp)
(ruby :variables ruby-enable-enh-ruby-mode t ruby-backend 'lsp)
ruby-on-rails asm
(sql :variables sql-capitalize-keywords t)
autohotkey faust vagrant erlang games meson php helpful nginx racket
(colors :variables colors-colorize-identifiers 'all)
languagetool d unicode-fonts
(typescript :variables typescript-backend 'tide typescript-fmt-tool 'tide typescript-lsp-linter t typescript-linter 'tslint typescript-fmt-on-save t))
@smile13241324 I can'tt think of anything obviously related. I put my full .spacemacs
in the details section of the original report above (click on the triangle).
Following should help you identify who is adding smartparens-mode
to emacs-lisp-mode-hook
:
(defadvice add-hook (before check-for-smartparens activate)
(when (and (eq hook 'emacs-lisp-mode-hook)
(eq function 'smartparens-mode))
(debug)))
This modifies add-hook
function so that it checks if emacs-lisp-mode-hook
is about to be modified to add smartparens-mode
to it. If this is detected, then halt and print stack trace. In most cases add-hook
should be used to add hooks. However if some other method is used such as setq
, then above code will of course not work.
More brute force method could be to add something like this:
(debug-on-variable-change 'emacs-lisp-mode-hook)
This prints stack trace whenever the variable is about to be changed. Since many hooks are typically added to this variable, it may be very tedious to wade through hooks other than smartparens-mode
being added.
Thanks, @emacs18.
Adding the hook you suggested does not trigger anything.
With debug-variable-change
, I get the stacktrace I pasted at the end. Only multi-line-emacs-lisp-hook
is added to it. (There's that notification, and also a let
block that sets emacs-lisp-mode-hook
to nil
temporarily elsewhere). Note that multi-line-emacs-lisp-hook
was also mentioned in the stacktrace above. It is present only in .elc
files on my machine, not .el
. I think it's defined in a macro in https://github.com/IvanMalison/multi-line/blob/d5ae863ced0adeb7032ada398005f27a6c669d79/multi-line.el#L125-L140, but I don't understand the code.
Debugger entered--setting emacs-lisp-mode-hook to (multi-line-emacs-lisp-mode-hook):
debug--implement-debug-watch(emacs-lisp-mode-hook (multi-line-emacs-lisp-mode-hook) set nil)
#f(compiled-function (hook function &optional depth local) "Add to the value of HOOK the function FUNCTION.\nFUNCTION is not added if already present.\n\nThe place where the function is added depends on the DEPTH\nparameter. DEPTH defaults to 0. By convention, it should be\na number between -100 and 100 where 100 means that the function\nshould be at the very end of the list, whereas -100 means that\nthe function should always come first.\nSince nothing is \"always\" true, don't use 100 nor -100.\nWhen two functions have the same depth, the new one gets added after the\nold one if depth is strictly positive and before otherwise.\n\nFor backward compatibility reasons, a symbol other than nil is\ninterpreted as a DEPTH of 90.\n\nThe optional fourth argument, LOCAL, if non-nil, says to modify\nthe hook's buffer-local value rather than its global value.\nThis makes the hook buffer-local, and it makes t a member of the\nbuffer-local value. That acts as a flag to run the hook\nfunctions of the global value as well as in the local value.\n\nHOOK should be a symbol, and FUNCTION may be any valid function. If\nHOOK is void, it is first set to nil. If HOOK's value is a single\nfunction, it is changed to a list of functions." #<bytecode 0x1eaf6b064a0b>)(emacs-lisp-mode-hook multi-line-emacs-lisp-mode-hook t nil)
ad-Advice-add-hook(#f(compiled-function (hook function &optional depth local) "Add to the value of HOOK the function FUNCTION.\nFUNCTION is not added if already present.\n\nThe place where the function is added depends on the DEPTH\nparameter. DEPTH defaults to 0. By convention, it should be\na number between -100 and 100 where 100 means that the function\nshould be at the very end of the list, whereas -100 means that\nthe function should always come first.\nSince nothing is \"always\" true, don't use 100 nor -100.\nWhen two functions have the same depth, the new one gets added after the\nold one if depth is strictly positive and before otherwise.\n\nFor backward compatibility reasons, a symbol other than nil is\ninterpreted as a DEPTH of 90.\n\nThe optional fourth argument, LOCAL, if non-nil, says to modify\nthe hook's buffer-local value rather than its global value.\nThis makes the hook buffer-local, and it makes t a member of the\nbuffer-local value. That acts as a flag to run the hook\nfunctions of the global value as well as in the local value.\n\nHOOK should be a symbol, and FUNCTION may be any valid function. If\nHOOK is void, it is first set to nil. If HOOK's value is a single\nfunction, it is changed to a list of functions." #<bytecode 0x1eaf6b064a0b>) emacs-lisp-mode-hook multi-line-emacs-lisp-mode-hook t)
apply(ad-Advice-add-hook #f(compiled-function (hook function &optional depth local) "Add to the value of HOOK the function FUNCTION.\nFUNCTION is not added if already present.\n\nThe place where the function is added depends on the DEPTH\nparameter. DEPTH defaults to 0. By convention, it should be\na number between -100 and 100 where 100 means that the function\nshould be at the very end of the list, whereas -100 means that\nthe function should always come first.\nSince nothing is \"always\" true, don't use 100 nor -100.\nWhen two functions have the same depth, the new one gets added after the\nold one if depth is strictly positive and before otherwise.\n\nFor backward compatibility reasons, a symbol other than nil is\ninterpreted as a DEPTH of 90.\n\nThe optional fourth argument, LOCAL, if non-nil, says to modify\nthe hook's buffer-local value rather than its global value.\nThis makes the hook buffer-local, and it makes t a member of the\nbuffer-local value. That acts as a flag to run the hook\nfunctions of the global value as well as in the local value.\n\nHOOK should be a symbol, and FUNCTION may be any valid function. If\nHOOK is void, it is first set to nil. If HOOK's value is a single\nfunction, it is changed to a list of functions." #<bytecode 0x1eaf6b064a0b>) (emacs-lisp-mode-hook multi-line-emacs-lisp-mode-hook t))
add-hook(emacs-lisp-mode-hook multi-line-emacs-lisp-mode-hook t)
multi-line-enable-mode-hooks()
require(multi-line nil t)
(not (require 'multi-line nil t))
(if (not (require 'multi-line nil t)) (display-warning 'use-package (format "Cannot load %s" 'multi-line) :error) (condition-case-unless-debug err (progn (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-config-hook) t (run-hooks 'use-package--multi-line--post-config-hook)) t) (error (funcall use-package--warning127 :config err))))
(progn (condition-case-unless-debug err (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-init-hook) (progn (progn (defvar spacemacs--multi-line-transient-state-props nil "Association list containing a copy of some propert...") (if (member '... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons ... spacemacs--multi-line-transient-state-props))) (if (member '... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons ... spacemacs--multi-line-transient-state-props))) (if (member '... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons ... spacemacs--multi-line-transient-state-props))) (if (member '... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons ... spacemacs--multi-line-transient-state-props))) (if (member '... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons ... spacemacs--multi-line-transient-state-props))) (spacemacs/defer-until-after-user-config '(lambda nil ... ...))) (spacemacs/set-leader-keys "xn" 'spacemacs/multi-line-transient-state/body)) (run-hooks 'use-package--multi-line--post-init-hook)) (error (funcall use-package--warning127 :init err))) (if (not (require 'multi-line nil t)) (display-warning 'use-package (format "Cannot load %s" 'multi-line) :error) (condition-case-unless-debug err (progn (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-config-hook) t (run-hooks 'use-package--multi-line--post-config-hook)) t) (error (funcall use-package--warning127 :config err)))))
(condition-case err (progn (condition-case-unless-debug err (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-init-hook) (progn (progn (defvar spacemacs--multi-line-transient-state-props nil "Association list containing a copy of some propert...") (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (spacemacs/defer-until-after-user-config '...)) (spacemacs/set-leader-keys "xn" 'spacemacs/multi-line-transient-state/body)) (run-hooks 'use-package--multi-line--post-init-hook)) (error (funcall use-package--warning127 :init err))) (if (not (require 'multi-line nil t)) (display-warning 'use-package (format "Cannot load %s" 'multi-line) :error) (condition-case-unless-debug err (progn (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-config-hook) t (run-hooks 'use-package--multi-line--post-config-hook)) t) (error (funcall use-package--warning127 :config err))))) ((debug error) (funcall use-package--warning127 :catch err)))
(condition-case-unless-debug err (progn (condition-case-unless-debug err (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-init-hook) (progn (progn (defvar spacemacs--multi-line-transient-state-props nil "Association list containing a copy of some propert...") (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (if (member ... spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props ...)) (spacemacs/defer-until-after-user-config '...)) (spacemacs/set-leader-keys "xn" 'spacemacs/multi-line-transient-state/body)) (run-hooks 'use-package--multi-line--post-init-hook)) (error (funcall use-package--warning127 :init err))) (if (not (require 'multi-line nil t)) (display-warning 'use-package (format "Cannot load %s" 'multi-line) :error) (condition-case-unless-debug err (progn (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-config-hook) t (run-hooks 'use-package--multi-line--post-config-hook)) t) (error (funcall use-package--warning127 :config err))))) (error (funcall use-package--warning127 :catch err)))
(progn (defvar use-package--warning127 #'(lambda (keyword err) (let ((msg (format "%s/%s: %s" ... keyword ...))) (display-warning 'use-package msg :error)))) (condition-case-unless-debug err (progn (condition-case-unless-debug err (when (run-hook-with-args-until-failure 'use-package--multi-line--pre-init-hook) (progn (progn (defvar spacemacs--multi-line-transient-state-props nil "Association list containing a copy of some propert...") (if ... spacemacs--multi-line-transient-state-props ...) (if ... spacemacs--multi-line-transient-state-props ...) (if ... spacemacs--multi-line-transient-state-props ...) (if ... spacemacs--multi-line-transient-state-props ...) (if ... spacemacs--multi-line-transient-state-props ...) (spacemacs/defer-until-after-user-config ...)) (spacemacs/set-leader-keys "xn" 'spacemacs/multi-line-transient-state/body)) (run-hooks 'use-package--multi-line--post-init-hook)) (error (funcall use-package--warning127 :init err))) (if (not (require 'multi-line nil t)) (display-warning 'use-package (format "Cannot load %s" 'multi-line) :error) (condition-case-unless-debug err (progn (when (run-hook-with-args-until-failure ...) t (run-hooks ...)) t) (error (funcall use-package--warning127 :config err))))) (error (funcall use-package--warning127 :catch err))))
(use-package multi-line :init (progn (progn (defvar spacemacs--multi-line-transient-state-props nil "Association list containing a copy of some propert...") (if (member '(hint nil) spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons '(hint nil) spacemacs--multi-line-transient-state-props))) (if (member '(columns nil) spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons '(columns nil) spacemacs--multi-line-transient-state-props))) (if (member '(foreign-keys nil) spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons '(foreign-keys nil) spacemacs--multi-line-transient-state-props))) (if (member '(entry-sexp nil) spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons '(entry-sexp nil) spacemacs--multi-line-transient-state-props))) (if (member '(exit-sexp nil) spacemacs--multi-line-transient-state-props) spacemacs--multi-line-transient-state-props (setq spacemacs--multi-line-transient-state-props (cons '(exit-sexp nil) spacemacs--multi-line-transient-state-props))) (spacemacs/defer-until-after-user-config '(lambda nil (eval (append ... ...)) (when "Multi-line Transient State" (let ... ... ...))))) (spacemacs/set-leader-keys "xn" 'spacemacs/multi-line-transient-state/body)))
spacemacs-editing/init-multi-line()
funcall(spacemacs-editing/init-multi-line)
(let* ((pkg-name (eieio-oref pkg ':name)) (owner (car (eieio-oref pkg ':owners)))) (spacemacs-buffer/message (format "%S -> init (%S)..." pkg-name owner)) (funcall (intern (format "%S/init-%S" owner pkg-name))))
configuration-layer//configure-package(#<cfgl-package cfgl-package-157508155a04>)
mapc(configuration-layer//configure-package (#<cfgl-package cfgl-package-15750815c478> #<cfgl-package cfgl-package-157508168f24> #<cfgl-package cfgl-package-157508172688> #<cfgl-package cfgl-package-15750813e4cc> #<cfgl-package cfgl-package-15750813e6d8> #<cfgl-package cfgl-package-157508150040> #<cfgl-package cfgl-package-157508139dac> #<cfgl-package cfgl-package-15750815c6e0> #<cfgl-package cfgl-package-157508168b08> #<cfgl-package cfgl-package-15750813eaf4> #<cfgl-package cfgl-package-1575081688fc> #<cfgl-package cfgl-package-15750815045c> #<cfgl-package cfgl-package-15750815cb48> #<cfgl-package cfgl-package-15750813ed00> #<cfgl-package cfgl-package-1575081512dc> #<cfgl-package cfgl-package-15750814d8e0> #<cfgl-package cfgl-package-157508169130> #<cfgl-package cfgl-package-157508177eec> #<cfgl-package cfgl-package-15750813f01c> #<cfgl-package cfgl-package-15750815cdbc> #<cfgl-package cfgl-package-157508178140> #<cfgl-package cfgl-package-15750815d024> #<cfgl-package cfgl-package-1575081399e8> #<cfgl-package cfgl-package-157508159c04> #<cfgl-package cfgl-package-157508159e6c> #<cfgl-package cfgl-package-157508165fd0> #<cfgl-package cfgl-package-15750814622c> #<cfgl-package cfgl-package-15750813a110> #<cfgl-package cfgl-package-157508145940> #<cfgl-package cfgl-package-15750815d4d8> #<cfgl-package cfgl-package-157508151540> #<cfgl-package cfgl-package-15750815d940> #<cfgl-package cfgl-package-15750813a320> #<cfgl-package cfgl-package-15750815dba8> #<cfgl-package cfgl-package-15750813f284> #<cfgl-package cfgl-package-157508145b5c> #<cfgl-package cfgl-package-15750815e1d4> #<cfgl-package cfgl-package-15750815175c> #<cfgl-package cfgl-package-15750814cf50> #<cfgl-package cfgl-package-15750815df6c> #<cfgl-package cfgl-package-157508178458> #<cfgl-package cfgl-package-157508151b68> #<cfgl-package cfgl-package-157508146954> #<cfgl-package cfgl-package-157508146b60> #<cfgl-package cfgl-package-157508147994> #<cfgl-package cfgl-package-157508147778> #<cfgl-package cfgl-package-157508158590> #<cfgl-package cfgl-package-157508147ca0> #<cfgl-package cfgl-package-157508147ebc> #<cfgl-package cfgl-package-1575081482c8> ...))
(let (packages-to-configure) (let ((--dolist-tail-- packages) pkg-name) (while --dolist-tail-- (setq pkg-name (car --dolist-tail--)) (let ((pkg (configuration-layer/get-package pkg-name))) (cond ((eieio-oref pkg ':lazy-install) (spacemacs-buffer/message (format "%S ignored since it can be lazily installed." pkg-name))) ((and (eieio-oref pkg ...) (not ...)) (spacemacs-buffer/message (format "%S ignored since it has been excluded." pkg-name))) ((null (eieio-oref pkg ...)) (spacemacs-buffer/message (format "%S ignored since it has no owner layer." pkg-name))) ((not (configuration-layer//package-reqs-used-p pkg)) (spacemacs-buffer/message (format ... pkg-name))) ((not (cfgl-package-enabled-p pkg)) (spacemacs-buffer/message (format "%S is disabled." pkg-name))) (t (let (...) (if dir ...)) (if (memq ... ...) nil (configuration-layer//activate-package pkg-name)) (cond (... ...) (t ... ...))))) (setq --dolist-tail-- (cdr --dolist-tail--)))) (setq packages-to-configure (reverse packages-to-configure)) (mapc 'configuration-layer//configure-package packages-to-configure) (mapc 'configuration-layer//post-configure-package packages-to-configure))
configuration-layer//configure-packages-2((abbrev ac-ispell ace-jump-helm-line ace-link ace-window add-node-modules-path aggressive-indent all-the-icons ansi-colors archive-mode auto-complete auto-highlight-symbol auto-yasnippet avy bookmark bracketed-paste centered-cursor-mode clean-aindent-mode column-enforce-mode company company-box company-quickhelp company-statistics company-web compile conf-mode css-mode cus-edit dash default-helm-config default-ivy-config default-org-config define-word desktop devdocs dired dired-quick-sort dired-x display-fill-column-indicator display-line-numbers doc-view doom-modeline dumb-jump ediff editorconfig eldoc electric-indent-mode emmet-mode eval-sexp-fu evil-anzu ...))
configuration-layer//configure-packages((abbrev ac-ispell ace-jump-helm-line ace-link ace-window add-node-modules-path aggressive-indent all-the-icons ansi-colors archive-mode async auto-complete auto-highlight-symbol auto-yasnippet avy bind-key bind-map bookmark bracketed-paste centered-cursor-mode clean-aindent-mode column-enforce-mode company company-box company-quickhelp company-statistics company-web compile conf-mode css-mode cus-edit dash default-helm-config default-ivy-config default-org-config define-word desktop devdocs diminish dired dired-quick-sort dired-x display-fill-column-indicator display-line-numbers doc-view doom-modeline dotenv-mode dumb-jump ediff editorconfig ...))
configuration-layer//load()
(cond (changed-since-last-dump-p (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message "Layer list has changed since last dump.") (configuration-layer//dump-emacs)))) (spacemacs-force-dump (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message (concat "--force-dump passed on the command line or configu..." "been reloaded, forcing a redump.")) (configuration-layer//dump-emacs)))) ((spacemacs-is-dumping-p) (configuration-layer//load)) ((and (spacemacs/emacs-with-pdumper-set-p) (spacemacs-run-from-dump-p)) (configuration-layer/message "Running from a dumped file. Skipping the loading p...")) (t (configuration-layer//load) (if (spacemacs/emacs-with-pdumper-set-p) (progn (configuration-layer/message (concat "Layer list has not changed since last time. " "Skipping dumping process!"))))))
configuration-layer/load()
(let ((file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start)))))
(if (not (version<= spacemacs-emacs-min-version emacs-version)) (error (concat "Your version of Emacs (%s) is too old. " "Spacemacs requires Emacs version %s or above.") emacs-version spacemacs-emacs-min-version) (let ((file-name-handler-alist nil)) (require 'core-spacemacs) (spacemacs/dump-restore-load-path) (configuration-layer/load-lock-file) (spacemacs/init) (configuration-layer/stable-elpa-init) (configuration-layer/load) (spacemacs-buffer/display-startup-note) (spacemacs/setup-startup-hook) (spacemacs/dump-eval-delayed-functions) (if (and dotspacemacs-enable-server (not (spacemacs-is-dumping-p))) (progn (require 'server) (if dotspacemacs-server-socket-dir (progn (setq server-socket-dir dotspacemacs-server-socket-dir))) (if (server-running-p) nil (message "Starting a server...") (server-start))))))
eval-buffer(#<buffer *load*> nil "/home/ilyagr/.emacs.d/init.el" nil t) ; Reading at buffer position 2531
load-with-code-conversion("/home/ilyagr/.emacs.d/init.el" "/home/ilyagr/.emacs.d/init.el" t t)
load("/home/ilyagr/.emacs.d/init" noerror nomessage)
startup--load-user-init-file(#f(compiled-function () #<bytecode 0x1575079f7c2d>) #f(compiled-function () #<bytecode 0x1575079f62dd>) t)
command-line()
normal-top-level()
Here's a different stacktrace I got after pressing M-:
, clicking on the minibuffer, and entering multi-line-<TAB>
:
Debugger entered: nil
smartparens-mode()
(if (or (eq this-command 'eval-expression) (eq this-command 'eldoc-eval-expression)) (smartparens-mode))
spacemacs//conditionally-enable-smartparens-mode()
read-from-minibuffer("Eval: " nil (keymap (9 . completion-at-point) (27 keymap (9 . completion-at-point)) keymap (escape . keyboard-escape-quit) (18 . helm-minibuffer-history) (3 keymap (12 . helm-minibuffer-history)) (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the min...") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuf...") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (60 . minibuffer-beginning-of-buffer) (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) t read-expression-history)
read--expression("Eval: ")
byte-code("\301\302!\303\10!B\207" [current-prefix-arg read--expression "Eval: " eval-expression-get-print-arguments] 3)
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
Edit So, I think it's one of these, from ~/.emacs.d/layers
. I was searching in the wrong place.
I think the startup error I get is from
That's because changing dotspacemacs-smartparens-strict-mode
from nil
to 't
in my .spacemacs
changes the error I see to File mode specification error: (void-function smartparens-strict-mode)
.
The second stacktrace I get is probably from
since it happened during eval-expression
. This seems to happen every time I press M-:
.
I have no idea why smartparens-mode
is not loaded at that point.
[Later edit: This is comment is irrelevant. smartparens
is always installed since the workaround I mentined in my original bug report works.]
I seem to have found a way to fix this (https://github.com/ilyagr/spacemacs/commit/c0fb84e3690f0fde69326e78adeeba057599df7c). I'm not sure exactly what was happening before, and why it didn't happen to others. There's also a remote possibility of this breaking something.
I'll turn this commit into a pull request if the fix seems to work for a little while, or if somebody knows that this is the correct thing to do.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Description :octocat:
I keep getting errors saying
File mode specification error: (void-function smartparens-mode)
in the messages buffer after I load a file. Similar messages about somethingsmartparens
-related beingvoid
appear at other times as well, for instance after running some commands withhelm-M-X
(don't remember the exact wording).I'm not sure if they cause any harm. The message was often on the screen when something went wrong, but on further investigation, the problem was usually unrelated.
Reproduction guide :beetle:
emacs -nw ~/.spacemacs
Observed behaviour: :eyes: :broken_heart: The message may or may not be visible on screen after Emacs loads, but it's always in the messages buffer.
Expected behaviour: :heart: :smile: No error.
Workaround: :smile: Putting
(require 'smartparens)
in mydotspacemacs/user-config
function fixes the problem. When doing so, I can no longer disable colorful parentheses, though.System Info :computer:
More details :paw_prints:
Here is my complete
.spacemacs
: