org/org-capture: refactor; fix early autoloading
This commit is contained in:
parent
8ce10af094
commit
4c148ea580
2 changed files with 10 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue