I'm trying to understand the difference between this two lines of code:
emacs --batch -l package.el
emacs -l package.el
Thanks a lot. Why -batch is needed here?
The -batch
command line option stops Emacs from opening an editor window. This allows you to write scripts in Emacs Lisp, scripts that you otherwise would have used Ruby, Perl, or Python for.
Just out of the hat, an example that use the -batch option is e2ansi, a package that allows the more
and less
command to render a file with colors using ANSI sequences, based on the syntax highlighting Emacs performs. Clearly, this would not have worked if Emacs would have opened up a window when started.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With