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?

Jim
  • 21
  • 1

1 Answers1

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.

phils
  • 48,657
  • 3
  • 76
  • 115