Don't side tree preview buffers, revert smarter

This commit is contained in:
BirDt_ 2025-08-21 17:00:00 +08:00
parent df29b3c7c8
commit 61409ef458

View file

@ -75,11 +75,13 @@
)
(defun theurgy-refresh-org-files ()
"Alternative to revert-all-org-buffers, which is a bit more intelligent."
"Revert all agenda file buffers in the background."
(interactive)
(dolist (f org-agenda-files)
(with-current-buffer (find-file-noselect f t)
(revert-buffer t t))))
(let ((buf (find-buffer-visiting f)))
(when buf
(with-current-buffer buf
(revert-buffer :ignore-auto :noconfirm))))))
(theurgy-refresh-org-files)
@ -106,7 +108,7 @@
;; Side tree
(defun conditional-side-tree ()
(when (not (string-match-p "\\*capture\\*\\|CAPTURE-\\|scratch\\*" (buffer-name)))
(when (not (string-match-p "\\*capture\\*\\|CAPTURE-\\|scratch\\*\\|\\[Preview\\]" (buffer-name)))
(org-side-tree)))
(use-package org-side-tree