tmalsburg / helm-bibtex

Search and manage bibliographies in Emacs
GNU General Public License v2.0
465 stars 74 forks source link

bibtex-completion-format-citation-org-cite gives wrong format #423

Closed SvenBre closed 1 year ago

SvenBre commented 1 year ago

Hi Is it me doing something wrong or is the cite function for org-mode's "new" citation format wrongly defined? It gives:

[cite:@bibkey]

instead of:

[[cite:&bibkey]]

Wrong is (unless there are even newer developments in org-mode that have escaped me):

  1. the '@' instead of '&' and
  2. the single "[ ]" instead of double '[[ ]]'.

Here is how I set it:

(setq bibtex-completion-format-citation-functions '((org-mode . bibtex-completion-format-citation-org-cite) (latex-mode . bibtex-completion-format-citation-cite) (markdown-mode . bibtex-completion-format-citation-pandoc-citeproc) (default . bibtex-completion-format-citation-default)))

Setting org-mode to 'org-ref-helm-bibtex-insert-citation' as recommended here results in a 'wrong-type-argument: char-or-string-p, nil' (but works anyway and gives the correct citation format).

I'm running Emacs 28.2 on Gentoo, helm-bibtex from Melpa.

Thank you for help.

tmalsburg commented 1 year ago

[cite:@bibkey] is consistent with org mode documentation. See here. I'm not familiar with [[cite:&bibkey]]. Is that perhaps org-ref syntax?

SvenBre commented 1 year ago

Yes, you are right. I have to apologize. I was unaware that the format I'm used to is org-ref-specific. I never used org-mode without org-ref. So I have to put org-ref-helm-bibtex-insert-citation instead. But this is not working and I get the above-mentioned error message. I'm opening another thread for this problem.

Many thanks.