From 02a4f6b573f9630aadbfbc03fae7399ac80182ec Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sun, 5 Jan 2020 11:25:21 +0800 Subject: [PATCH] Suppress delete-window in org related functions - If there's only one other window, delete-window would be called, instead of delete-other-windows - when there is only one window other than the popup, this other window is the main window in this frame, delete it would raise an error: `delete-window: Attempt to delete main window of frame ` --- modules/ui/popup/+hacks.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 20f9ce799..29ff92997 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -240,6 +240,8 @@ the command buffer." org-fast-todo-selection) (if +popup-mode (cl-letf (((symbol-function #'delete-other-windows) + (symbol-function #'ignore)) + ((symbol-function #'delete-window) (symbol-function #'ignore))) (apply orig-fn args)) (apply orig-fn args)))