Achim Gratz <Stromeko <at> nexgo.de> writes: > > Muchenxuan Tong writes: > > Bug fix: delete indirect buffer's window only when it exists. > > * org-agenda.el (org-agenda-quit): Delete indirect buffer's window > > only when it exists. > > Introduces a new bug: when-let is not defined in GNU Emacs. > > Regards, > Achim.
Thanks for pointing out. It's my fault, when-let is defined in slime.el and not the Emacs core library. The following patch should be OK: ---- Bug fix: delete indirect buffer's window only when it exists. * org-agenda.el (org-agenda-quit): Delete indirect buffer's window only when it exists. When indirect buffer's window doesn't exist, the original logic will delete the current window. TINYCHANGE diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index f48ff6f..8b9ae81 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6989,7 +6989,10 @@ When `org-agenda-sticky' is non-nil, only bury the agenda." (interactive) (if (and (eq org-indirect-buffer-display 'other-window) org-last-indirect-buffer) - (delete-window (get-buffer-window org-last-indirect-buffer))) + (let ((org-last-indirect-window + (get-buffer-window org-last-indirect-buffer))) + (if org-last-indirect-window + (delete-window org-last-indirect-window)))) (if org-agenda-columns-active (org-columns-quit) (if org-agenda-sticky