lang/org: defvar org-capture-templates
This prevents lang/org from overwriting user-defined org-capture-templates in their init.el.
This commit is contained in:
parent
7acb860cb6
commit
a9d71630da
1 changed files with 9 additions and 7 deletions
|
@ -13,17 +13,19 @@
|
||||||
(defvar +org-default-notes-file "notes.org"
|
(defvar +org-default-notes-file "notes.org"
|
||||||
"TODO")
|
"TODO")
|
||||||
|
|
||||||
(setq org-capture-templates
|
(defvar org-capture-templates
|
||||||
'(("t" "Todo" entry
|
'(("t" "Todo" entry
|
||||||
(file+headline (expand-file-name "todo.org" +org-dir) "Inbox")
|
(file+headline (expand-file-name "todo.org" +org-dir) "Inbox")
|
||||||
"* [ ] %?\n%i" :prepend t :kill-buffer t)
|
"* [ ] %?\n%i" :prepend t :kill-buffer t)
|
||||||
|
|
||||||
|
("n" "Notes" entry
|
||||||
|
(file+headline org-default-notes-file "Inbox")
|
||||||
|
"* %u %?\n%i" :prepend t :kill-buffer t)))
|
||||||
|
|
||||||
("n" "Notes" entry
|
|
||||||
(file+headline org-default-notes-file "Inbox")
|
|
||||||
"* %u %?\n%i" :prepend t :kill-buffer t)))
|
|
||||||
|
|
||||||
(after! org
|
(after! org
|
||||||
(defvaralias 'org-default-notes-file '+org-default-notes-file)
|
(defvaralias 'org-default-notes-file '+org-default-notes-file)
|
||||||
|
|
||||||
(setq org-default-notes-file (expand-file-name +org-default-notes-file +org-dir))
|
(setq org-default-notes-file (expand-file-name +org-default-notes-file +org-dir))
|
||||||
|
|
||||||
(add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame)
|
(add-hook 'org-capture-after-finalize-hook #'+org-capture|cleanup-frame)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue