Skip to content

Commit

Permalink
Move org related code to their place
Browse files Browse the repository at this point in the history
  • Loading branch information
chuxubank committed Apr 24, 2024
1 parent 0355ee8 commit efb788b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cats/+autodark.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
(add-hook 'cat-dark-mode-hook #'doom-dark-theme)
(add-hook 'cat-light-mode-hook #'doom-light-theme)))

(with-eval-after-load 'org
(add-hook 'cat-theme-refresh-hook #'+org-buffers-refresh))

(defun cat-dark-mode-p ()
(cond
(IS-WSL (string-match-p "-Darker" (getenv "GTK_THEME")))
Expand Down Expand Up @@ -46,10 +43,3 @@

(when IS-MACPLUS
(add-hook 'ns-system-appearance-change-functions #'cat-load-theme))

(defun +org-buffers-refresh ()
"Save and revert all org buffers without confirm."
(interactive)
(org-save-all-org-buffers)
(+no-confirm #'org-revert-all-org-buffers)
(org-element-update-syntax))
8 changes: 8 additions & 0 deletions cats/+org.el
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
:pin gnu
:delight
(org-cdlatex-mode "")
:init
(defun +org-buffers-refresh ()
"Save and revert all org buffers without confirm."
(interactive)
(org-save-all-org-buffers)
(+no-confirm #'org-revert-all-org-buffers)
(org-element-update-syntax))
:custom
(org-directory cat-org-directory)
(org-agenda-files (list cat-org-directory))
Expand Down Expand Up @@ -70,6 +77,7 @@
(plantuml . t)
(awk . t)))
(add-to-list 'org-modules 'org-habit)
(add-hook 'cat-theme-refresh-hook #'+org-buffers-refresh)
(require 'server)
(require 'org-protocol))

Expand Down

0 comments on commit efb788b

Please sign in to comment.