diff --git a/modules/org/org-capture/autoload/org-capture.el b/modules/org/org-capture/autoload/org-capture.el index 77137d4b9..2c884357a 100644 --- a/modules/org/org-capture/autoload/org-capture.el +++ b/modules/org/org-capture/autoload/org-capture.el @@ -26,8 +26,7 @@ Uses the capture template specified by KEY. Otherwise, prompts you for one." (window-system . ,(cond (IS-MAC 'ns) (IS-LINUX 'x) (t 'w32))) - ,(when IS-LINUX - '(display . ":0"))) + ,(if IS-LINUX '(display . ":0"))) "TODO") ;;;###autoload diff --git a/modules/org/org-capture/config.el b/modules/org/org-capture/config.el index 80c6b6fe0..d52f60b7e 100644 --- a/modules/org/org-capture/config.el +++ b/modules/org/org-capture/config.el @@ -1,5 +1,7 @@ ;;; org/org-capture/config.el -*- lexical-binding: t; -*- +(add-hook 'org-load-hook #'+org-capture|init t) + ;; Sets up two `org-capture' workflows that I like: ;; ;; 1. The traditional way: invoking `org-capture' directly (or through a @@ -20,9 +22,11 @@ (file+headline org-default-notes-file "Inbox") "* %u %?\n%i" :prepend t :kill-buffer t))) -(add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame) -(when (featurep! :feature evil) - (add-hook 'org-capture-mode-hook #'evil-insert-state)) +(defun +org-capture|init () + (add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame) -(when (featurep! :ui doom-dashboard) - (add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p)) + (when (featurep! :feature evil) + (add-hook 'org-capture-mode-hook #'evil-insert-state)) + + (when (featurep! :ui doom-dashboard) + (add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p)))