org-capture-goto-target仅在我调用org-capture后才有效

时间:2016-03-07 21:25:17

标签: emacs elisp org-mode spacemacs

我制作了一个自定义函数,该函数转到捕获目标:

(defun inbox-goto()
  (interactive)
  (org-capture-goto-target "c"))

我调用org-capture后效果很好,但如果我尝试在新引导后立即使用它,它会给我“符号的函数定义为void:org-capture-goto-target”。

1 个答案:

答案 0 :(得分:1)

我很确定您的问题是org-capture是自动加载但org-capture-goto-target不是。最简单的解决方法可能是在require的定义中插入inbox-goto

(defun inbox-goto ()
  (interactive)
  (require 'org-capture)
  (org-capture-goto-target "c"))