2

When I execute

emacs --batch --script=/home/jim/test.el --no-site-file --file=testing

I get:

Cannot open load file: no such file or directory, /home/jim/--script=/home/jim/test.el

While emacs --help shows --script in its list of options, executing just emacs --script=test junk gives an error saying --script is not recognised. Is there an alternative?

I'm using Emacs version 24.5.1. Thanks What is happening here?

5
$ emacs --help
[...]
--file FILE             visit FILE
[...]
--script FILE               run FILE as an Emacs Lisp script

No = in either of those.

Try:

emacs --batch --script /home/jim/test.el --no-site-file --file testing

As for the actual error, that's a bit funky. It seems to be deciding that the option is a --script option, and then using --script=/home/jim/test.el in its entirety as the script filename (and you are running it from your home directory, so that path gets prepended as well).

I suggest you M-x report-emacs-bug about that weirdness.

  • Not unless 26.1 has the same bug. 24.5.1 is ancient – rpluim Mar 5 at 10:26
  • I see that same behaviour in 26.1 and also in my build of 27. – phils Mar 5 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.