From e2608cbdd54de0630c846a8119e5127e66e9b53a Mon Sep 17 00:00:00 2001 From: TEC Date: Tue, 20 Sep 2022 22:11:14 +0800 Subject: [PATCH] tweak(literate): clear the tangle output buffer While this is a hidden buffer, it's raised when an error occurs. In such situations, it can be a little confusing to see the result of every tangle to date instead of just the last tangle. It's easy enough to simple clear the buffer at the start of the tangle process. --- modules/config/literate/autoload.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/config/literate/autoload.el b/modules/config/literate/autoload.el index 47d4d6dea..a2798a546 100644 --- a/modules/config/literate/autoload.el +++ b/modules/config/literate/autoload.el @@ -68,7 +68,10 @@ +literate-tangle--async-proc ;; See `+literate-tangle--sync' for an explanation of the (progn ...) below. (start-process "tangle-config" - (get-buffer-create " *tangle config*") + (with-current-buffer + (get-buffer-create " *tangle config*") + (erase-buffer) + (current-buffer)) "emacs" "--batch" "-L" (file-name-directory (locate-library "org")) "--load" (doom-path doom-core-dir "doom")