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.
Asked
Active
Viewed 166 times
5
2 Answers
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.