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#57712: 29.0.50; bibtex.el: Should `bibtex-parse-entry' handle curly braces inside fields? Date: Mon, 12 Sep 2022 23:08:27 -0500 Message-ID: <874jxbzzk4.fsf@gnu.org> References: <87k06b26iu.fsf@localhost> <87r10jrgf4.fsf@gnus.org> <87zgf75i32.fsf@gnu.org> <871qsi5wcf.fsf@gnu.org> <87bkrlw4ml.fsf@localhost> <8735cw3dnm.fsf@gnu.org> <87pmg0t31x.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57712@debbugs.gnu.org, Lars Ingebrigtsen To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 13 06:09:26 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 1oXxEk-0001Ml-7b for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 06:09:26 +0200 Original-Received: from localhost ([::1]:60028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oXxEj-0002UL-8B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 00:09:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXxEN-0002T1-5u for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 00:09:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oXxEM-0005Ki-TX for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 00:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oXxEM-0001QT-OE for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 00:09:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Roland Winkler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Sep 2022 04:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57712 X-GNU-PR-Package: emacs Original-Received: via spool by 57712-submit@debbugs.gnu.org id=B57712.16630421165448 (code B ref 57712); Tue, 13 Sep 2022 04:09:02 +0000 Original-Received: (at 57712) by debbugs.gnu.org; 13 Sep 2022 04:08:36 +0000 Original-Received: from localhost ([127.0.0.1]:48516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXxDv-0001Pn-RE for submit@debbugs.gnu.org; Tue, 13 Sep 2022 00:08:36 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oXxDu-0001PU-BH for 57712@debbugs.gnu.org; Tue, 13 Sep 2022 00:08:34 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXxDp-0005Fl-45; Tue, 13 Sep 2022 00:08:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=aWTW2giW1Sztmzp1Um5vurheXz2KyrIy/xt6uD/V9jk=; b=gl78UP5op5VifLGq4f/m 1v5l54drdyob+OWXopqm6aR6BE2JXnCn2GBe0LUI5LtRI0onIEshBH8rkw9kEQuT1uJA74T7ENoVU uaq+Wt4OaGr9SnyEe/7+8npFXPKWUIuirE3GXq2hXC0uKDLGCoSZPA+d7bgvLUqZmdxQROUEZF76x 3SDoFoRyQhBllV8nEBiW7mWywT6ep/V0STQllH2JuHtAFYG75J3t8KAluhEdETUCH1q4QlkTB1DXx 0WJIv0p9YhZ4WuVWlQjVGQKsP9moFg/bPRNAofwJv7AOH2ECB7BJUOWuc/B3/0OG/sa/j6iKPExAp CgLqmtdZfjFG/Q==; Original-Received: from [2600:1700:5650:f790::42] (port=54208 helo=regnitz) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oXxDo-0007Kf-Mp; Tue, 13 Sep 2022 00:08:28 -0400 In-Reply-To: <87pmg0t31x.fsf@localhost> (Ihor Radchenko's message of "Tue, 13 Sep 2022 10:34:50 +0800") 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:242321 Archived-At: On Tue, Sep 13 2022, Ihor Radchenko wrote: > title =3D {{Introduction $3^5$ to Mark\.{o}v Chain {MOnte} Carlo > \LaTeX}}, > > (bibtex-parse-entry '(symbols braces mathmode latex strings)) > > will return > > '("Introduction " (mathmode "$3^5$") " to Mark=C8=AFv Chain " (braces > "{MOnte}") "Carlo" (latex "\LaTeX")) > > that is > 1. Escaped symbols are replaced by their unicode > 2. Braces are indicated by (braces "string") > 3. LaTeX math is indicated by (mathmode "math string") > 4. LaTeX commands are indicated by (latex "command") > 5. @strings are replaced appropriately I believe this is much beyond BibTeX mode and yet more beyond bibtex-parse-entry. It is mostly about parsing LaTeX while BibTeX plays only a marginal role (adding support for @string's will be cheap once you get the rest of this parser working). Then, you also need to deal with the question: what do you want to do with a return value you illustrated above? From what I vaguely understood, your real goal is to convert this into something human-readable. This is a fairly substantial project. I am not sure whether it would be worth the effort. And I would not want to bury such a pretty complex machinery in a new optional arg of a function that is intended to do something very different.