Fix vanilla-doom+ launcher in sandbox (C-c C-p)

vanilla-doom+ should launch an instance of Doom with doom core plus
modules minus your private config loaded.
This commit is contained in:
Henrik Lissner 2019-06-30 13:18:14 +02:00
parent 8de5e98905
commit 58299341b8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -142,16 +142,33 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!"
(insert (insert
(prin1-to-string (prin1-to-string
(macroexp-progn (macroexp-progn
(append `((setq debug-on-error t (append `((setq noninteractive nil
debug-on-error t
package--init-file-ensured t package--init-file-ensured t
package-user-dir ,package-user-dir package-user-dir ,package-user-dir
package-archives ',package-archives package-archives ',package-archives
user-emacs-directory ,doom-emacs-dir user-emacs-directory ,doom-emacs-dir
doom-modules ,doom-modules)) doom-modules-cache nil
doom-modules ',doom-modules))
(pcase mode (pcase mode
(`vanilla-doom+ ; Doom core + modules - private config (`vanilla-doom+ ; Doom core + modules - private config
`((setq doom-private-dir "/tmp/does/not/exist") `((setq doom-private-dir "/tmp/does/not/exist")
(load-file ,user-init-file) (load-file ,user-init-file)
(after! undo-tree
;; undo-tree throws errors because `buffer-undo-tree'
;; isn't corrrectly initialized
(setq-default buffer-undo-tree (make-undo-tree)))
(maphash (lambda (key plist)
(let ((doom--current-module key)
(doom--current-flags (plist-get plist :flags)))
(load! "init" (plist-get plist :path) t)))
doom-modules)
(maphash (lambda (key plist)
(let ((doom--current-module key)
(doom--current-flags (plist-get plist :flags)))
(load! "config" (plist-get plist :path) t)))
doom-modules)
(run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook)
(doom|run-all-startup-hooks))) (doom|run-all-startup-hooks)))
(`vanilla-doom ; only Doom core (`vanilla-doom ; only Doom core
`((setq doom-private-dir "/tmp/does/not/exist" `((setq doom-private-dir "/tmp/does/not/exist"