Open mlemerre opened 11 months ago
As a temporary workaround I replaced (prog1 (get-text-property (point) 'cite-key)
with (prog1 (car keys)
but I guess this will fail when I use multiple citations. There seems to be a problem with this code, but I fail to understand the overall architecture.
I found out that I add (setq org-ref-activate-cite-links nil) in my config, which explains why in general the bug is not triggered. Still, the bug remains if this option is set.
(setq org-ref-activate-cite-links nil)
will make this problem happen because it relies on (get-text-property (point) 'cite-key)
to work, and this is set during activation.
I think the way this works is the following. You can click on different parts of the link that have to be handled. First, if there is a 'cite-key property then you are on an activated citation. If not, it could mean you click on the cite type, then it gets the keys, and if there is one, searches forward to it, and if there are many, it prompts you to choose one, then searches forward to what you select. Then, it tries to get the 'cite-key property (which should exist if it was activated). org-ref-activate-cite-links
should default to t, and you would only turn it off for performance reasons if there are so many cites you see things slow down.
see e8518f4ad6e5adc6081386339fdd5f394b4822c9, I think it makes this a little more robust.
Hello,
First, thanks for org-ref!
I have investigated a problem that bugged me for a while, which is that when I click on a reference, I have a hydra menu that gets opened, but most commands fails with a "wrong argument nil".
I have investigated the problem which seems to be that the org-ref-get-bibtex-key-under-cursor returns nil (as it ends execution with a prog1) instead of a list of keys, as expected e.g. by its caller org-ref-open-notes-at-point.
It seems quite easy to fix the code but I wonder how this problem has been unnoticed for so long; maybe for most people the (get-text-property 'cite-key) function gets triggered, so maybe there is a problem in my config? Or do people never use there mouses to click on citations?