From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Roland Winkler" Newsgroups: gmane.emacs.bugs Subject: bug#44976: 28.0.50; bibtex.el does not consider biblatex field name aliases Date: Wed, 2 Dec 2020 14:43:57 -0600 Message-ID: <64653.37608.888121.24519@gargle.gargle.HOWL> References: <87v9dlscql.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11142"; mail-complaints-to="usenet@ciao.gmane.io" Cc: leonard@lausen.nl, 44976@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 02 21:47:09 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 1kkZ1l-0002iM-Lf for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Dec 2020 21:47:05 +0100 Original-Received: from localhost ([::1]:39764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkZ1k-00044x-Oa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Dec 2020 15:47:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkYzm-0002yP-VO for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 15:45:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54203) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kkYzm-0000rn-Mn for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 15:45:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kkYzm-0001KY-JA for bug-gnu-emacs@gnu.org; Wed, 02 Dec 2020 15:45:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Roland Winkler" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Dec 2020 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44976 X-GNU-PR-Package: emacs Original-Received: via spool by 44976-submit@debbugs.gnu.org id=B44976.16069418685048 (code B ref 44976); Wed, 02 Dec 2020 20:45:02 +0000 Original-Received: (at 44976) by debbugs.gnu.org; 2 Dec 2020 20:44:28 +0000 Original-Received: from localhost ([127.0.0.1]:37516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkYzE-0001JM-GH for submit@debbugs.gnu.org; Wed, 02 Dec 2020 15:44:28 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kkYzC-0001J6-KF for 44976@debbugs.gnu.org; Wed, 02 Dec 2020 15:44:27 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56995) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkYz5-0000mo-V2; Wed, 02 Dec 2020 15:44:19 -0500 Original-Received: from [2602:30a:2e52:d720:65b7:1416:12e7:8bfb] (port=45502 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1kkYz5-0004w7-Ec; Wed, 02 Dec 2020 15:44:19 -0500 In-Reply-To: <87v9dlscql.fsf@tcd.ie> 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:194834 Archived-At: On Tue Dec 1 2020 Basil L. Contovounesios wrote: > > bibtex.el does not consider biblatex aliases correctly. The biblatex package > > documentation specifies in Section 2.2.5 beginning on page 32 a series of > > Field Aliases. > > > > These include for example the alias "journal" for "journaltitle" which helps > > biblatex to preserve backwards compatibility with bibtex. This causes bibtex.el > > to throw error messages of the style "Mandatory field `%s' is missing" despite > > the alias field being present. > > I, for one, would be in favour of supporting these aliases. > > Roland, are there any reasons not to? Years ago, I added biblatex support to bibtex.el. However, I myself only use old-fashioned BibTeX, so I am not an expert of how biblatex is supposed to work, and it can well be that the current code can be improved in one or the other way. Do I understand correctly that, from biblatex's perspective, "journal" and "journaltitle" are alternatives similar to "year" and "date"? The code in bibtex.el already includes the machinery to support such alternatives. So all that's needed for this is to replace in bibtex-biblatex-entry-alist the elements ("journaltitle") with ("journaltitle" nil nil 17) ("journal" nil nil 17) with 17 replaced by the lowest unused number for the alternatives of this entry type, see "ALTERNATIVES" in the docstring of bibtex-BibTeX-entry-alist. Or am I missing something? When bibtex-entry inserts a template for a new entry, this includes the different alternatives with prefix "ALT". It could be useful to distingiush between alternatives that are listed in bibtex-entry's templates and "hidden" alternatives that are only silently accepted in the background because of biblatex's backward compatibility with the BibTeX format. For example, the ALTERNATIVE number could be positive or negative. Then, only if this number is positive, all alternatives are all included in the entry template with the ALT prefix. Otherwise, only the first alternative in bibtex-biblatex-entry-alist is printed without the prefix. Such a feature could also make sense for "year" and "date".