help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

eglot: "File mode specification error: (void-variable ‹)"


From: c.buhtz
Subject: eglot: "File mode specification error: (void-variable ‹)"
Date: Sun, 11 Aug 2024 10:14:22 +0000

Hello,

my question was blocked on r/Emacs maybe it is to stupid? Beside
solving this problem I am also interested in how I can solve things
like this in the future myself. Lisp is very hard for me.

I do get this error (Emacs 29 from Debian 12 backports) after updating
all my packages after a long while:

    File mode specification error: (void-variable ‹)

I am not sure but I think I identified the error causing lines (see
`:hook`) in the init.el.

```
(use-package python
  :ensure nil  ; in-build!
  :hook
  (python-mode . (lambda ()
                   (if (not (string-equal (system-name) "quark"))
                       (eglot-ensure)))
  )
  (python-mode . ws-butler-mode)
  (python-mode . hs-minor-mode)
  :custom
  (python-shell-interpreter "python3")
  )
```

The intention of that hook is to start "eglot" only if the current
systems name is not "quark". I do share this init.el between several
machines and "quark" is a RaspberryPi4 not able to run eglot and its
backend in a performant way. This worked well a long time until I
upgrade my emacs packages.

When I remove that hook and just add "(python-mode ensure-eglot)" it
works fine. But I still want the exception for the "quark" machine.

This is the full debug output:

```
Debugger entered--Lisp error: (error "Feature provided by other file:
project") error("Feature provided by other file: %S" project)
  require-with-check(project)
  mapc(require-with-check (project flymake xref jsonrpc
external-completion))
byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\300\312\313\314#\210\300\315!\210\300\316!\210..."
[require imenu cl-lib url-parse url-util pcase compile warnings
filenotify ert text-property-search nil t diff-mode diff fboundp
require-with-check #f(compiled-function (feature &rest _) #<bytecode
0xe148c4c7613dd5f>) eldoc reload seq mapc (project flymake xref jsonrpc
0xe148c4c7613dd5f>external-completion) make-obsolete-variable
0xe148c4c7613dd5f>eglot--managed-mode-hook eglot-managed-mode-hook
0xe148c4c7613dd5f>"1.6" defvaralias
0xe148c4c7613dd5f>eglot-confirm-server-initiated-edits
0xe148c4c7613dd5f>eglot-confirm-server-edits (saved-value
0xe148c4c7613dd5f>saved-variable-comment) put "1.16"
0xe148c4c7613dd5f>eglot-events-buffer-size eglot-events-buffer-config
0xe148c4c7613dd5f>defalias eglot--uri-to-path eglot-uri-to-path
0xe148c4c7613dd5f>make-obsolete eglot--path-to-uri eglot-path-to-uri
0xe148c4c7613dd5f>eglot--range-region eglot-range-region
0xe148c4c7613dd5f>eglot--server-capable eglot-server-capable
0xe148c4c7613dd5f>eglot--server-capable-or-lose
0xe148c4c7613dd5f>eglot-server-capable-or-lose eglot-lsp-abiding-column
0xe148c4c7613dd5f>eglot-utf-16-linepos "1.12" ...] 8) (eglot-ensure)
0xe148c4c7613dd5f>(if (not (string-equal (system-name) "quark"))
0xe148c4c7613dd5f>(eglot-ensure)) (closure (t) nil (if (not
0xe148c4c7613dd5f>(string-equal (system-name) "quark"))
0xe148c4c7613dd5f>(eglot-ensure)))()
0xe148c4c7613dd5f>run-hooks(change-major-mode-after-body-hook
0xe148c4c7613dd5f>prog-mode-hook python-mode-hook) apply(run-hooks
0xe148c4c7613dd5f>(change-major-mode-after-body-hook prog-mode-hook
0xe148c4c7613dd5f>python-mode-hook))
  run-mode-hooks(python-mode-hook)
  python-mode()
  set-auto-mode-0(python-mode nil)
  set-auto-mode--apply-alist((("\\.at\\'" . autotest-mode)
("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" .
markdown-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file)
("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr)
("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil
jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr)
("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'"
. vera-mode)
("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|jbuilder\\|rabl\\|ge..." .
ruby-mode) ("\\.re?st\\'" . rst-mode) ("\\.py[iw]?\\'" . python-mode)
("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode)
("\\.scss\\'" . scss-mode) ("\\.awk\\'" . awk-mode)
("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode)
("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ("\\.m\\'" .
objc-mode) ("\\.ii\\'" . c++-mode) ("\\.i\\'" . c-mode) ("\\.lex\\'" .
c-mode) ("\\.y\\(acc\\)?\\'" . c-mode) ("\\.h\\'" . c-or-c++-mode)
("\\.c\\'" . c-mode) ("\\.\\(CC?\\|HH?\\)\\'" . c++-mode)
("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode) ("\\.\\(cc\\|hh\\)\\'"
. c++-mode) ("\\.\\(bat\\|cmd\\)\\'" . bat-mode)
("\\.[sx]?html?\\(\\.[a-zA-Z_]+\\)?\\'" . mhtml-mode) ("\\.svgz?\\'" .
image-mode) ("\\.svgz?\\'" . xml-mode) ("\\.x[bp]m\\'" . image-mode)
("\\.x[bp]m\\'" . c-mode) ("\\.p[bpgn]m\\'" . image-mode)
("\\.tiff?\\'" . image-mode) ("\\.gif\\'" . image-mode) ("\\.png\\'" .
image-mode) ("\\.jpe?g\\'" . image-mode) ("\\.te?xt\\'" . text-mode)
("\\.[tT]e[xX]\\'" . tex-mode) ("\\.ins\\'" . tex-mode) ("\\.ltx\\'" .
latex-mode) ("\\.dtx\\'" . doctex-mode) ("\\.org\\'" . org-mode) ...)
nil nil) set-auto-mode() normal-mode(t) after-find-file(nil t)
...SKIPPED... ```

Thanks in advance
Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]