GNU bug report logs - #76604
eglot causes eldoc error: (invalid-function incf)

Previous Next

Package: emacs;

Reported by: Daniel Gomez <d.gomez <at> posteo.org>

Date: Wed, 26 Feb 2025 23:52:02 UTC

Severity: normal

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 76604 in the body.
You can then email your comments to 76604 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#76604; Package emacs. (Wed, 26 Feb 2025 23:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Gomez <d.gomez <at> posteo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 26 Feb 2025 23:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Gomez <d.gomez <at> posteo.org>
To: bug-gnu-emacs <at> gnu.org
Cc: stefankangas <at> gmail.com
Subject: eglot causes eldoc error: (invalid-function incf)
Date: Wed, 26 Feb 2025 21:40:09 +0000
Dear emacs maintainers,

Trying eglot for the first time on a python file.
Everything works but I get on the minibuffer an eldoc error: 
(invalid-function incf).

For context: I use straight for package management, but have no 
declarations regarding eglot nor eldoc on my init.el.
Emacs 30.1, but I tried under 29.4 with the same issue.

If I set debug-on-error, I get the following, which isn't really 
informative:

Debugger entered--Lisp error: (invalid-function incf)
  incf(0)
  #f(compiled-function (method origin) #<bytecode 
-0xaadc1b6e8ed7d7>)(:patient eglot-signature-eldoc-function)
  eldoc--make-callback(:patient eglot-signature-eldoc-function)
  #f(compiled-function (f) #<bytecode 
-0x6cf6f9fa4609ff8>)(eglot-signature-eldoc-function)
  run-hook-wrapped(#f(compiled-function (f) #<bytecode 
-0x6cf6f9fa4609ff8>) eglot-signature-eldoc-function)
  eldoc-documentation-compose()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #f(compiled-function () #<bytecode -0x1617e223c153308b>)()
  apply(#f(compiled-function () #<bytecode -0x1617e223c153308b>) nil)
  timer-event-handler([t 0 0 500000 nil #f(compiled-function () 
#<bytecode -0x1617e223c153308b>) nil idle 0 nil])


It seems incf is being used in eldoc.el, an Emacs core package. That 
should not happen since as far as I understand cl is deprecated.

;;; eldoc.el --- Show function arglist or variable docstring in echo 
area  -*- lexical-binding:t; -*-

;; Copyright (C) 1996-2025 Free Software Foundation, Inc.

;; Author: Noah Friedman <friedman <at> splode.com>
;; Keywords: extensions
;; Created: 1995-10-06
;; Version: 1.15.0
;; Package-Requires: ((emacs "26.3"))

;; This is a GNU ELPA :core package.  Avoid functionality that is not
;; compatible with the version of Emacs recorded above.


Thank you.

Regards,
Daniel

ps: issue on github: 
https://github.com/joaotavora/eglot/discussions/1487#discussioncomment-12330803




Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Fri, 28 Feb 2025 01:34:04 GMT) Full text and rfc822 format available.

Notification sent to Daniel Gomez <d.gomez <at> posteo.org>:
bug acknowledged by developer. (Fri, 28 Feb 2025 01:34:04 GMT) Full text and rfc822 format available.

Message #10 received at 76604-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Daniel Gomez <d.gomez <at> posteo.org>
Cc: 76604-done <at> debbugs.gnu.org
Subject: Re: bug#76604: eglot causes eldoc error: (invalid-function incf)
Date: Thu, 27 Feb 2025 17:33:24 -0800
Version: 31.1

Daniel Gomez <d.gomez <at> posteo.org> writes:

> Dear emacs maintainers,
>
> Trying eglot for the first time on a python file.
> Everything works but I get on the minibuffer an eldoc error: (invalid-function
> incf).
>
> For context: I use straight for package management, but have no declarations
> regarding eglot nor eldoc on my init.el.
> Emacs 30.1, but I tried under 29.4 with the same issue.
>
> If I set debug-on-error, I get the following, which isn't really informative:
>
> Debugger entered--Lisp error: (invalid-function incf)
>   incf(0)
>   #f(compiled-function (method origin) #<bytecode -0xaadc1b6e8ed7d7>)(:patient
>   eglot-signature-eldoc-function)
>   eldoc--make-callback(:patient eglot-signature-eldoc-function)
>   #f(compiled-function (f) #<bytecode
>    -0x6cf6f9fa4609ff8>)(eglot-signature-eldoc-function)
>   run-hook-wrapped(#f(compiled-function (f) #<bytecode -0x6cf6f9fa4609ff8>)
>  eglot-signature-eldoc-function)
>   eldoc-documentation-compose()
>   eldoc--invoke-strategy(nil)
>   eldoc-print-current-symbol-info()
>   #f(compiled-function () #<bytecode -0x1617e223c153308b>)()
>   apply(#f(compiled-function () #<bytecode -0x1617e223c153308b>) nil)
>   timer-event-handler([t 0 0 500000 nil #f(compiled-function () #<bytecode
>  -0x1617e223c153308b>) nil idle 0 nil])
>
>
> It seems incf is being used in eldoc.el, an Emacs core package. That should not
> happen since as far as I understand cl is deprecated.
>
> ;;; eldoc.el --- Show function arglist or variable docstring in echo area  -*-
>    lexical-binding:t; -*-
>
> ;; Copyright (C) 1996-2025 Free Software Foundation, Inc.
>
> ;; Author: Noah Friedman <friedman <at> splode.com>
> ;; Keywords: extensions
> ;; Created: 1995-10-06
> ;; Version: 1.15.0
> ;; Package-Requires: ((emacs "26.3"))
>
> ;; This is a GNU ELPA :core package.  Avoid functionality that is not
> ;; compatible with the version of Emacs recorded above.

Thanks for the bug report!

I was surprised that any users were affected by this, but João explained
the reason why on GitHub:

    "Straight grabs the bleeding edge from master, makes a package
    out of that, so effectively jumps over the safety of the release
    mechanism. Package.el doesn't do that (by default)."

I guess we should be grateful for the pre-alpha testing that users of
"straight" are doing for us.  I just hope for their sake that this
aspect of straight is clearly documented.

Anyways, this should now be fixed on master, so I'm closing this bug.
Please test the fix and report back if it didn't work.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 28 Mar 2025 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.