我一直在试图提升我的Org技能。其中一个任务是整理清单项。我通常喜欢使用清单项,主要原因是-不会弄乱我的内容视图,并且可以得到真正的大纲,考虑到我有多少个任务。
然而,当我尝试将使用捕获系统创建的列表项整理时,我会出现错误-我不被允许这样做,因为这“没有意义”。
有没有办法覆盖这种行为?
编辑: 目前,我只能整理条目(即标题),然后手动将它们转换为列表项。我想知道是否有更好的解决方案...
我在org-capture.el中找到了这个函数:
我该如何去除
然而,当我尝试将使用捕获系统创建的列表项整理时,我会出现错误-我不被允许这样做,因为这“没有意义”。
有没有办法覆盖这种行为?
编辑: 目前,我只能整理条目(即标题),然后手动将它们转换为列表项。我想知道是否有更好的解决方案...
我在org-capture.el中找到了这个函数:
(defun org-capture-refile ()
"Finalize the current capture and then refile the entry.
Refiling is done from the base buffer, because the indirect buffer is then
already gone. Any prefix argument will be passed to the refile command."
(interactive)
(unless (eq (org-capture-get :type 'local) 'entry)
(error
"Refiling from a capture buffer makes only sense for `entry'-type templates"))
(let ((pos (point))
(base (buffer-base-buffer (current-buffer)))
(org-refile-for-capture t))
(org-capture-finalize)
(save-window-excursion
(with-current-buffer (or base (current-buffer))
(save-excursion
(save-restriction
(widen)
(goto-char pos)
(call-interactively 'org-refile)))))))
我该如何去除
(unless (eq (org-capture-get :type 'local) 'entry)
这一部分,以使其生效?
编辑:12年10月23日
到目前为止,我已经成功让它工作了:
(defun narrow-and-reveal ()
"Narrow and reveal all content"
(org-narrow-to-subtree)
(org-show-subtree)
)
(defun widen-and-outline ()
"Widen and move to beginning of file"
(widen)
(beginning-of-buffer)
(org-overview)
(org-content)
)
(defun org-goto-symbol ()
"Will navigate to the symbol at the current point of the cursor"
(widen-and-outline)
(interactive)
(let ((current-prefix-arg 4)) ;; emulate C-u
(call-interactively 'org-refile)) ;; invoke org-refile interactively
(narrow-and-reveal)
)
(defun custom-org-prompt-headline ()
(org-goto-symbol) ;; invoke org-refile interactively
(end-of-buffer))
(setq org-capture-templates`(
("t" "ToDo" item (file+function (concat org-directory "ToDo.org") custom-org-prompt-headline))))
但是在输入列表项之前,它会提示我文件中的节,我觉得有些分散注意力。我希望能有重新归档列表项的选项。我想这应该不难实现,是吗?
C-c C-w
而不是在写完笔记后使用C-c C-c
来重新归档,这难道不是你的解决方案吗?虽然我不擅长elisp,但我不明白你试图实现的功能与现有功能的区别。 - Nikana Reklawyks