From ea7055cebed109844a77a9b0a3c2e41d01725f95 Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Fri, 17 May 2024 19:49:09 -0500 Subject: [PATCH] Continue the metaphor --- lisp/org-config/my-org-capture-shouldnt-mess-windows.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-config/my-org-capture-shouldnt-mess-windows.el b/lisp/org-config/my-org-capture-shouldnt-mess-windows.el index 071be32..7a3d739 100644 --- a/lisp/org-config/my-org-capture-shouldnt-mess-windows.el +++ b/lisp/org-config/my-org-capture-shouldnt-mess-windows.el @@ -45,8 +45,9 @@ ;; This basically means that we don't change window configurations when ;; there are previous buffers to be seen. IDK if this will have unintended ;; consequences, because... - (when (zerop (length (window-prev-buffers))) - (delete-window)) + (if (zerop (length (window-prev-buffers))) + (delete-window) + (previous-buffer)) ;; current-window-configuration will encode a buffer that's about to be ;; deleted. I tested it, and it does what I want, so maybe there's no ;; problem?