From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#57712: 29.0.50; bibtex.el: Should `bibtex-parse-entry' handle curly braces inside fields? Date: Sat, 10 Sep 2022 12:32:57 +0800 Message-ID: <87k06b26iu.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14414"; mail-complaints-to="usenet@ciao.gmane.io" To: 57712@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 10 06:33:13 2022 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 1oWsB6-0003Wt-Up for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 06:33:12 +0200 Original-Received: from localhost ([::1]:48262 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oWsB5-0005QF-5e for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Sep 2022 00:33:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWsAw-0005Q6-T1 for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:33:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWsAw-0005qp-EB for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:33:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oWsAw-0001Ik-9x for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Sep 2022 04:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57712 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16627843354944 (code B ref -1); Sat, 10 Sep 2022 04:33:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Sep 2022 04:32:15 +0000 Original-Received: from localhost ([127.0.0.1]:36081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsAA-0001Hg-Ih for submit@debbugs.gnu.org; Sat, 10 Sep 2022 00:32:14 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oWsA3-0001HU-Rl for submit@debbugs.gnu.org; Sat, 10 Sep 2022 00:32:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oWsA3-0005ID-JS for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:32:07 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]:41955) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oWsA1-0005od-MV for bug-gnu-emacs@gnu.org; Sat, 10 Sep 2022 00:32:07 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id q15-20020a17090a304f00b002002ac83485so3413643pjl.0 for ; Fri, 09 Sep 2022 21:32:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date; bh=no36hY3B19NHj904o4zYnW0tDN9sl6GfvGBsljC9rGk=; b=P2Jf5U07ebF/y1G1tSmBQFuYNZVcC6NaePylOV1OhVz51rw2DrbipNrp2plBL0TV/T WkfHfH+1ZFTfpPaT2MMgv0QC8HV9yYJPuemLyCEUAy6fOYDEXzQ4y4RglSmQbMy+39zZ Y8vPQgN1rtm4yot4REjV3jlrSqaM1SxAwMK8HsJ/tK1KyRhnV8HmyDB2zd9vbGfwKhgV wLqgJOoZmTuU7yszzM3fx3dSixuif16kXHuPbF02NjvOywYtYMqlc1CMQLM7NjvSzm+6 q5uel75+pK6/ccQMHxyf3nep5FXIrz7sCazKl+20JLh7bTQdzlhs6ENHwC4vsY7Ik4B5 xfVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date; bh=no36hY3B19NHj904o4zYnW0tDN9sl6GfvGBsljC9rGk=; b=OohoPkcQEOM6VwXTXYreljJRo10bHtBHyvUKNDPFcoSsXLHLLWVYrO0PVTP5zq2m3r yIzIK/YUacqiB1rP/THS161/9QJED0xl9+7A+8cxjZ1wEwsgUJ3Or6PloKoQ/CcM+r9X a7VOcVAqKY1RR08n8620nXiDbHAeTbPfOHkMSh2lWjomznikPSLJD5VrJjZf44Uyv8Ra 1x1h3NKcYyE5zipbRCGYoiM1KavRNxEq0SqHs7Q9wRryi5/sn6w3ROSz1ZcE+WsdLOVQ 0o0J5rNuKx9U0j/AtiT7pDsqYT1PdFQHEUWrMJRr9JRQ7k9myOJ8Y3W8Hzr/o8r9Vsh0 nLNQ== X-Gm-Message-State: ACgBeo0Js2DPUPRYn6EwZj8cFDdRFlUg5lFGpv3RStr+8xjQyGlUTnwY tYuwmsCU3vTiEGEQND4iGMAApat4zVg= X-Google-Smtp-Source: AA6agR7/rTWviiu78jHZHyn+hEg1S3aUPZ6QVYyaMtrWQ0OIeSBVWoPruSSih6pi8J+gwbWXVpqTbg== X-Received: by 2002:a17:90a:a003:b0:200:7642:a6e5 with SMTP id q3-20020a17090aa00300b002007642a6e5mr12777481pjp.10.1662784323731; Fri, 09 Sep 2022 21:32:03 -0700 (PDT) Original-Received: from localhost ([1.83.154.15]) by smtp.gmail.com with ESMTPSA id e11-20020a17090301cb00b00172a670607asm783782plh.300.2022.09.09.21.32.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 21:32:03 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=yantar92@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:242049 Archived-At: 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/CAF+0kSg8O3RQBG1wXoHjMEHwnGFz0gaDkTTSGv+ZaOt4d4myCA@mail.gmail.com @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