From 97d33cd641cba01cf533ffff39016ef3bb38a42c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 20 Jan 2026 17:59:38 -0500 Subject: [PATCH] fix: comp writing temp files to /tmp Should've been moved to doom-profile-cache-dir, but comp-run-async-workers was renamed to comp--run-async-workers in later versions of Emacs. --- lisp/doom.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/doom.el b/lisp/doom.el index cae854051..5e72a9c36 100644 --- a/lisp/doom.el +++ b/lisp/doom.el @@ -636,6 +636,8 @@ safely cleaned up with 'doom sync' or 'doom gc'." (let ((temporary-file-directory (expand-file-name "comp/" doom-profile-cache-dir))) (make-directory temporary-file-directory t) (apply fn args))) + ;; This is renamed in newer versions of Emacs. + (advice-add #'comp--run-async-workers :around #'comp-run-async-workers@dont-litter-tmpdir) (with-eval-after-load 'comp ;; HACK: On Emacs 30.0.92, `native-comp-jit-compilation-deny-list' was moved