How do I evaluate multiple functions simultaneously using emacs --eval on command line? For example I want to combine the followings in a single command:

emacs --eval "(toggle-frame-maximized)"
emacs --eval "(sr-speedbar-toggle)"

I tried to wrap them together but all attempts failed. How do I do this?


Simply use (progn ). This should address your question:

emacs --eval "(progn (toggle-frame-maximized) (sr-speedbar-toggle))"

Please note that this does not execute the commands simultaneously (as you requested). It executes one command after another.

  • Or emacs -f toggle-frame-maximized -f sr-speedbar-toggle, and maybe multiple --eval works as well? – xuchunyang Dec 22 '16 at 4:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.