Org-mode mailing list
 help / color / mirror / Atom feed
* [PATCH] Bug fix: delete indirect buffer's window only when it exists.
@ 2013-01-21 17:21 Muchenxuan Tong
  2013-01-21 18:18 ` Achim Gratz
  0 siblings, 1 reply; 5+ messages in thread
From: Muchenxuan Tong @ 2013-01-21 17:21 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-22 13:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-21 17:21 [PATCH] Bug fix: delete indirect buffer's window only when it exists Muchenxuan Tong
2013-01-21 18:18 ` Achim Gratz
2013-01-22  7:42   ` Muchenxuan Tong
2013-01-22 13:25     ` Bastien
2013-01-22 13:31       ` Muchenxuan Tong

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git