Commit 7dc76b7 1 parent f3db974 commit 7dc76b7 Copy full SHA for 7dc76b7
File tree 1 file changed +12
-6
lines changed
1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -563,12 +563,18 @@ INFO is the org-element parsed buffer."
563
563
" Insert link data for LINK at current point into the Org-roam cache."
564
564
(save-excursion
565
565
(goto-char (org-element-property :begin link ))
566
- (let ((type (org-element-property :type link ))
567
- (path (org-element-property :path link ))
568
- (source (org-roam-id-at-point))
569
- (properties (list :outline (ignore-errors
570
- ; ; This can error if link is not under any headline
571
- (org-get-outline-path 'with-self 'use-cache )))))
566
+ (let* ((type (org-element-property :type link ))
567
+ (path (org-element-property :path link ))
568
+ (option (and (string-match " ::\\ (.*\\ )\\ '" path)
569
+ (match-string 1 path)))
570
+ (path (if (not option) path
571
+ (substring path 0 (match-beginning 0 ))))
572
+ (source (org-roam-id-at-point))
573
+ (properties (list :outline (ignore-errors
574
+ ; ; This can error if link is not under any headline
575
+ (org-get-outline-path 'with-self 'use-cache ))))
576
+ (properties (if option (plist-put properties :search-option option)
577
+ properties)))
572
578
; ; For Org-ref links, we need to split the path into the cite keys
573
579
(when (and source path)
574
580
(if (and (boundp 'org-ref-cite-types )
You can’t perform that action at this time.
0 commit comments