Subject: bug#78860: 30.1.90; eshell: wrong-number-of-arguments

From: Eli Zaretskii <[email-masked]>
Date: Sun, 22 Jun 2025 18:04:52 +0300

> X-Spam-Status: No, score=0 tagged_above=-10 required=5 tests=[none]
>  autolearn=ham autolearn_force=no
> From: Christopher Howard <[email-masked]>
> Cc: [email-masked]
> Date: Sun, 22 Jun 2025 06:38:47 -0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Crystal ball says you a version mismatch between the code that calls
> > Eshell and Eshell itself.  Because eshell-stringify indeed accepted
> > only 1 argument in Emacs 30, but in Emacs 31 it can accept 2.
> 
> Do you see anything in the bug report info that might suggest I am pulling in code from a weird place?

I don't have enough information to say anything definitive, but the
backtrace you posted, viz.:

> Debugger entered--Lisp error: (wrong-number-of-arguments (1 . 1) 2)
>   eshell-stringify("status" nil)
>   #f(compiled-function (i) #<bytecode 0x12a893834464da57>)("status")
>   mapcar(#f(compiled-function (i) #<bytecode 0x12a893834464da57>) ("status"))
>   eshell-connection-local-command("/home/christopher/.guix-home/profile/bin/git" ("status"))
>   eshell-external-command("/home/christopher/.guix-home/profile/bin/git" ("status"))
>   eshell-explicit-command("*git" ("status"))

clearly shows that some byte-compiled function called from
eshell-connection-local-command called eshell-stringify with 2
arguments, something that will only work in Emacs 31.  Whereas your
bug report says you are running Emacs 30.1.90.

My first suspect would be Eshell, but that's all I could say.

> So I'm wondering where I went wrong. Maybe some bad code cached somewhere? Or something wrong with my checkout of the emacs-30 branch?

Maybe look at the value of load-history, it could tell you where you
are loading Lisp packages from.