From 0cd9b9e6d3c446ae7932218f0b3f0c31f18d4d2d Mon Sep 17 00:00:00 2001 From: Bruce D'Arcus Date: Sun, 5 Jun 2022 16:53:29 -0400 Subject: [PATCH] (fix)completion: ensure unique ref candidates (#2208) Add invisible id to candidate strings to ensure each candidate is unique, and completing-read doesn't get confused about which one to open. Fix #2207 --- org-roam-node.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org-roam-node.el b/org-roam-node.el index 1581bd8..8f59873 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -1006,8 +1006,10 @@ The car is the ref, and the cdr is the corresponding node for the ref." :file file :point pos :title title))) - (cons (propertize ref 'node node 'type type) - node))))) + (cons + (concat (propertize ref 'node node 'type type) + (propertize id 'invisible t)) + node))))) (defun org-roam-ref-read--annotation (ref) "Return the annotation for REF, which assumed to be a propertized string."