refactor!(org): remove org-roam v1

BREAKING CHANGE: This finally removes org-roam v1, which has been
deprecated for nearly 5 years (since 5ef733b). Most users should already
be on it. v2 has a migration wizard for anyone still on v1, which will
kick in if it detects a v1 roam db.
This commit is contained in:
Henrik Lissner
2025-09-20 02:43:13 -04:00
parent 6ea4332b85
commit d92883bff8
10 changed files with 197 additions and 377 deletions

View File

@@ -1,8 +1,8 @@
;;; lang/org/autoload/contrib-roam2.el -*- lexical-binding: t; -*-
;;;###if (modulep! +roam2)
;;; lang/org/autoload/contrib-roam.el -*- lexical-binding: t; -*-
;;;###if (or (modulep! +roam) (modulep! +roam2))
;;; Custom node accessors
;;;###autoload (autoload 'org-roam-node-doom-filetitle "lang/org/autoload/contrib-roam2" nil t)
;;;###autoload (autoload 'org-roam-node-doom-filetitle "lang/org/autoload/contrib-roam" nil t)
(cl-defmethod org-roam-node-doom-filetitle ((node org-roam-node))
"Return the value of \"#+title:\" (if any) from file that NODE resides in.
If there's no file-level title in the file, return empty string."
@@ -11,7 +11,7 @@ If there's no file-level title in the file, return empty string."
(org-roam-node-file-title node))
""))
;;;###autoload (autoload 'org-roam-node-doom-hierarchy "lang/org/autoload/contrib-roam2" nil t)
;;;###autoload (autoload 'org-roam-node-doom-hierarchy "lang/org/autoload/contrib-roam" nil t)
(cl-defmethod org-roam-node-doom-hierarchy ((node org-roam-node))
"Return hierarchy for NODE, constructed of its file title, OLP and direct title.
If some elements are missing, they will be stripped out."
@@ -31,7 +31,7 @@ If some elements are missing, they will be stripped out."
separator (propertize (string-join olp separator) 'face '(shadow italic))
separator title)))))
;;;###autoload (autoload 'org-roam-node-doom-subdirs "lang/org/autoload/contrib-roam2" nil t)
;;;###autoload (autoload 'org-roam-node-doom-subdirs "lang/org/autoload/contrib-roam" nil t)
(cl-defmethod org-roam-node-doom-subdirs ((node org-roam-node))
"Return subdirectories of `org-roam-directory' in which NODE resides in.
If there's none, return an empty string."
@@ -41,7 +41,7 @@ If there's none, return an empty string."
(file-relative-name org-roam-directory)
(file-name-directory)))
;;;###autoload (autoload 'org-roam-node-doom-tags "lang/org/autoload/contrib-roam2" nil t)
;;;###autoload (autoload 'org-roam-node-doom-tags "lang/org/autoload/contrib-roam" nil t)
(cl-defmethod org-roam-node-doom-tags ((node org-roam-node))
"Return tags formatted in the same way how they appear in org files."
(cl-remove-if (doom-rpartial
@@ -52,7 +52,7 @@ If there's none, return an empty string."
(bound-and-true-p org-num-skip-tags))))
(org-roam-node-tags node)))
;;;###autoload (autoload 'org-roam-node-doom-type "lang/org/autoload/contrib-roam2" nil t)
;;;###autoload (autoload 'org-roam-node-doom-type "lang/org/autoload/contrib-roam" nil t)
(cl-defmethod org-roam-node-doom-type ((node org-roam-node))
"Return the directory relative to `org-roam-directory' as a note's \"type\"."
(when-let (dir (thread-first