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: Wed, 14 Sep 2022 10:07:13 +0800 Message-ID: <87zgf2yai6.fsf@localhost> 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> <874jxbzzk4.fsf@gnu.org> 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="37112"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57712@debbugs.gnu.org, Lars Ingebrigtsen To: Roland Winkler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 14 04:07:19 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 1oYHo7-0009O0-EY for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Sep 2022 04:07:19 +0200 Original-Received: from localhost ([::1]:36082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYHo5-0002aM-TO for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Sep 2022 22:07:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53760) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYHnq-0002Zz-FI for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 22:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYHnq-0001Ng-6J for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 22:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYHnp-00024J-Ol for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2022 22:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Sep 2022 02:07:01 +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.16631211897909 (code B ref 57712); Wed, 14 Sep 2022 02:07:01 +0000 Original-Received: (at 57712) by debbugs.gnu.org; 14 Sep 2022 02:06:29 +0000 Original-Received: from localhost ([127.0.0.1]:53225 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYHnJ-00023U-4H for submit@debbugs.gnu.org; Tue, 13 Sep 2022 22:06:29 -0400 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:51155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYHnH-00023G-9A for 57712@debbugs.gnu.org; Tue, 13 Sep 2022 22:06:27 -0400 Original-Received: by mail-pj1-f46.google.com with SMTP id fv3so13105360pjb.0 for <57712@debbugs.gnu.org>; Tue, 13 Sep 2022 19:06:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date; bh=WOR4CeylSfDpcpl4kS0UV3avn+ocAD2vSsB9RqKgIfs=; b=EH1PSjR7zP6Oms+pEGKHw2JkuRl2ny7PI+Rf6njq1G4hrfCjBy/5LaccPSmnslCVBn dcjbkK8HMepSsN7q3tARWhkJLoibloFZxHRl8DadHAQe4CxekSIxVYSacDlj5x/0jRq8 gDg1MzJ7OJgEBUH91dTZ53EGT12ML4wv78Il9nFlVZj1saOR1mm9DFtrQF++EYldBtcc G4CC+HEj8nN+NIdq2BSW9wYZvrlGLQpD6A+cE4q8800hLW8wZ6r1u1EMavxV9KIZ4Ayk Bo1nLzGTjl1uFVIeffmq/yKnVV6bDeSVUim3FcrgEYxCGOj2Sce33ussIpOelW+iTHAi DPbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=WOR4CeylSfDpcpl4kS0UV3avn+ocAD2vSsB9RqKgIfs=; b=yq0z0yoqaKqtC1Gm1ES4UgO3XbQNjYwY2bRA8lqaXOtw2tuK5mFpn2FcGicNOxnxzk EEg2fHTg3L2HWXCBwCfpCWI8dLHEK5yrjzpvQs6ZxhggTgwt+RjitvLGsxAK9JHz2CYH 021IZzliU0s/DFZvuQ/yqOJk6kqgIlRCbEhog3XWdRAcOdqxKjJgdDttO/XQcjADk9Og 4pxuJMtSxw/du1jiGsOiuCU9Nr+SEM8TO1TaAQOK4ls3ZIefY1TFUR//6K9KILXWEUKK vBqH947CPZTEOl1hzFolrQtEjHEc3Wy0UBp9iEDPdOMM1tm+JQnmZ8GGuZnM3Q9G5I0e TjBQ== X-Gm-Message-State: ACgBeo2ZK5/1jYUxvNHdqM6Fad1mSAWVGtR7LImzYNiBnP+/Z46lg4WT fulwBWt7tZFFk/fXKaicKyI= X-Google-Smtp-Source: AA6agR7KcSKOtetvBuVSeKcZ3VejbfHOYNpU8GyP9PUMJkA1iBubA0OUq3MhQSlwzYdfgkUETqXatQ== X-Received: by 2002:a17:903:2445:b0:178:38ee:70f with SMTP id l5-20020a170903244500b0017838ee070fmr10542858pls.164.1663121181254; Tue, 13 Sep 2022 19:06:21 -0700 (PDT) Original-Received: from localhost ([2409:8970:a81:48f7:8ec6:81ff:fe70:339d]) by smtp.gmail.com with ESMTPSA id t8-20020a1709027fc800b001783a917b9asm4677105plb.127.2022.09.13.19.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 19:06:20 -0700 (PDT) In-Reply-To: <874jxbzzk4.fsf@gnu.org> 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:242422 Archived-At: Roland Winkler writes: >> 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. I am looking at this differently. Similar to BibTeX fields, text in the fields is a subject of a specific format. That format is _not_ exactly the same with TeX (e.g. see https://tex.stackexchange.com/questions/26338/how-to-code-%C3%9F-german-sha= rp-s-in-bibtex) I expect bibtex.el to handle all the peculiarities of BibTeX format, so that external packages do not need to perform extra parsing. If you dislike modifying bibtex-parse-entry, bibtex-parse-field-text looks like a reasonable place to handle field text parsing. --=20 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