mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-09-12 04:39:59 +00:00
org-agenda.el: Fix bug about restoring existing window conf
* org-agenda.el (org-prepare-agenda-window): Use `org-pre-agenda-window-conf' if already set. (org-agenda-Quit): Set `org-pre-agenda-window-conf' to nil when quitting. (org-agenda-quit): Ditto. Thanks to Moritz Ulrich for reporting a bug about this.
This commit is contained in:
parent
dd31878ee7
commit
d44b56e81e
|
@ -3334,7 +3334,8 @@ generating a new one."
|
||||||
;; buffer via elisp link
|
;; buffer via elisp link
|
||||||
(unless (equal (current-buffer) abuf)
|
(unless (equal (current-buffer) abuf)
|
||||||
(org-pop-to-buffer-same-window abuf))
|
(org-pop-to-buffer-same-window abuf))
|
||||||
(setq org-pre-agenda-window-conf wconf)))
|
(setq org-pre-agenda-window-conf
|
||||||
|
(or org-pre-agenda-window-conf wconf))))
|
||||||
|
|
||||||
(defun org-prepare-agenda (&optional name)
|
(defun org-prepare-agenda (&optional name)
|
||||||
(if (org-agenda-use-sticky-p)
|
(if (org-agenda-use-sticky-p)
|
||||||
|
@ -6470,7 +6471,8 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
|
||||||
(and org-agenda-restore-windows-after-quit
|
(and org-agenda-restore-windows-after-quit
|
||||||
(not (eq org-agenda-window-setup 'other-frame))
|
(not (eq org-agenda-window-setup 'other-frame))
|
||||||
org-pre-agenda-window-conf
|
org-pre-agenda-window-conf
|
||||||
(set-window-configuration org-pre-agenda-window-conf))))
|
(set-window-configuration org-pre-agenda-window-conf)
|
||||||
|
(setq org-pre-agenda-window-conf nil))))
|
||||||
|
|
||||||
(defun org-agenda-quit ()
|
(defun org-agenda-quit ()
|
||||||
"Exit agenda by killing agenda buffer or burying it when
|
"Exit agenda by killing agenda buffer or burying it when
|
||||||
|
@ -6492,7 +6494,8 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
|
||||||
(and org-agenda-restore-windows-after-quit
|
(and org-agenda-restore-windows-after-quit
|
||||||
(not (eq org-agenda-window-setup 'other-frame))
|
(not (eq org-agenda-window-setup 'other-frame))
|
||||||
org-pre-agenda-window-conf
|
org-pre-agenda-window-conf
|
||||||
(set-window-configuration org-pre-agenda-window-conf))))
|
(set-window-configuration org-pre-agenda-window-conf)
|
||||||
|
(setq org-pre-agenda-window-conf nil))))
|
||||||
(org-agenda-Quit))))
|
(org-agenda-Quit))))
|
||||||
|
|
||||||
(defun org-agenda-exit ()
|
(defun org-agenda-exit ()
|
||||||
|
|
Loading…
Reference in a new issue