emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [PATCH] Bug fix: delete indirect buffer's window only when it exists


From: Muchenxuan Tong
Subject: [O] [PATCH] Bug fix: delete indirect buffer's window only when it exists.
Date: Tue, 22 Jan 2013 01:21:44 +0800

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..530e79a 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6989,7 +6989,9 @@ 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)))
+      (when-let (org-last-indirect-window
+ (get-buffer-window org-last-indirect-buffer))
+ (delete-window org-last-indirect-window)))
   (if org-agenda-columns-active
       (org-columns-quit)
     (if org-agenda-sticky



reply via email to

[Prev in Thread] Current Thread [Next in Thread]