diff --git a/workflows/org-custom.el b/workflows/org-custom.el index d7c4eff..0d1b1fc 100644 --- a/workflows/org-custom.el +++ b/workflows/org-custom.el @@ -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