Elisp: Run Emacs Lisp Script in Shell

By Xah Lee. Date: . Last updated: .

Run Emacs Lisp Script in Shell

You can run emacs lisp script in shell (terminal), using the --script option. For example:

emacs --script myfile.el

Prepare Your Emacs Lisp Script to Run in Batch Mode

When you write a elisp script to run in batch, make sure your elisp file is:

How to start emacs on a Mac from command line?

If you are on a Mac, call it from the command line like this:

/Applications/Emacs.app/Contents/MacOS/Emacs --script=name.el

Elisp, scripts