如了个题…
这需要在每个文件中手动添加吧,能不能让文件夹的文件自动带上呢?
.dir-locals.el
里设置 org-file-tags
1 个赞
sed 写入
- 向已有文档添加标签
;; 将指定目录下所有 org 文档的标签替换成 awesome
(progn
(setq abs-no-name-space/file-folder-name "/将/我/改/成/路/J/名/称/")
(setq abs-no-name-space/file-folder-full-name nil)
(setq abs-no-name-space/file-to-process
(directory-files abs-no-name-space/file-folder-name nil ".org$" nil))
(setq abs-no-name-space/file-to-process
(cl-remove-if (lambda (k)
(string-match "^.#" k))
abs-no-name-space/file-to-process))
(setq abs-no-name-space/file-to-process (mapcar (lambda (str)
(concat abs-no-name-space/file-folder-name str))
abs-no-name-space/file-to-process))
(dolist (f abs-no-name-space/file-to-process)
(org-roam-with-file f nil
(org-roam-set-keyword "filetags" "awesome"))))
- 创建新模板时自动添加
(setq org-capture-templates
'(("d" "default" plain "%?" :if-new
(file+head "abs-no-name-space-brain/pages/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n#+created: %U\n#+last_modified: %U\n#+startup: showall\n#+filetags: awesome\n")
:unnarrowed t)))
1 个赞