1

Inspired by the question Launch emacs with ediff-files (of ediff-directories) from command line and the answer https://emacs.stackexchange.com/a/3623/2609, I tried

emacs --eval '(set-background-color "green")'

from an MS DOS prompt without sucess. What is wrong with this? I also tried with the argument -Q but it doesn't change. I should mention that it works well if I execute it from an eshell inside emacs.

Name
  • 7,689
  • 4
  • 38
  • 84

1 Answers1

2

DOS does not recognize ' ' as quotes.

You will have to use the following:

emacs --eval "(set-background-color \"green\")"

Powershell works a little closer to what you expect:

emacs --eval '(set-background-color \"green\")'

But it too requires \ before the " to properly escape them.

Jonathan Leech-Pepin
  • 4,307
  • 1
  • 19
  • 32