Skip to content

citar-open-entry receives wrong citekey #822

@pgoelz

Description

@pgoelz

Describe the bug
I set up citar with embark. All actions work, but citar-open-entry is called with a spurious citekey.

To Reproduce
Steps to reproduce the behavior:

  1. Place cursor on citation key. (E.g., the citation is [cite:@NW06] and citar knows about it: hovering over it gives me the full citation. My cursor is on the “N”, but the result is the same if it is on the cite: part.)
  2. Call embark-act, either explicitly or through C-c C-o.
  3. Press e to call citar-open-entry.

Expected behavior
I would expect citar-open-entry to be called with the argument "NW06". Instead, it gets called with the first reference in my bib file, "AAA+18".

Screenshots
image
Note that embark is aware of the correct citar-key, NW06.

Emacs version: 29.1. I installed citar and embark using straight, so I’m up to date with their respective main/master branches.

Additional context
To better understand this issue, I set citar-open-entry-function to a function that prints its argument, which indeed gets called with the argument AAAI+18. I also verified that running (citar-open-entry "NW06") would indeed open the entry for NW06. What I am most confused by is that the other options in embark-act (say, r for citar-copy-reference) receive the correct reference when selected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions