From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QHCPGuY2qGMVmwAAbAwnHQ (envelope-from ) for ; Sun, 25 Dec 2022 12:41:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CMaeGuY2qGPlGQAA9RJhRA (envelope-from ) for ; Sun, 25 Dec 2022 12:41:26 +0100 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 0D8543AEE2 for ; Sun, 25 Dec 2022 12:41:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9PNB-0008Nu-3h; Sun, 25 Dec 2022 06:40:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9PN9-0008N2-Lh for emacs-orgmode@gnu.org; Sun, 25 Dec 2022 06:40:55 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9PN7-00025y-Be for emacs-orgmode@gnu.org; Sun, 25 Dec 2022 06:40:55 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 231ED2400D0 for ; Sun, 25 Dec 2022 12:40:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671968451; bh=MgGlpZP+v+Ns9pZPSysmaiTjYZR3arOuWxTrnw5TV7c=; h=From:To:Cc:Subject:Date:From; b=EAtEe7BuY1H2c5KBSkZfYQ+T1vqn5elDfXm16MHbcnpY60guWA7x+4A9kltHeasiY 929Z9SHvkQw9bWHC6SNhoHJN0xLlUPuma4JCQNbeNlzvTo1//2mG06yFknZy1Zt3nt +n/WMocr0CIEUQL9Yj2CHuir+lldbAagurVUo7V8eGMNub7keVJW0rwM7EMkTOrCsX +BRFkbsiieKkVXGC6UCNsEbps+KwhGbtGCNQhRt4ETmAYBssTTgVa2SGQcpEyykcYa 2c3rT2tgy7pZqF8xwA21jAbQ1ugQDvpDFnvLMaqzStWMqKjCKnYvsAgkvPDHfFdGa8 SKaRckais9zEA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NfzWN07JZz9rxF; Sun, 25 Dec 2022 12:40:47 +0100 (CET) From: Ihor Radchenko To: Hugo Cisneros Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] oc-basic.el: Fix wrong type for the editors field when parsing JSON. In-Reply-To: <6964C697-B085-4554-9BA3-54A2E3C6DC22@gmail.com> References: <6964C697-B085-4554-9BA3-54A2E3C6DC22@gmail.com> Date: Sun, 25 Dec 2022 11:40:44 +0000 Message-ID: <87edsnsocj.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671968486; 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=MgGlpZP+v+Ns9pZPSysmaiTjYZR3arOuWxTrnw5TV7c=; b=oBN9OsNgb3rsmYNHPj1gZRLFDbqGv4ClElV9H1qdzJGp3l5/0j3fW+o9nxU6h2SCP6HIPv F0VWj60fESkqcwjDQNzz9zCinxeEtG98N2RychmdiRkrWLS8QsD0AC/j5IGsDi0Dl6ouJ6 yDDKUXYJelpwrpj88OER+lTpH0kl7hTtNF1poo1lgRBpp3NTQNI/tod7/4gfYSAU/nVv7P +DWcAy9yeBGlJ3bL9cJjbHssfrt0l4hqTScIMsE8Jw3gsy4466fFLJAhvLOK8criRdebWc ubRnV0s3G3Bb4voKoqbSsa/X9tcxjXJTGR8lrg0FycbI+av3Uaxq3uKeN+3fiA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EAtEe7Bu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1671968486; a=rsa-sha256; cv=none; b=CkunXQ14dgGpGkrU5Wqm5uFbAubbxpWWY/z+rsvccn00aR9YfuYNvZob5iIXfTeHz2Xx5V Ja39XG4wwqmrT/ck0Z7d3vO6TpNPGq7sQMT+Y6Dy+LHFxEgbroYGxs8GFEuKzeFAqh+VZr LRbXYdGvbu40NMKDaJXeuGUPW8Qsfui7aP2n9Srreld6dUpAZ4Cd95J63i2VhE5JiuwKK5 JZg19k3baObsOExo5Mli/XU6YeLEnKgQ8m1bswaTjXC3ELctN098MCczGXeDU7VS3gg8bH GvonQM/pP3T18TraSl46wmLhVZxQX4GiiEOByJR4VpkHmfmn6S32nRWXbXBTxQ== X-Spam-Score: -5.96 X-Migadu-Queue-Id: 0D8543AEE2 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=EAtEe7Bu; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -5.96 X-TUID: DVbCjA+Gs3GN Hugo Cisneros writes: > I use org-cite with a JSON bibliography and noticed a bug when an entry o= nly has > an "editors" field but no "authors" field. The function > `org-cite-basic=E2=80=94get-author' correctly falls back to using the edi= tors instead of > the authors, but `org-cite-basic--parse-json=E2=80=99 stringifies only th= e "authors" > field and not the "editors." This creates an error when other functions a= ssume > they got a string from `org-cite-basic=E2=80=94get-author'. The patch fix= es the issue by > applying the same transformation to both "authors" and "editors". Thanks! Applied onto bugfix. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3D318807013 Use are now also listed as an Org contributor. https://git.sr.ht/~bzg/worg/commit/c2bb6a52 > As explained in the ChangeLog entry, this points to a more general issue = where > `org-cite-basic--get-field' is expected to return nil or a string, but ca= lls > `org-cite-basic--get-entry' that may return an association list. I am not= sure > how to fix that since it means converting anything that > `org-cite-basic--get-entry' may return into a string. Non-string can only be for JSON bibliographies for fields that are not supported. `org-cite-basic--get-field' can probably return nil in such scenarios. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at