org-agenda-exit: Check column view

* lisp/org-agenda.el (org-agenda-exit): Exit column view before trying to
  exit agenda.

Running org-agenda-exit in column view deleted all buffers loaded by the
agenda, but it didn't actually exit the agenda because, if the agenda is
in column view, org-agenda-Quit turns off column view instead of killing
the agenda.  So org-agenda-exit should either just quit column view if
it is active (and not delete the loaded buffers or quit the agenda) or
make sure that the agenda is not in column view before killing it.
Since org-agenda-Quit and org-agenda-quit already do the former, make
org-agenda-exit completely exit the agenda regardless of whether it is
in column view.
This commit is contained in:
Kyle Meyer 2015-01-02 17:38:24 -05:00 committed by Nicolas Goaziou
parent 424eb55263
commit 722a574d88

View file

@ -7244,8 +7244,10 @@ agenda."
"Exit the agenda, killing Org buffers loaded by the agenda.
Like `org-agenda-Quit', but kill any buffers that were created by
the agenda. Org buffers visited directly by the user will not be
touched."
touched. Also, exit the agenda even if it is in column view."
(interactive)
(when org-agenda-columns-active
(org-columns-quit))
(org-release-buffers org-agenda-new-buffers)
(setq org-agenda-new-buffers nil)
(org-agenda-Quit))