ebib icon indicating copy to clipboard operation
ebib copied to clipboard

Autogenerate key doesn't use the date field

Open andsvb2 opened this issue 6 years ago • 7 comments
trafficstars

<ebib-generate-autokey> doesn't attach the year from <date> field to the entry key. However, if there is information in the <year> field, that will be used. The <ebib-set-dialect> is set to <biblatex>.

andsvb2 avatar Aug 21 '19 18:08 andsvb2

This is a bug in bibtex.el, see issue #137 for some details.

joostkremers avatar Aug 22 '19 09:08 joostkremers

Thanks for the explanation. As the bug is in <bibtex.el>, should I mark the issue as closed?

andsvb2 avatar Aug 25 '19 01:08 andsvb2

A patch for bibtex.el has been proposed to solve this: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36252/ It is not yet merged, but I found it to be usable.

I’m using it to harmonize the 1500+ keys of my library freshly exported from Zotero.

svictor9 avatar Nov 12 '19 10:11 svictor9

A patch for bibtex.el has been proposed to solve this: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36252/ It is not yet merged, but I found it to be usable.

That's good to hear. Hopefully this will be included in Emacs 27.

joostkremers avatar Nov 13 '19 16:11 joostkremers

A patch for bibtex.el has been proposed to solve this: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36252/ It is not yet merged, but I found it to be usable.

I’m using it to harmonize the 1500+ keys of my library freshly exported from Zotero.

I'll apologize in advance for this unrelated question, but how can I apply this patch? I have to fork and/or download the git repository to apply the patch and then build the package? (If the information helps in any way, I'm using Manjaro and there is a PKGBUILD on AUR to compile from Savannah, but the author himself says that the “This PKGBUILD is highly opinionated”.)

andsvb2 avatar Dec 18 '19 19:12 andsvb2

I'll apologize in advance for this unrelated question, but how can I apply this patch? I have to fork and/or download the git repository to apply the patch and then build the package? That's what I did, because I also wanted to try out emacs 27.

If you don't want to recompile emacs, I suppose that a quick and dirty alternative would be to:

  1. locate your compiled bibtex.elc file (M-x locate-library),
  2. rename it to something else (get it out of the way)
  3. gunzip the bibtex.el.gz file that sits next to it
  4. apply the patch on it.

I haven't tried it though. The PKGBUILD way would be more "clean" and viable in the long-term. You probably don't need to apply the patch to the git version of emacs (the PKGBUILD in AUR). It might work just as well if you apply it from the PKGBUILD of the "stable" version of emacs.

svictor9 avatar Dec 18 '19 21:12 svictor9

I'll apologize in advance for this unrelated question, but how can I apply this patch? I have to fork and/or download the git repository to apply the patch and then build the package? That's what I did, because I also wanted to try out emacs 27.

If you don't want to recompile emacs, I suppose that a quick and dirty alternative would be to:

1. locate your compiled bibtex.elc file (`M-x locate-library`),

2. rename it to something else (get it out of the way)

3. `gunzip` the bibtex.el.gz file that sits next to it

4. apply the patch on it.

I haven't tried it though. The PKGBUILD way would be more "clean" and viable in the long-term. You probably don't need to apply the patch to the git version of emacs (the PKGBUILD in AUR). It might work just as well if you apply it from the PKGBUILD of the "stable" version of emacs.

Thank you for the explanation. I've tried the dirty method and it is working now. I'll try the clean way when I have more time.

andsvb2 avatar Dec 18 '19 22:12 andsvb2