在的.emacs我添加链接ORG-文件ORG-议程文件
(org-agenda-files (quote ("d:/GTD/a.org" "d:/GTD/b.org" "d:/GTD/c.org")))
在这三种文件,我可以有链接到其他组织文件。是否有可能(使用当前的缓冲区)扫描a.org,b.org,c.org并添加链接到org-agenda-files?
更新1
有一种可能性。链接文件位于几个定义良好的文件夹中。在How to add .org files under org-directory to agenda是如何添加所有文件的说明。有什么方法可以将仅链接到a.org,b.org,c.org?中的链接添加到组织机构的议程文件中。
更新2
我不知道为什么,但功能的增加(互动)之后,在Emacs变得可见。该函数的全码:
(defun add-links-to-org-agenda-files()
(interactive)
(org-element-map
(org-element-parse-buffer)
'link
(lambda (x)
(if (equal (org-element-property :type x) "file")
(add-to-list 'org-agenda-files (org-element-property :path x))))))
问候
Krzysiek
重新:交互式 - 一个交互功能(也叫做“命令”)可使用'的Mx command'被执行,而一个非交互功能只能使用'M-被执行:(功能)' - 看到的Emacs Lisp手册了解更多细节,特别是[本节](https://www.gnu.org/software/emacs/manual/html_node/elisp/Using-Interactive.html#Using-Interactive)和[这个SO问题](http ://stackoverflow.com/questions/12585670/relationship-between-emacs-functions-and-commands)。 – Nick