summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@pmade.com>2009-02-27 17:17:12 -0700
committerCarsten Dominik <carsten.dominik@gmail.com>2009-03-01 17:18:35 +0100
commit8b38105040b581545d9ec7b28247dec04b299561 (patch)
treed522c0d0bc60148fc122c5381755e63398a2b984
parentc8fdb461d07a802b094827f82ea9b06e685ccebb (diff)
downloadorg-mode-8b38105040b581545d9ec7b28247dec04b299561.tar.gz
Conditionally delete windows in agenda quit
Before this patch, org-agenda-quit would delete the agenda window if the frame had more than one window. This patch changes that behavior slightly so that if org-agenda-window-setup is 'current-window, the agenda window won't be deleted.
-rwxr-xr-xlisp/ChangeLog3
-rw-r--r--lisp/org-agenda.el4
2 files changed, 6 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d463ba3..111aabe 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2009-03-01 Carsten Dominik <carsten.dominik@gmail.com>
+ * org-agenda.el (org-agenda-quit): Delete window only when the
+ frame-setup was not `current-window'.
+
* org.el (org-tag-persistent-alist): New option.
(org-startup-options): Add keyword `noptag'.
(org-fast-todo-selection): Handle :newline correctly.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 3fb7baf..dbfa5f6 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4455,7 +4455,9 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
(if org-agenda-columns-active
(org-columns-quit)
(let ((buf (current-buffer)))
- (if (not (one-window-p)) (delete-window))
+ (and (not (eq org-agenda-window-setup 'current-window))
+ (not (one-window-p))
+ (delete-window))
(kill-buffer buf)
(org-agenda-reset-markers)
(org-columns-remove-overlays)