From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MDfwNKyCsGI1UAAAbAwnHQ (envelope-from ) for ; Mon, 20 Jun 2022 16:22:36 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qLjsNKyCsGJBMwAAauVa8A (envelope-from ) for ; Mon, 20 Jun 2022 16:22:36 +0200 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 680EF26111 for ; Mon, 20 Jun 2022 16:21:03 +0200 (CEST) Received: from localhost ([::1]:52820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o3IH0-0005SN-43 for larch@yhetil.org; Mon, 20 Jun 2022 10:21:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43908) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o3I9c-0004p8-V3 for emacs-orgmode@gnu.org; Mon, 20 Jun 2022 10:13:25 -0400 Received: from mail-oa1-x32.google.com ([2001:4860:4864:20::32]:44018) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o3I9b-0007ws-Ar for emacs-orgmode@gnu.org; Mon, 20 Jun 2022 10:13:24 -0400 Received: by mail-oa1-x32.google.com with SMTP id 586e51a60fabf-fe023ab520so14375205fac.10 for ; Mon, 20 Jun 2022 07:13:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WPaaPlpn1jtOmghECEu9dW7bYYsS/PmHlNQkGVG08aw=; b=DLHuz/P6TR6N+YNGy3sOs9/qob9Q3gyxPatYkkJ59x7+TXHO9KQsMLXHf9N0bq4Mjy RK3gy65oHPausIprNcX1a6xV5V+aUVFsBtc/iRvLDCkGxV9l24LziAdsVFsvG1lEJgl8 w1iLroaBfNsV9/6ca7f2O695Re4ZlxlTxhQttvYR86eKZqij0Lp5hIzJbkDmeaiLgJ4t xjGS/UtT+YWAhuxpn9X1Ij0K+vw6ws1vAP60fX4W5ah9Z1wyKZeUvOz58/XyLuuWk1vA 83iff13CTpCFWNxhg6OC5JG/mVKhh0l+J/J01Ts+2KGUsIi0IViH3kKZ87nRxLG5hzyi hhLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WPaaPlpn1jtOmghECEu9dW7bYYsS/PmHlNQkGVG08aw=; b=Z0E/j4668Qug2of3Zn6Uw1FBBaJHjL4kTuGe34QH5esaTyJuJfOfjPh0S0dKUpupxC uOpGVD+Ioz71Zdqx+lcP+SPcUUEQUD80UUopIM6qtJCC0bQRKkSh/goA28WI/6qaHPTU +YLiKhoCQuWchtFuLHsBcNy7KaYiWsZqz0IH3IjGIb2bydBFLMZWzLxypcZIqrOUNnV8 H2folPtMQHFnCVETH25AulyA06x6uBjrXFzPcXiolaTsRbTiRCl2HgfH6gT1XR1NAS/D jIkiVfnk+r13ah9QyrJ2i5lv5YuRjx0EgIWRIXGKpM0ae7OvlzgnKYgUOe3ZsxD68Fie KyZA== X-Gm-Message-State: AJIora9T9VEaANRgd0ojDSBoBsbVx3FR5UQ4s0Dtzn6wRFemAujbgOWd eIO4dAmX10eNZrBEdVNgVPBHjTEJcMYpPVulPB5pK+hVbes= X-Google-Smtp-Source: AGRyM1u0eHk4rN02DlhYvx9k9s5fLVtiy1HPkqFRrwenHhhudEo83IwGBfSV8bJgn5Hmxfp9TFGwoUwSiZhXAfHBxp8= X-Received: by 2002:a05:6870:790:b0:e5:c4c7:f6b6 with SMTP id en16-20020a056870079000b000e5c4c7f6b6mr13065036oab.287.1655734400959; Mon, 20 Jun 2022 07:13:20 -0700 (PDT) MIME-Version: 1.0 References: <87h74h4ecd.fsf@localhost> <8735fz4k0i.fsf@localhost> In-Reply-To: From: =?UTF-8?B?RGF2aWQgTHVrZcWh?= Date: Mon, 20 Jun 2022 16:13:45 +0200 Message-ID: Subject: Re: oc-basic: CSL-JSON year as number vs. string (nativecomp?) To: "Bruce D'Arcus" Cc: Ihor Radchenko , org-mode-email Content-Type: multipart/mixed; boundary="000000000000cfdb8c05e1e1b4b6" Received-SPF: pass client-ip=2001:4860:4864:20::32; envelope-from=dafydd.lukes@gmail.com; helo=mail-oa1-x32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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: 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1655734863; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WPaaPlpn1jtOmghECEu9dW7bYYsS/PmHlNQkGVG08aw=; b=oX/SSHCvXLdA5cXLzvWMgxz5lJEss4CYdz+nOOkkO0c559pyED5rd7N9bbjj8FEr6AyP1Z wvHOggSqgqG0CA80KDhHrNziFtuY8yz+RakBk09v0+90nyYS4g2oXLfLQRJq8AOa+/dsFb Qa6rFZ1FOSRiQ9oib4w17b0eRBrBtB1VbzfjpA6aas6K/1b/3x30OJgNigpYp9h8TLVKHe Nwjj2qe+zbcYFUcCXaI2G7Ho/HVZiT8Y/XmwZd7Uw2qCGqo/C65lDAxhYcP6DMEcwGft/M Wglpr6EISI4dIiQiguJ6JOl0ZNeeMpc41EHgnxkJzxO4bgyO9dF5I+CLDDbnIg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1655734863; a=rsa-sha256; cv=none; b=d2bwKafopnd8aQF0gMUcTImCfhAV173e0bhV9YesgeKYvCDlsGzt3tvUxYZWOmaaIWb1n7 YkfUQIzHyOA3b3P335D/hR+4tLh/bbx90Df1+KLuRHsljTru3aZwYM+vt+TkKLZa7WVDoI C+7daskVFYplRDCPdRRcpqnn6hWKUkOXNacKqJ7CHYuxwVYyRo/orDWFBJzszLQMW9UO6t WkqcsyaJ3viE8inehzQKXhVXQggrvrMpqdP/ZLZXSotpMI9/mIu0aUB+srQIXNjKuO2nCt r2whRXQv/jk4HIyc+nP1VL2SaBhJJ0K3O06HlqOXvHjXQTVyABxHnzhY7Lwwdw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="DLHuz/P6"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -7.87 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="DLHuz/P6"; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: 680EF26111 X-Spam-Score: -7.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: sIFTNHuqVUaI --000000000000cfdb8c05e1e1b4b6 Content-Type: text/plain; charset="UTF-8" > I created CSL, and have helped develop the data schema. Well, that's what I call a reliable source :) I suppose this is as good a time as any to say thanks for all that! > it's likely we'll change the date property to prefer an > EDTF string Will that be stored in the `raw` or `literal` field? In that case, the current implementation should work with (not too wild) EDTF strings. If not, code will have to be added to extract the value from the appropriate field. > I'd prefer an explicit cond here. format "%s" may silently > work on malformed json files and will mask issues with > bibliography from the user. Sure, good idea :) > Would you mind creating a patch and possibly supplying a test > that will make sure that the example file and similar are correctly > parsed? I'm attaching a patch (just the patch for now, no commit message), let me know what you think, in particular the error message. What would be an acceptable way to wrap the format string? As for tests -- if `oc-basic.el` already had some, I'd try to see if I can come up with something by analogy. But as it stands, I know too little about Elisp, nothing about Elisp testing, and have too little spare time, sorry :( Best, David --000000000000cfdb8c05e1e1b4b6 Content-Type: text/x-patch; charset="US-ASCII"; name="oc-basic.el.patch" Content-Disposition: attachment; filename="oc-basic.el.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l4mtgwot0 ZGlmZiAtLWdpdCBhL2xpc3Avb2MtYmFzaWMuZWwgYi9saXNwL29jLWJhc2ljLmVsCmluZGV4IGE5 MzdmNzUuLmYxMGI5NWIgMTAwNjQ0Ci0tLSBhL2xpc3Avb2MtYmFzaWMuZWwKKysrIGIvbGlzcC9v Yy1iYXNpYy5lbApAQCAtMTg5LDcgKzE4OSwxNCBAQCBSZXR1cm4gYSBoYXNoIHRhYmxlIHdpdGgg Y2l0YXRpb24gcmVmZXJlbmNlcyBhcyBrZXlzIGFuZCBmaWVsZHMgYWxpc3QgYXMgdmFsdWVzLgog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29ucyAneWVhcgogICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoY29uZAogICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKChjb25zcCBkYXRlKQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChjYWFyIGRhdGUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAobGV0ICgoeWVhciAoY2FhciBkYXRlKSkpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICgobnVtYmVycCB5ZWFyKSAobnVtYmVyLXRvLXN0cmluZyB5ZWFy KSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoc3RyaW5n cCB5ZWFyKSB5ZWFyKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVy cm9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkZp cnN0IGVsZW1lbnQgb2YgQ1NMLUpTT04gZGF0ZS1wYXJ0cyBzaG91bGQgYmUgYSBudW1iZXIgb3Ig c3RyaW5nLCBnb3QgJXM6ICVTIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICh0eXBlLW9mIHllYXIpIHllYXIpKSkpKQogICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKChzdHJpbmdwIGRhdGUpCiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHJlcGxhY2UtcmVnZXhwLWluLXN0cmluZwogICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHJ4Cg== --000000000000cfdb8c05e1e1b4b6--