0

I have enabled dotspacemacs-auto-resume-layouts in .spacemacs file. I created a new layout named acme and quit spacemacs.
Now when I start spacemacs again, I am presented with the default screen (showing the spacemacs banner and recent projects and files). I have to switch to the layout I want using SPC l 2.

Is there a way I can tell spacemacs to load the acme layout by default? Or maybe programmatically switch to the layout by adding some function calls in user-config part of .spacemacs?

3
  • I have also tried adding (persp-switch 'acme) to .spacemacs but it throws an error
    – Ashish
    Jun 23 at 6:22
  • Where did you add? dotspacemacs/user-config? Jun 23 at 7:02
  • @TianshuWang Yes. In the file .spacemacs, function dotspacemacs/user-config. I got the error "Error in dotspacemacs/user-config: Wrong type argument: hash-table-p, nil"
    – Ashish
    Jun 23 at 7:29

1 Answer 1

0

Try to put the following in your user-config, Though I don't know why it open *scratch* buffer

(add-hook 'persp-mode-hook
            (lambda ()
              (persp-load-state-from-file)
              (persp-switch "@Spacemacs")))

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.