From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Colin Baxter Newsgroups: gmane.emacs.bugs Subject: bug#36252: 26.1; bibtex-generate-autokey does not use use date field Date: Sun, 06 Dec 2020 09:25:38 +0000 Message-ID: <874kkzl20d.fsf@yandex.com> References: <20190616202330.immdadcg24qedysq@zeta.rak.ac> <871rz3dxfw.fsf@mouse.gnus.org> <20190715003421.qrb65bynacpxca2k@zeta.rak.ac> <87k1a8q7ld.fsf@gnus.org> <87sgcu7oja.fsf@gnus.org> <87pn6o766s.fsf@gnus.org> <87im9gpq17.fsf@pniedzielski.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37587"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: 36252@debbugs.gnu.org Cancel-Lock: sha1:ChTj5MTyTZgmAB4G49npEZr9a1U= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 06 10:26:13 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1klqJ2-0009eo-Aa for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 10:26:12 +0100 Original-Received: from localhost ([::1]:60620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1klqJ0-0004FV-UY for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Dec 2020 04:26:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klqIs-0004FL-3O for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 04:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37355) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klqIr-0001qT-Rh for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 04:26:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1klqIr-0007uD-NT for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 04:26:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <20190616202330.immdadcg24qedysq@zeta.rak.ac> Resent-From: Colin Baxter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 06 Dec 2020 09:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36252 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160724675330373 (code B ref -1); Sun, 06 Dec 2020 09:26:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Dec 2020 09:25:53 +0000 Original-Received: from localhost ([127.0.0.1]:48901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klqIj-0007to-3X for submit@debbugs.gnu.org; Sun, 06 Dec 2020 04:25:53 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:54770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1klqIg-0007tg-Pa for submit@debbugs.gnu.org; Sun, 06 Dec 2020 04:25:51 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klqIg-0004Dl-Fp for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 04:25:50 -0500 Original-Received: from static.214.254.202.116.clients.your-server.de ([116.202.254.214]:55118 helo=ciao.gmane.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klqIe-0001jY-PJ for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 04:25:50 -0500 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1klqIb-000999-Jr for bug-gnu-emacs@gnu.org; Sun, 06 Dec 2020 10:25:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ X-Face: BHjiJOg/Qmj'BQgsAKL@])L)e62P)C"Y=6T Face: iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeBAMAAAAodabAAAAAB3RJTUUH1wQdAAY04/L8hgAA AAlwSFlzAAAewQAAHsEBw2lUUwAAAARnQU1BAACxjwv8YQUAAAASUExURc7OzpwAAAAAAP////8A AGNj/2aqqTQAAAA8SURBVHjaYzA2NnEBAmdj01D8wNgYpM7F2JiBgYFREAgEGJiU8AMGBpA6QaCG UVtGbRm1ZdSWUVsGjS0Aq20lJnMawnkAAAAASUVORK5CYII= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geb-bug-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:195074 Archived-At: Hello, >>>>> Patrick M Niedzielski writes: > Lars Ingebrigtsen skribis: >> Lars Ingebrigtsen writes: This was five weeks >> ago, and there was no response, so I'm closing this bug report. >> If progress can be made here, please respond to the debbugs mail >> address, and we'll reopen the bug report. > I’d like to reopen this bug, and submit the attached patch which I > believe fixes the issue. This patch teaches > ‘bibtex-generate-autokey’ to prefer an ISO8601-formatted ‘date’ > field when present, and fall back to a ‘year’, and is implemented > using Lars’ ISO8601 parsing functions. > Just some implementation notes: I don’t believe Ryan’s original > patch works as documented when ‘bibtex-autokey-use-crossref’ is > non-nil. In this case, his patch would seem to prefer a > crossref’d entry’s ‘year’ field to a local entry’s ‘date’ > field. More concretely, with the following BibLaTeX, > @misc{doe1995some, title = {Some work}, author = {John Doe}, year > = {1995}, date = {1995-01-01}, } @misc{, title = {Another work}, > author = {Anon Y. Mous}, date = {1990-03-12}, crossref = {entry1}, > } > When generating a key for entry2, the original patch would prefer > using the year 1995 to the year 1990, which is unintuitive. The > attached patch implements a different behavior instead, in which > an entry’s own ‘year/date’ field are prefered to the crossref’d > entry’s ‘year/date’ field. In the above case, > ‘bibtex-generate-autokey’ will generate a entry key with the year > 1990 rather than 1995. > Additionally, we prefer to use the ‘date’ field when present over > the ‘year’ field. This behavior is probably more correct, since > BibLaTeX deprecated the ‘year’ field in favor of its own ‘date’ > field, which only should occur in BibLaTeX-flavor files. Note that > this is a breaking change from the prior behavior, but only when > an entry has incompatible ‘date’ and ‘year’ fields. If a file is > meant to support both BibTeX and BibLaTeX, the ‘date’ and ‘year’ > fields should contain the same information. I am a heavy user of bibtex, but I am puzzled over the 'date' field. Publications have a 'year' ok, sometimes a 'month', but never have I seen a 'day'. So how would a user enter (YYYY-MM-DD)? Is it perhaps the date of entry of the record in to the file? Sorry to butt in, but I am curious. Best wishes, Colin Baxter.