Subject: bug#36252: 26.1; bibtex-generate-autokey does not use use date field

From: "Roland Winkler" <[email-masked]>
Date: Mon, 7 Dec 2020 00:20:54 -0600

On Sun Dec 6 2020 Lars Ingebrigtsen wrote:
> Looks reasonable to me.  I've added Roland to the Cc's; perhaps he
> has some comments.

[Thank you Lars, I haven't subscribed to the bug-gnu-emacs mailing
list.  Lately bug reports for bibtex.el seem to be popular.  Can you
please drop me a note if you see more bug reports for bibtex.el?
Thanks!]

A few days ago I installed in master a related patch that I had
lying around for some time.  I believe it addresses the question of
searching the date and year field in a cleaner way by passing a list
of field names to bibtex-text-in-field.  But I didn't know the new
iso8601 library.  So that's the main purpose of the new patch
attached below.  (This patch is against the current version of
bibtex.el in master.)

Out of curiosity, I also checked Oren Patashnik's old documentation
of the BibTeX year field.  It says that "standard styles can handle
any year whose last four nonpunctuation characters are numerals,
such as '(about 1984)'."  This must be very rare.  But now this
should be handled correctly, too.  (I only use old-fashioned
BibTeX.  But I believe biblatex promises backward compatibility for
the BibTeX year field.)

Regarding the docstring of bibtex-generate-autokey: I am not sure
this is the right place to elaborate on iso8601.  bibtex.el assumes
throughout that users are familiar with valid values for different
fields.