Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I detect whether Emacs is running in batch mode?

Sometimes I want to run emacs in batch mode, and in such cases I want to avoid doing certain things in my init, such as starting the emacs server. Is there any way to test from within Emacs Lisp whether Emacs is running in batch mode?

like image 813
Ryan C. Thompson Avatar asked Aug 08 '14 00:08

Ryan C. Thompson


1 Answers

From http://www.gnu.org/software/emacs/manual/html_node/elisp/Batch-Mode.html

-- Variable: noninteractive

This variable is non-nil when Emacs is running in batch mode. 
like image 115
Jordon Biondo Avatar answered Sep 26 '22 01:09

Jordon Biondo