mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-16 15:56:52 -05:00
lang/org: general refactor; split init into hooks
lang/org's initialization process is now split up into hooks on org-load-hook. This approach is cleaner and easier to customize. I also removed the escape binding in org-agenda-mode-map, as the popup system makes it redundant.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
;;; lang/org/+capture.el -*- lexical-binding: t; -*-
|
||||
|
||||
(add-hook 'org-load-hook #'+org|init-capture)
|
||||
|
||||
;; Sets up two `org-capture' workflows that I like:
|
||||
;;
|
||||
;; 1. The traditional way: invoking `org-capture' directly (or through a
|
||||
@@ -26,11 +28,11 @@
|
||||
"* %u %?\n%i" :prepend t :kill-buffer t)))
|
||||
|
||||
|
||||
(after! org
|
||||
(defun +org|init-capture ()
|
||||
(defvaralias 'org-default-notes-file '+org-default-notes-file)
|
||||
|
||||
(setq org-default-notes-file (expand-file-name +org-default-notes-file +org-dir)
|
||||
+org-default-todo-file (expand-file-name +org-default-todo-file +org-dir))
|
||||
+org-default-todo-file (expand-file-name +org-default-todo-file +org-dir))
|
||||
|
||||
(add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame)
|
||||
|
||||
|
Reference in New Issue
Block a user