GNU bug report logs - #78860
30.1.90; eshell: wrong-number-of-arguments

Previous Next

Package: emacs;

Reported by: Christopher Howard <christopher <at> librehacker.com>

Date: Sun, 22 Jun 2025 04:26:03 UTC

Severity: normal

Found in version 30.1.90

Done: Christopher Howard <christopher <at> librehacker.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: christopher <at> librehacker.com
Cc: 78860 <at> debbugs.gnu.org
Subject: bug#78860: 30.1.90; eshell: wrong-number-of-arguments
Date: Sun, 22 Jun 2025 18:51:33 +0300
> Cc: 78860 <at> debbugs.gnu.org
> Date: Sun, 22 Jun 2025 18:04:52 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> 
> > X-Spam-Status: No, score=0 tagged_above=-10 required=5 tests=[none]
> >  autolearn=ham autolearn_force=no
> > From: Christopher Howard <christopher <at> librehacker.com>
> > Cc: 78860 <at> debbugs.gnu.org
> > Date: Sun, 22 Jun 2025 06:38:47 -0800
> > 
> > Eli Zaretskii <eliz <at> gnu.org> 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.

I think this comes from here:

  (defun eshell-connection-local-command (command args)
    "Insert output from an external COMMAND, using ARGS.
  This always runs COMMAND using the connection associated with the
  current working directory."
    (setq args (eshell-stringify-list (flatten-tree args))) <<<<<<<<<<<<

eshell-stringify-list is a defsubst in esh-util.el:

  (defsubst eshell-stringify-list (args &optional quoted)
    "Convert each element of ARGS into a string value."
    (mapcar (lambda (i) (eshell-stringify i quoted)) args))

The above is the version from Emacs 31, which clearly calls
eshell-stringify with 2 arguments.

So my guess is that your Eshell was somehow compiled when loading
esh-util.el brought in the version from Emacs 31, and now esh-ext.elc
(or the corresponding *.eln?) has the wrong definition of
eshell-stringify-list expanded in it.

My suggestion is to recompile all the *.el files under
/home/christopher/local/share/emacs/30.1.90/lisp/eshell/, or maybe
rebuild and reinstall Emacs anew.




This bug report was last modified 24 days ago.

Previous Next


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