How can I pass arguments -q -d -Q -t -L -fg -bg --color etc?
Doing something like emacs --script -Q definetely wil
If you run emacs in script mode, I would recommend to reset "argv" variable to nil in the end of your script, otherwise emacs will try interpret "argv" after script is finished.
Let's assuming you have a file named "test-emacs-script.el" with the following content:
#!/usr/bin/emacs --script
(print argv)
(setq argv nil)
Try running this script as "./test-emacs-script.el -a". If you run this script without resettings "argv" (last line in the script) then the output will be:
("-a")
Unknown option `-a'
Resetting "argv" gets rid of "unknown option" error message