From 4bc65a3f788410079251a70cf1590b108456966e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 6 Sep 2019 15:37:40 -0400 Subject: [PATCH] Prevent C-c C-p sandbox from loading private modules And don't change doom-private-dir, as it isn't necessary and it affects the purity of the test environment. --- core/autoload/debug.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/autoload/debug.el b/core/autoload/debug.el index 0d8753064..636bf3e06 100644 --- a/core/autoload/debug.el +++ b/core/autoload/debug.el @@ -201,24 +201,23 @@ markdown and copies it to your clipboard, ready to be pasted into bug reports!" (setq-default buffer-undo-tree (make-undo-tree)))) (pcase mode (`vanilla-doom+ ; Doom core + modules - private config - `((setq doom-private-dir "/tmp/does/not/exist") + `((setq doom-init-modules-p t) (load-file ,user-init-file) (setq doom-modules ',doom-modules) (maphash (lambda (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) - (load! "init" (plist-get plist :path) t))) + (load! "init" (doom-module-locate-path (car key) (cdr key)) 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))) + (load! "config" (doom-module-locate-path (car key) (cdr key)) t))) doom-modules) (run-hook-wrapped 'doom-init-modules-hook #'doom-try-run-hook) (doom-run-all-startup-hooks-h))) (`vanilla-doom ; only Doom core - `((setq doom-private-dir "/tmp/does/not/exist" - doom-init-modules-p t) + `((setq doom-init-modules-p t) (load-file ,user-init-file) (doom-run-all-startup-hooks-h))) (`vanilla ; nothing loaded