tmalsburg / helm-bibtex

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

Error when using GPG encrypted .bib file #410

Closed BenediktBroich closed 2 years ago

BenediktBroich commented 2 years ago

When specifying an encrypted .bib.gpg-file helm-bibtex searches for .bib.gpg.bib-file instead of using the encrypted file.

tmalsburg commented 2 years ago

Are you sure it's looking for XYZ.bib.gpg.bib? From reading the relevant code in bibtex-completion-normalize-bibliography I get the impression that it should be XYZ.bib.bib. Anyway, I think we need a conditional in that function that deals with the three possible cases: 1. XYZ.bib, 2. XYZ.org, 3. XYZ.bib.gpg. I suppose, it would be best to also include the case 4. XYZ.org.gpg, although I'm not sure that anyone is actually seriously using the org feature. If you prepare a PR, I can look at it and give feedback.

BenediktBroich commented 2 years ago

Yes you are right. It was XYZ.bib.bib.

Here is the PR

I wanted to use an XYZ.org file, but i did not find an example on how write bibtex in org. @tmalsburg

tmalsburg commented 2 years ago

To be honest, I never used the org feature myself. And I'm not sure that this format has actually caught on. I think the idea is that your main bibliography is in org format (using property drawers, I think) and then each .org file is exported to .bib which is then read by bibtex-completion. However, if you choose to edit an entry, the action leads to the entry in the .org file. My memory is a bit vague, but it's something like that.

tmalsburg commented 2 years ago

Please close this issue if you think it's satisfactorily addressed.