org-roam / org-roam-bibtex

Org Roam integration with bibliography management software
GNU General Public License v3.0
565 stars 47 forks source link

Support bibtex-completion’s key-at-point #236

Closed myshevchuk closed 2 years ago

myshevchuk commented 2 years ago

Completes #50

serycjon commented 2 years ago

edit: ah, sorry - probably already solved in https://github.com/org-roam/org-roam-bibtex/commit/070a7a732cf38f51245116ddd41aad8ac697c3b0 thanks!


Hi, this breaks bibtex-completion usage outside org-roam. This commit adds orb-get-node-citekey to bibtex-completion-key-at-point-functions, but when the bibtex completion is called in an org-mode file that is not in org-roam, the orb-get-node-citekey fails with "No node at point" error, blocking the rest of bibtex-completion-key-at-point-functions from executing.

Adding (lambda () (ignore-errors (orb-get-node-citekey))) instead seems to work for me.

myshevchuk commented 2 years ago

Yep, no problem. Sorry for the inconvenience.