mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(org): error trying to kill dead agenda buffers
It may happen that org-agenda-new-buffers contains a killed buffer.
This commit is contained in:
@ -705,9 +705,10 @@ the user tries to visit one of these buffers they'll see a gimped, half-broken
|
||||
org buffer. To avoid that, restart `org-mode' when they're switched to so they
|
||||
can grow up to be fully-fledged org-mode buffers."
|
||||
(dolist (buffer org-agenda-new-buffers)
|
||||
(with-current-buffer buffer
|
||||
(add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h
|
||||
nil 'local)))))
|
||||
(when (buffer-live-p buffer) ; Ensure buffer is not killed
|
||||
(with-current-buffer buffer
|
||||
(add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h
|
||||
nil 'local))))))
|
||||
|
||||
(defvar recentf-exclude)
|
||||
(defadvice! +org--optimize-backgrounded-agenda-buffers-a (fn file)
|
||||
|
Reference in New Issue
Block a user