Some commands expect temporary org agenda buffers (opened by org-agenda) to remain open, so instead of proactively killing them we remap org-agenda-quit and org-agenda-Quit to org-agenda-exit, which does that for us at a more appropriate time: when closing the agenda.
This commit is contained in:
parent
8527897c88
commit
de223e7398
1 changed files with 6 additions and 2 deletions
|
@ -464,7 +464,7 @@ eldoc string."
|
|||
"Prevent temporarily-opened agenda buffers from being associated with the
|
||||
current workspace (and clean them up)."
|
||||
(when (and org-agenda-new-buffers (bound-and-true-p persp-mode))
|
||||
(let ((persp-autokill-buffer-on-remove t))
|
||||
(let (persp-autokill-buffer-on-remove)
|
||||
(persp-remove-buffer org-agenda-new-buffers
|
||||
(get-current-persp)
|
||||
nil)))))
|
||||
|
@ -603,7 +603,11 @@ between the two."
|
|||
:keymap (make-sparse-keymap))
|
||||
(add-hook 'org-agenda-mode-hook #'org-agenda-localleader-mode)
|
||||
|
||||
(map! :map org-agenda-localleader-mode-map
|
||||
(map! :map org-agenda-mode-map
|
||||
;; Always clean up after itself
|
||||
[remap org-agenda-quit] #'org-agenda-exit
|
||||
[remap org-agenda-Quit] #'org-agenda-exit
|
||||
:map org-agenda-localleader-mode-map
|
||||
:localleader
|
||||
"d" #'org-agenda-deadline
|
||||
"q" #'org-agenda-set-tags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue