mirror of
https://github.com/org-roam/org-roam
synced 2025-08-01 12:17:21 -05:00
fix id retrieval resulting in infinite loop
Use custom `org-roam-up-heading-or-point-min` to prevent infinite looping during ID retrieval. Fixes #1452.
This commit is contained in:
12
org-roam.el
12
org-roam.el
@ -161,6 +161,18 @@ This face is used on the region target by `org-roam-insertion'
|
||||
during an `org-roam-capture'."
|
||||
:group 'org-roam-faces)
|
||||
|
||||
;;;; ID Utilities
|
||||
(defun org-roam-id-at-point ()
|
||||
"Return the ID at point, if any.
|
||||
Recursively traverses up the headline tree to find the
|
||||
first encapsulating ID."
|
||||
(let (source)
|
||||
(org-with-wide-buffer
|
||||
(while (and (not (setq source (org-id-get)))
|
||||
(not (bobp)))
|
||||
(org-roam-up-heading-or-point-min)))
|
||||
source))
|
||||
|
||||
;;;; File functions and predicates
|
||||
(defun org-roam--file-name-extension (filename)
|
||||
"Return file name extension for FILENAME.
|
||||
|
Reference in New Issue
Block a user