lang/org: don't auto-kill agenda buffers #429

There is always doom/cleanup-session or :cleanup as an alternative.
This commit is contained in:
Henrik Lissner 2018-02-28 17:18:14 -05:00
parent 963c809c70
commit c595fe2eb8
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -283,14 +283,6 @@ between the two."
;; Don't open separate windows
(map-put org-link-frame-setup 'file 'find-file)
(defun +org|cleanup-agenda-files ()
"Close leftover agenda buffers after they've been indexed by org-agenda."
(cl-loop for file in org-agenda-files
for buf = (get-file-buffer file)
if (and file (not (get-buffer-window buf)))
do (kill-buffer buf)))
(add-hook 'org-agenda-finalize-hook #'+org|cleanup-agenda-files)
;; Let OS decide what to do with files when opened
(setq org-file-apps
`(("pdf" . default)