Subject: 29.0.50; bibtex.el: Should `bibtex-parse-entry' handle curly braces inside fields?

From: Ihor Radchenko <[email-masked]>
Date: Sat, 10 Sep 2022 12:32:57 +0800

Hello,

Org mode is relying upon bibtex.el to parse BibTeX bibliographies.

Recently, we have got a bug report where curly braces are used inside
title field:

https://orgmode.org/list/[email-masked]

@InCollection{Geyer2011,
  author          = {Geyer, Charles J},
  title           = {{Introduction to Markov Chain Monte Carlo}},
                     ^                                        ^
  year            = 2011,
  booktitle       = {{Handbook of Markov Chain Monte Carlo}},
  editor          = {Brooks, Steve and Gelman, Andrew and Jones, Galin and Meng,
		  Xiao-Li},
  publisher       = {CRC press},
  pages           = 45,
}

The curly braces inside fields are a part of BibTeX specification:
http://www.bibtex.org/SpecialSymbols/

Yet, bibtex-parse-entry simply ignores all the curly braces inside the
field and returns the field as is:

(("=type=" . "InCollection")
... ("title" . "{Introduction to Mark\\.{o}v Chain Monte Carlo}") ...)

The same goes for the \.{o} special symbol.

It would be useful if bibtex-parse-entry could process the escapes when,
say, its first optional argument CONTENT is set to 'parse.

Would it be possible?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92