-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Keep seeing an error about (void-function smartparens-mode)
#14439
Comments
Rather than
Once this is defined, then any attempt at calling this function will print stack trace. 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
So, it seems the culprit in this particular case is Here's what I get when searching inside
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 Do you have any specfic Here is my system: System Info 💻
((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 |
Following should help you identify who is adding (defadvice add-hook (before check-for-smartparens activate)
(when (and (eq hook 'emacs-lisp-mode-hook)
(eq function 'smartparens-mode))
(debug))) This modifies 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 |
Thanks, @emacs18. Adding the hook you suggested does not trigger anything. With Stacktrace when variable was changed
|
Here's a different stacktrace I got after pressing
Edit So, I think it's one of these, from Read the next comment instead of opening this.
|
I think the startup error I get is from spacemacs/layers/+spacemacs/spacemacs-editing/packages.el Lines 396 to 399 in 8181bc9
That's because changing The second stacktrace I get is probably from spacemacs/layers/+spacemacs/spacemacs-editing/funcs.el Lines 63 to 67 in 8181bc9
since it happened during I have no idea why |
[Later edit: This is comment is irrelevant. Original commentAnother observation that may be relevant. In my `.spacemacs` (pasted in my original bug description), there is a line
|
Fixes syl20bnr#14439. This fixes two+ problems I had, described below. Fair warning: I'm not sure why I had this problem (some others claim they didn't experience it), why the previous code didn't end up loading `smartparens` correctly, or whether this create any new problems (though it looks pretty safe to me). It does seem to make things work for me, though. 1) When loading `emacs -nw ~/.spacemacs`, I would get a message `File mode specification error: (void-function smartparens-mode)`. 2) When pressing `M-:` to call `eval-expression`, it would not work. Instead it would show `Symbol’s function definition is void: smartparens-mode` in the minibuffer. 3) I think this happened at other random times as well. From the code, you can get a sense `smartparens-mode` is getting loaded at strange times.
I seem to have found a way to fix this (ilyagr@c0fb84e). 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
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 something
smartparens
-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 🪲
emacs -nw ~/.spacemacs
Observed behaviour: 👀 💔
The message may or may not be visible on screen after Emacs loads, but it's always in the messages buffer.
Expected behaviour: ❤️ 😄
No error.
Workaround: 😄
Putting
(require 'smartparens)
in mydotspacemacs/user-config
function fixes the problem. When doing so, I can no longer disable colorful parentheses, though.System Info 💻
(auto-completion emacs-lisp git helm html markdown multiple-cursors org treemacs)
More details 🐾
Here is my complete
.spacemacs
:The text was updated successfully, but these errors were encountered: