mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
org/org-capture: refactor; fix early autoloading
This commit is contained in:
@ -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)
|
||||
(defun +org-capture|init ()
|
||||
(add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame)
|
||||
|
||||
(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))
|
||||
(when (featurep! :ui doom-dashboard)
|
||||
(add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p)))
|
||||
|
Reference in New Issue
Block a user