From 40b6c10d8a6b1d4cb587410473ec0a3f1cb8fbb4 Mon Sep 17 00:00:00 2001 From: Dustin Farris Date: Mon, 17 Feb 2025 10:29:23 -0800 Subject: [PATCH] nit: formatting update My editor reformatted some of the identation. Also corrected a docstring for org-roam-refile. --- org-roam-db.el | 13 +++++++------ org-roam-node.el | 11 +++++++---- org-roam.el | 16 +++++++++------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/org-roam-db.el b/org-roam-db.el index 5125ff9..77c518f 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -68,10 +68,10 @@ to be used like this. See https://nullprogram.com/blog/2014/02/06/." :package-version '(forge . "0.3.0") :group 'org-roam :type '(choice (const sqlite) - (const sqlite-builtin) - (const sqlite-module) - (const :tag "libsqlite3 (OBSOLETE)" libsqlite3) - (const :tag "sqlite3 (BROKEN)" sqlite3))) + (const sqlite-builtin) + (const sqlite-module) + (const :tag "libsqlite3 (OBSOLETE)" libsqlite3) + (const :tag "sqlite3 (BROKEN)" sqlite3))) (defcustom org-roam-db-location (locate-user-emacs-file "org-roam.db") "The path to file where the Org-roam database is stored. @@ -126,8 +126,9 @@ is desirable to parse and cache these links (e.g. hiding links in a property drawer)." :package-version '(org-roam . "2.2.0") :group 'org-roam - :type '(set (const :tag "keywords" keyword) - (const :tag "property drawers" node-property))) + :type '(set + (const :tag "keywords" keyword) + (const :tag "property drawers" node-property))) (defcustom org-roam-db-extra-links-exclude-keys '((node-property . ("ROAM_REFS")) (keyword . ("transclude"))) diff --git a/org-roam-node.el b/org-roam-node.el index fa8adee..32845e8 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -309,7 +309,8 @@ Return nil if there's no node with such REF." Uses the ID, and fetches remaining details from the database. This can be quite costly: avoid, unless dealing with very few nodes." - (when-let ((node-info (car (org-roam-db-query [:select [file level pos todo priority + (when-let ((node-info (car (org-roam-db-query [:select [ + file level pos todo priority scheduled deadline title properties olp] :from nodes :where (= id $s1) @@ -417,8 +418,9 @@ FROM GROUP BY id, tags ) GROUP BY id"))) (cl-loop for row in rows - append (pcase-let* ((`(,id ,file ,file-title ,level ,todo ,pos ,priority ,scheduled ,deadline - ,title ,properties ,olp ,atime ,mtime ,tags ,aliases ,refs) + append (pcase-let* ((`( + ,id ,file ,file-title ,level ,todo ,pos ,priority ,scheduled ,deadline + ,title ,properties ,olp ,atime ,mtime ,tags ,aliases ,refs) row) (all-titles (cons title aliases))) (mapcar (lambda (temp-title) @@ -887,7 +889,8 @@ node." ;;;###autoload (defun org-roam-refile (node) - "Refile node at point to an Org-roam node. + "Refile node at point to an org-roam NODE. + If region is active, then use it instead of the node at point." (interactive (list (org-roam-node-read nil nil nil 'require-match))) diff --git a/org-roam.el b/org-roam.el index d92f19b..52c3031 100644 --- a/org-roam.el +++ b/org-roam.el @@ -186,11 +186,12 @@ By default, `executable-find' will be used to look up the path to the executable. If a custom path is required, it can be specified together with the method symbol as a cons cell. For example: '(find (rg . \"/path/to/rg\"))." - :type '(set (const :tag "find" find) - (const :tag "fd" fd) - (const :tag "fdfind" fdfind) - (const :tag "rg" rg) - (const :tag "elisp" nil))) + :type '(set + (const :tag "find" find) + (const :tag "fd" fd) + (const :tag "fdfind" fdfind) + (const :tag "rg" rg) + (const :tag "elisp" nil))) ;;; Library (defun org-roam-file-p (&optional file) @@ -322,8 +323,9 @@ E.g. (\".org\") => (\"*.org\" \"*.org.gpg\")" (defun org-roam--list-files-rg (executable dir) "Return all Org-roam files under DIR, using \"rg\", provided as EXECUTABLE." (let* ((globs (org-roam--list-files-search-globs org-roam-file-extensions)) - (command (string-join `(,executable "-L" ,dir "--files" - ,@(mapcar (lambda (glob) (concat "-g " glob)) globs)) " "))) + (command (string-join `( + ,executable "-L" ,dir "--files" + ,@(mapcar (lambda (glob) (concat "-g " glob)) globs)) " "))) (org-roam--shell-command-files command))) (declare-function org-roam--directory-files-recursively "org-roam-compat")