將資料夾中的所有組織文件載入到議程

將資料夾中的所有組織文件載入到議程

我找到了一個組織教程其中解釋瞭如何使用從資料夾載入組織文件

(setq org-agenda-files (list "~/org/work.org"
                             "~/org/school.org" 
                             "~/org/home.org"))

問題

有沒有辦法告訴 emacs 將給定資料夾上的所有 org 檔案載入到議程中?

答案1

受到亞倫給出的答案的啟發,我將配置更改為

(setq org-agenda-files (list "~/org"))

問題就解決了。

答案2

使用 Emacs 24.3 附帶的 Org 模式,來自C-h v org-agenda-files RET

If an entry is a directory, all files in that directory that are matched by
`org-agenda-file-regexp' will be part of the file list.

並來自C-h v org-agenda-file-regexp RET

org-agenda-file-regexp is a variable defined in 'org.el'.
Its value is "\\`[^.].*\\.org\\'"
[...]
You can customize this variable.

因此,簡而言之:評估(add-to-list 'org-agenda-files (expand-file-name "~/org")),如果您org-agenda-file-regexp採用預設值,Org 模式將從任何名稱~/org.org. (如果您的org-agenda-file-regexp不是預設值,或者您需要它不僅僅匹配名稱以 結尾的文件.org,則可以透過 自訂它以滿足您的需求M-x customize-variable RET org-agenda-file-regexp RET。)

相關內容