我的.emacs
:
;; enable orgmode en set files
(require 'org-install)
(setq org-directory "~/Dropbox/GTD/")
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)
(setq org-agenda-files (list (concat org-directory "nextactions.org")
(concat org-directory "projects.org")
(concat org-directory "birthday.org")))
;; Daily action list
(setq org-agenda-custom-commands
'(
("D" "Daily Action List"
(
(agenda "" ((org-agenda-ndays 1)
(org-agenda-sorting-strategy
(quote ((agenda time-up priority-down tag-up) )))
(org-deadline-warning-days 0)
))))
;; Office list
("H" "Office and Home Lists"
((agenda)
(tags-todo "OFFICE")
(tags-todo "HOME")))
)
)
;; Turn on diary within org-mode
(setq org-agenda-include-diary t)
;; Turn on Capture
(setq org-default-notes-file (concat org-directory "notes.org"))
(define-key global-map "\C-cc" 'org-capture)
;; Capture templates
(setq org-capture-templates
'(
("t" "Todo" entry (file+headline (concat org-directory "nextactions.org") "Inbox") "* TODO %?\n %i\n %a")
("j" "Journal" entry (file+datetree (concat org-directory "journal.org")) "* %?\nEntered on %U\n %i\n %a")
)
)
C-c c 表示捕获菜单缓冲区。然后按t
并捕获出现的缓冲区(CAPTURE-notes.org
)。在 C-c C-c 之后,该条目将添加到notes.org
而不是nextactions.org
部分“收件箱”。
我没有.emacs
解析错误,我该如何修复此问题,以便todo capture-template将其条目放入nextactions.org
?
编辑:将org-default-notes-file
设置为nextactions.org
可让我至少操作第一个组织捕获模板(因为它的文件无论如何都是相同的)。第二个是写default-notes-file
。
答案 0 :(得分:3)
您使用的是哪种组织模式?我不记得确切的版本,但引用的捕获模板在此之前没有被评估。
所以你应该尝试
使用反引号
(setq org-capture-templates
`(("t" "Todo" entry (file+headline ,(concat org-directory "nextactions.org")
"Inbox")
"* TODO %?\n %i\n %a")
("j" "Journal" entry (file+datetree ,(concat org-directory "journal.org"))
"* %?\nEntered on %U\n %i\n %a")
))
使用文字文件路径
(setq org-capture-templates
'(("t" "Todo" entry (file+headline "~/Dropbox/GTD/nextactions.org"
"Inbox")
"* TODO %?\n %i\n %a")
("j" "Journal" entry (file+datetree "~/Dropbox/GTD/journal.org")
"* %?\nEntered on %U\n %i\n %a")
))
除此之外,我发现您的配置没有任何问题,我使用了类似的配置。
答案 1 :(得分:1)