joostkremers / ebib

A BibTeX database manager for Emacs.
https://joostkremers.github.io/ebib/
BSD 3-Clause "New" or "Revised" License
276 stars 37 forks source link

generate-autokey error #160

Open joukeHijlkema opened 4 years ago

joukeHijlkema commented 4 years ago

Hello Joost, Thanks a lot for ebib, I'm using it a lot ! However I have an issue with autogenerated bibtex-keys. When I hit ! ebib complains telling me [Ebib] cannot create key.

if I debug the bitex item in question:

@PhDThesis{<new-entry1>,
    keywords = {Encadre},
    date = {17/12/2019},
    year = {2019},
    institution = {L'Université de Toulouse ISAE},
    title = {Développement et validation expérimentale d'une modélisation numérique pour la simulation d'un
moteur hybride},
    author = {Jean-Etienne Durand}
}

bibtex-generate-autokey yields an empty string buit I can't seem to figure out why.

Any help would be great

Jouke

joostkremers commented 4 years ago

Is the .bib file that contains this entry a biblatex file? If so, that could be the cause.

bibtex-generate-autokey fails if it is called on a PhDThesis entry in a biblatex file. If you change the entry type to Thesis (and add a type field with the value PhD Thesis), things should work.

I would consider that a bug in bibtex.el, because even though biblatex deprecates PhDThesis as an entry type, it is a valid alias, so it's allowed to occur in a biblatex file.