From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yGy6ELE7lWDwYwEAgWs5BA (envelope-from ) for ; Fri, 07 May 2021 15:08:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kEBQDLE7lWCGSwAAbx9fmQ (envelope-from ) for ; Fri, 07 May 2021 13:08:01 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CD5081B9D8 for ; Fri, 7 May 2021 15:07:59 +0200 (CEST) Received: from localhost ([::1]:36152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lf0D0-0002Id-OE for larch@yhetil.org; Fri, 07 May 2021 09:07:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf0Bp-0002Gs-T7 for emacs-orgmode@gnu.org; Fri, 07 May 2021 09:06:45 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:59835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lf0Bm-0006Q1-CH for emacs-orgmode@gnu.org; Fri, 07 May 2021 09:06:45 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id BEECFCC7; Fri, 7 May 2021 09:06:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Fri, 07 May 2021 09:06:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= references:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= BmgE6BxckThOiBu1vTEZGvNENs42Q+4R9xhIlaTVwNw=; b=rxr44GyTjPvArmyt ImYreVS7+s/5HAAw0eHvjdwtTn3/IwXYkE+KQ18NW+HpOCfLmVuAxH9ZadTw0hT+ mXA6Koxxm7kFy27oSS1PXLwDo78zubkf5vonOcPuqHlPkDjikiG9ueSiOWV0sAcY 39lazym7wRbkQBQLDfPX6fJmyZtYDduiZROMBFZZi+LpfI2oP65FLT/H3Z1ene8/ K/mV+RXJKrWE9TEgElJnBVvHsyYyyIv/nk9z0O6bIDICINLZ4N81/d5dkrEBe6z6 XnGoIHyScJy4bvkJybsA7zE9OCtX3MNWB4OKboZyxMEJbD3fTQoMOPNK0bxekqBM cFX+Jg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=BmgE6BxckThOiBu1vTEZGvNENs42Q+4R9xhIlaTVw Nw=; b=QjW4y+ZNe3ONh4bqZKczDoHkmZVPUbWXeWGV7373YK1rDfvQ9CqaPL53b XVsMJksf5H6WMhWJOu1PFN1OvKFXWuiND78J2rjqhIflfcVCSA5XgE3ySFq+exsp RGOzubvdK0Ch+UZRqseDLDkF+hRpvx9W/OOofMQVq12mYWpUm6tpeGqWkrGr/P+8 K5kP4JhTpW0yVGLWKKCrZQZ+w+NA/RFjKURC9sNiuDp4JrhaZ9drs/xNbl4PG6Xf h3psrK262Hn645WhIobEdkqm1ZSiaZSx459/7XJHxt8DOCqwrBwaM9mRK+LUQMJb BHOpyVMrkkduwK2LXr9d2CJQMRALg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegvddgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvufffjgfkgggtgfesthhqredttderjeenucfhrhhomheplfhoohhs thcumfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghrshesfhgrshhtmhgrihhlrdhfmh eqnecuggftrfgrthhtvghrnhepvddvgfeghfdtiefhvedvvddtjefhleejveeltdelffev hfeijeekhfdutdffgeefnecukfhppeefuddrudejrddvhedurdduleelnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhsthhkrhgvmhgv rhhssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from Swift.fastmail.com (ip1f11fbc7.dynamic.kabel-deutschland.de [31.17.251.199]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 May 2021 09:06:38 -0400 (EDT) References: <87fsyy6at8.fsf@fastmail.fm> <875yzuk9qd.fsf@posteo.de> User-agent: mu4e 1.5.12; emacs 27.2.50 From: Joost Kremers To: Titus von der Malsburg Subject: Re: CSL-JSON support for =parsebib= Date: Fri, 07 May 2021 14:34:25 +0200 In-reply-to: <875yzuk9qd.fsf@posteo.de> Message-ID: <875yzuwv4z.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.19; envelope-from=joostkremers@fastmail.fm; helo=wout3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode List Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620392880; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=BmgE6BxckThOiBu1vTEZGvNENs42Q+4R9xhIlaTVwNw=; b=CmCABM7WnByuCQgJaPZxU62K6Pyg/S6yetWWEetgLgvI4bDIh6zxDgMnVFu6LAuX+17X+N wnvt7zT54OiUEaM3gTYdNnQLjkCDVHP7EI3SD4AIOezc9rrmTagy/tOfTANJPTBtmpGKYU sR8GHjVpR44Nx0iOjZd1m875nOJfuWTGOhLmRofN05cjapTlQEnl/G1G1BBktftlfmwO/g AWcT/tmAi81Z7PHuu02uRJDiJkrQDqj2KulgICXaGxbqCQT4QPH+5f805S78Dzskk+1XGe VoNSO/FADQCTVNEoadrL9DnpU0tOYnSPN4NfcgpA3HW1vhW4hobk5nSxV6ahSA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620392880; a=rsa-sha256; cv=none; b=NCWFQyTWVIIi/TvOkjKM6XxInrnwltDQz5V1fbt8cqzIfYJnF4FnG/Uf+0o5otvUDRzZ2e cpROdStvQUrkP/ACniy1mEtmr+xRCgZBXcKgstV9OI9GbiIH/FoY0Zx+WaJuIhAi1tqoEp hH6Anq/198g88A3zgQ5oDP1PXJhmaIBtX5VFxc2xlhFNnOgGAgzEyp9NUOTuVboohvkChc tQfrBWvm4d7O/6YLxBdAR7CbY0ZMUYH/Ny/zjvabXPlLXg23GWCVn3pQ6xCB0m9YAz3plG jPyv2z205lRVXuskc6B0RWp+38QIwVwhnAeBY014bXvz9FqVrRTAtclwQuFOHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b=rxr44GyT; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=QjW4y+ZN; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: 0.35 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b=rxr44GyT; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=QjW4y+ZN; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: CD5081B9D8 X-Spam-Score: 0.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: O4BcbIC7ahCT Hi Titus, On Fri, May 07 2021, Titus von der Malsburg wrote: > I=E2=80=99m the maintainer of bibtex-completion, helm-bibtex, and ivy-bib= tex. My name is > actually Titus, not Theo ;) :$ (I do apologise!) > Regarding the symbols vs. string issue: I don=E2=80=99t have a strong opi= nion, but > personally tend to favor a conservative solution that avoids braking chan= ges. > First, it=E2=80=99s difficult to predict how switching to symbols is goin= g to affect > other software including custom code written by users. Second, JSON key n= ames > can contain spaces and other weird stuff. Apparently, =3Djson-parse-{buffer|string}=3D then gives you a symbol with a= space in it... > So strings are perhaps a more natural > choice anyway. (It appears that you can actually configure the JSON parse= r to > use strings instead of symbols. See variable `json-key-type`.) This works for the Elisp library =3Djson.el=3D, but Emacs 27 can be compile= d with native JSON support, which, however, doesn't provide this option, unfortuna= tely. > Finally, > it=E2=80=99s not necessarily clear that avoiding the conversion to string= s saves > sufficiently many CPU cycles to justify the effort. I can simply try it out. Shouldn't be difficult to code up. > Regarding support for CSL-JSON: bibtex-completion is currently very > BibTeX-oriented and uses fairly low-level parsing functions from parsebib= . We > could add similar support for CSL-JSON I'm afraid that won't be possible, because the CLS-JSON support in parsebib isn't low-level. ;-) There's basically just a single function that gives yo= u all the entries in the buffer and that's it. > Some rough ideas for such an API (just for illustration): > - A function that returns all entries in a .bib or CSL-JSON file. Those already exist... ;-) For JSON, that's basically the only option, beca= use the actual parsing isn't handled by parsebib. For BibTeX, such a function h= as existed for some time now. > - A function that returns an entry with a specific key (or multiple entri= es). That would be easy to support, but IMHO is better handled in bibtex-complet= ion: just parse the buffer and then call =3Dgethash=3D on the resulting hash tab= le. Or what use-case do you have in mind? > - Functions for resolving strings and cross-references. This, too, is something that parsebib already does. parsebib has a lower-level API and a higher-level API, and the latter does essentially what you suggest here. I thought bibtex-completion was already = using it... --=20 Joost Kremers Life has its moments