(defun dmg-org-roam-danling-links (&optional limit)
(let (
(lim (or limit 25))
)
(unless (integerp lim)
(error "limit should be nil or an integer"))
(org-roam-db-query
(format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-roam-template-extract-fields (template) | |
"return a list with the names of the fields used | |
in the given template" | |
(let ( | |
(result '()) | |
(pos 0) | |
) | |
(while (string-match "\\${\\([^}]+\\)}" template pos) | |
;; position should be saved first, since |
(defun test-node-creation-original (rows)
(cl-loop for row in rows
append (pcase-let* ((`(,id ,file ,file-title ,level ,todo
,pos ,priority ,scheduled ,deadline
,title ,properties ,olp ;;12
,atime ,mtime ,tags ,aliases ,refs)
row)
(all-titles (cons title aliases)))
(mapcar (lambda (temp-title)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cl-defstruct (org-roam-node (:constructor org-roam-node-create) | |
(:constructor org-roam-node-create-from-db | |
(title aliases ; 2 | |
id file file-title level todo ; 5 | |
point priority scheduled deadline properties ;;5 | |
olp file-atime file-mtime tags refs)) ;;5 | |
(:copier nil)) | |
"A heading or top level file with an assigned ID property." | |
file file-title file-hash file-atime file-mtime ;5 | |
id level point todo priority ; 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun dmg-test-function () | |
(org-roam-db-query | |
"SELECT | |
id, | |
file, | |
filetitle, | |
\"level\", | |
todo, | |
pos, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
time sqlite3 /tmp/org-roam.db | wc <<EOF | |
SELECT | |
id, | |
file, | |
filetitle, | |
"level", | |
todo, | |
pos, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun org-roam-node-list () | |
(let ((rows (org-roam-db-query | |
"SELECT | |
id, | |
file, | |
filetitle, | |
\"level\", | |
todo, | |
pos, | |
priority , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq dmg-roam-candidates-cache (make-hash-table :test 'equal)) | |
(defun org-roam-node-read--to-candidate (node template) | |
"Return a minibuffer completion candidate given NODE. | |
TEMPLATE is the processed template used to format the entry." | |
(let* ((args (list node template)) | |
(cached-result (gethash args dmg-roam-candidates-cache)) | |
) | |
(if cached-result |
NewerOlder