Open randomwangran opened 1 year ago
I am not sure what you are trying to accomplish here. Is it one function that jumps to links or cite keys?
if it is, and your function works, what is the issue?
Is it one function that jumps to links or cite keys?
Yes, it is. The original function only works for citation links. This is what it is supposed to be. There is no issue with this function.
However, at the user's level, this is not an optimal function. The primary part of the jumping function is to jump a proper point in a buffer regardless it is a citation link or a normal Org-mode link.
So, I merged them together. It works well so far, but I don't think the way I make it is a robust way. I am writing this issue for users who might have the same issue. I am also open to suggestions to make this snippet a better one.
It seems fine to me, you just merge two lists of locations for avy.
org-ref-jump-to-visible-key
can identify multiple candidates, but it does not contain a regular link in Org-mode.link-hint-open-link
on the other hand, can identify a normal link but is not very good at finding multiple citation keys. We need a strong merge.Following code snippet can merge two types of link, but I don't feel this is the best way to achieve this.
Also please see: https://github.com/noctuid/link-hint.el/issues/209