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

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

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


From: tpeplt
Subject: Re: eglot: "File mode specification error: (void-variable ‹)"
Date: Tue, 13 Aug 2024 14:02:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

<c.buhtz@posteo.jp> writes:

> 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.
>

Emacs comes with an introduction to Emacs Lisp that can be read in
Emacs.  To read it, look for the menu item "More Manuals" in the Help
menu.  That menu item will include a sub-menu that has an entry titled
"Introduction to Emacs Lisp".  Or, evaluate the following expression in
Emacs:  (info "(eintr) Top")

> 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 ‹)
>

This is likely too little information for anyone to help you know what
caused this error.  If you can produce a recipe of steps, including the
expressions that are being evaluated before the problem is reported,
then others will be more likely to be able to provide a reason for the
problem or how to resolve it.

> 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.
>

It looks as though it is possible that something has changed so that the
function ‘system-name’ is not returning the expected string "quark" when
the expression (system-name) is evaluated.  You might try evaluating
that function on that computer before you see the problem that you’re
having.

   M-: (system-name)

-- 
The lyf so short, the craft so long to lerne.
- Geoffrey Chaucer, The Parliament of Birds.



reply via email to

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