I have a custom layout, which I can open with SPC l o f. Is there a way to start Emacs with a flag that would automatically load it at startup? I tried this way: emacs --eval '(persp-switch "Asd")' but it yields an error: Wrong type argument: hash-table-p, nil. I've also tried with "Default" with the same result.

1 Answer 1


you can't switch perspectives until the according elisp code is loaded… and command-line evals are evaluated immediately, before anything else. so don't do it as an eval in the cmd line, but do it as the last command in ~/.emacs.d/init.el.

  • …correction: as the last command in ~/.emacs.d/init.el.
    – kuli
    Commented Oct 17, 2017 at 0:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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