org-roam-node-find排除daily文件夹下node

(use-package org-roam)

(org-roam-db-autosync-mode)

(cl-defmethod org-roam-node-directories ((node org-roam-node))
    (if-let ((dirs (file-name-directory (file-relative-name (org-roam-node-file node) org-roam-directory))))
        (format "(%s)" (car (split-string dirs "/")))
      ""))

(global-set-key "\C-cxf" (lambda () (interactive)
    (org-roam-node-find nil nil
        (lambda (node)
            (not (string-search "daily" (org-roam-node-directories node)))))))

用下面的函数代替org-roam-node-find,可以在其界面排除掉路径包含dailynode

1 个赞