怎么在doom框架下中自定义capture模版?

org

#1

配置步骤

  1. +org.el 中使用 org-capture-templates 定义的org-capture模版

(setq org-capture-templates nil) ;; Quick capture todo item to inbox (add-to-list 'org-capture-templates '(“t” “Todo” entry (file “~/hsg/hugo/org-notes/inbox.org”) (file “~/.doom.d/templates/new-todo-template.org”)))

  1. 加载配置:config.el (after! org (load! "+org"))
  2. doom刷新: doom refresh
  3. 使用 SPC C ,但是 无法显示

问题详见issue


#2

首先你试下把所有 配置都加到(after! org )块里,所有 和org有关的配置都应该在after! org块中,否则会有各种莫名奇妙的问题。如果加了不行,再尝试别的办法。


#3

我是这样写的

(after! org (setq org-directory "/home/abcdlsj/Dropbox/org/"))
(after! org (setq org-capture-templates nil))
(after! org (add-to-list 'org-capture-templates
                         '("t" "Task To Do!" entry
                           (file+headline "~/Dropbox/org/task.org" "GTD")
                           "* TODO %^{Task Name:}\n%u\n%a\n" :clock-in t :clock-resume t)))
(after! org (add-to-list 'org-capture-templates
                         '("r" "Book Reading Task" entry
                           (file+headline "~/Dropbox/org/task.org" "Reading")
                           "* TODO %^{Book Name:}\n%u\n%a\n" :clock-in t :clock-resume t)))
(after! org (add-to-list 'org-capture-templates
                         '("j" "Journal!!!" entry
                           (file+olp+datetree "~/Dropbox/org/journal.org")
                           "* %U - %^{heading} %^g\n %?\n" :tree-type week)))
(after! org (add-to-list 'org-capture-templates
                         '("n" "Notes!!!" entry
                           (file+headline "~/Dropbox/org/notes.org" "NOTES")
                           "* %^{heading} %t %^g\n  %?\n")))

#4

一个after!就搞定的事,非要拆成6个,你这……倒也没啥不行的


#5

哈哈,这是之前还不懂写的。。一直没改就用的这个