5

Is it possible to set a customizable variable when I start Emacs? E.g. I have a project name variable, which I usually set interactively using M-x customize-variable, but I'd like to set it already when starting Emacs. I.e. so I can choose a project from the command line.

wonea
  • 1,877
Arne
  • 889

2 Answers2

8

You can run

emacs --eval '(setq variable-name value)'

to do this. Or you could edit your settings file in such a way that it reads the customization from some environment variable, and set that on the command line.

MvG
  • 1,519
0

This does not answer the question as asked, but "automatically set a project name variable" sounds quite a lot like a job for Projectile.