组织捕获:Todo转到默认捕获文件 [英] Org-capture: Todo goes to default capture file

查看:84
本文介绍了组织捕获:Todo转到默认捕获文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 .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")
   )
)

Cc c 显示捕获菜单缓冲区。然后按 t 并捕获显示的缓冲区( CAPTURE-notes.org )。在 Cc Cc 之后,该条目将添加到 notes.org 而不是 nextactions.org 部分收件箱。

C-c c presents the capture menu buffer. I press then t and capture the buffer that appears (CAPTURE-notes.org). After C-c C-c the entry is added to notes.org instead of nextactions.org section "Inbox".

我没有 .emacs 的解析错误,如何解决此问题,以便待办事项捕获-模板将其条目放入 nextactions.org

I have no .emacs parsing errors, how can I fix this so the todo capture-template puts its entry in nextactions.org?

编辑:设置 org-default-notes-file nextactions.org 允许我至少操作第一个组织捕获模板(因为它的文件是还是一样)。第二个保持写入默认注释文件

Setting org-default-notes-file to nextactions.org lets me operate at least the first org-capture template (because its file is the same anyway). The second one stays writing to the default-notes-file.

推荐答案

您使用的是哪种组织模式版本?我不记得确切的版本,但在此之前未评估引用的捕获模板。

What org-mode version are you using? I don't remember the exact version, but quoted capture templates were not eval'ed before that.

因此,您应该尝试其中任何一个

So you should try either


  • 更新组织模式

  • 使用反引号

  • Update org-mode
  • use backquotes

(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")
    ))


  • 使用原义文件路径

  • use the literal filepath

    (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")
        ))
    


  • 除此之外,我认为没有问题在您的配置中,我使用了类似的配置。

    Apart from that I see no problem with your config, I use a similar one.

    这篇关于组织捕获:Todo转到默认捕获文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆