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 MGL5GfkAYGJTcAEAbAwnHQ (envelope-from ) for ; Wed, 20 Apr 2022 14:47:53 +0200 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 GBgGGvkAYGLrGwAA9RJhRA (envelope-from ) for ; Wed, 20 Apr 2022 14:47:53 +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 9CDC11571F for ; Wed, 20 Apr 2022 14:47:51 +0200 (CEST) Received: from localhost ([::1]:33936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh9kL-0002kH-1d for larch@yhetil.org; Wed, 20 Apr 2022 08:47:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh9hb-0000uf-B9 for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 08:45:12 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:45756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nh9hR-000519-8T for emacs-orgmode@gnu.org; Wed, 20 Apr 2022 08:44:54 -0400 Received: by mail-ej1-x62b.google.com with SMTP id lc2so3242396ejb.12 for ; Wed, 20 Apr 2022 05:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew.cmu.edu; s=google-2021; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nxFO/b/Iehl6u+QlsE+2YfL10EO18Ijf7gZeJALeY70=; b=i+/j0k2gHTOqL6yo12Y8aXlKXeNVTF+OhiavLBrrup9su+gHMBUJd6TL8qe1BjvPc4 1SlMx8juM0jeINDYaPkvF/qLowNA3J9So+lEysbtxeb6MJZSNTpdPHx06WDhIPX6WwxY t59NX2tUHzO7ildA6zZ7CZo7uIKWAotjfoai5tXs9vpI0G4VyzxFHIKeWdlzbTeJ+4EI X/8TbGOz5SBZh+Jnd4PTsVYjsP9Rg+HySL0HrO+KFZp60psw2WXwWzp6Oa6w8dPeOT1U cse5Ji7UqrSI/E8X2h9vD551ePhK9ftE86mLwmIyxvdULvwCDZ+fM20sWn6K+ctLLmoG Zing== 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=nxFO/b/Iehl6u+QlsE+2YfL10EO18Ijf7gZeJALeY70=; b=bQsjwYS1inPNw+juYAK/XlHvCFnKyqsJ+A54oYAH1y1CwcTDelbNWnPtX71l0BVVLx cqCj+jJHm8EkkgOWOviywrgx7QkhYFkWGp8P82toGSCy+/Wj81xidvm6Zha0yEaY+LAS D/w9PZdRTjhuyg8n/x7SokeDMET3qLd585eEZr2ml3LlM0JLZBjgKSKdO8GtgbyQ9l7z IqMmu9NQOVvvMuW4NQ5xFwWrP9rb4ttwQDqzEUjcJ2Shy3mmWglTcTwSuSr0dOTnZUaq rGvyb8xPYgkrOaM4317xHE+TZ9Oqs9Kh3DWTT6RPrWHEePzb+uKex/diBsxzgEjXTFDM fZng== X-Gm-Message-State: AOAM5307Ikj5g+vv55DGdvSzyGIE+JytgqJccOTDX0rmZPHf2GFMe592 ulVx30Ga1bWJ2rsQKQjeP/lQE2DaWxLSehGXHjk= X-Google-Smtp-Source: ABdhPJyTdh2oUK1md+FOl58OmjJ9YvwIxB1mIWIvmo1skIMgHJg3CDkSEz8+Lj412wS3vohy17e1DG5wcKrlo7QTmxM= X-Received: by 2002:a17:906:1cd1:b0:6ec:c59:6a1d with SMTP id i17-20020a1709061cd100b006ec0c596a1dmr17500293ejh.77.1650458683795; Wed, 20 Apr 2022 05:44:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: John Kitchin Date: Wed, 20 Apr 2022 08:44:32 -0400 Message-ID: Subject: Re: [PATCH] oc-basic: Detect malformed bibtex bibliographies To: "Bruce D'Arcus" Content-Type: multipart/alternative; boundary="000000000000906cc305dd155b68" Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=johnrkitchin@gmail.com; helo=mail-ej1-x62b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=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=no 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: , Cc: org-mode-email 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=1650458873; 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=nxFO/b/Iehl6u+QlsE+2YfL10EO18Ijf7gZeJALeY70=; b=M+D7vmN2EmgSGhWCcMSmB3dS8nQ++m/pZOV8Jbz8wI7tPJ8a+IwTZqaVl5sv8qDuRHbjVq YeX/7OuNQKnwVQ/5sCiQnzl8dcnIh5GQU0H9kNJf2nprsYLDkDRgLUAaCM4vZzUxMFYvXx KiuIXRvgeWE91UrmhSuPf55eJjBBTfMcBI/6OKX7S+AYwwukaPSnkxHUjGCbZiFI8NrSj8 YcGlDaQsuLAnRiWmA+S1DN7gVKVmmlJCMqF3NwziyR6bL4cJ1Qb76gjqh4zNNjXrg9iCmE SYOrnZe+XeTZuH1lBI3PSSPr2cJji4YPJslX90fh2r0f+w+5pALGbdG7Y7GI6w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1650458873; a=rsa-sha256; cv=none; b=ruuHJC2b8LyfZjkBBZVpQUyhWlKpcLD3WKF06WqlGemxuPsK4xO1whyghiXsNo6uOGKHFc D2wKLxQDLPJssqGw6+B2emNxi3En3zahuBZVb+ZsKXuDszJTZW5uiQClcENReYNHyGi6N0 izNkTvOqg24m4ZSzr/fg5ekW917ugXpx3BwjO+eJZXxJ6Q6V2+OtFOwy1Uxh+95Aedc0xN Lw2JFDtFp20/9o9JE/ZMKPqi2310CI3K6/E5tRyzRcxiNuTPQ0trFQNivT4WdIW0vjG9r+ 0aQKSb6aab9wJmNKyQkb1Up6Of6ucIqZXz0frWCdq29zashJbgKQKNoAoaIgZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b="i+/j0k2g"; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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: -8.84 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew.cmu.edu header.s=google-2021 header.b="i+/j0k2g"; dmarc=pass (policy=none) header.from=andrew.cmu.edu; 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: 9CDC11571F X-Spam-Score: -8.84 X-Migadu-Scanner: scn0.migadu.com X-TUID: Vvrt//V6y0Is --000000000000906cc305dd155b68 Content-Type: text/plain; charset="UTF-8" I would see if you can cache the result and not do it more than needed; it can add a performance issue on large files. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Wed, Apr 20, 2022 at 8:39 AM Bruce D'Arcus wrote: > On Wed, Apr 20, 2022 at 8:28 AM Ihor Radchenko wrote: > > > > There is an edge case triggering infinite loop in oc-basic. > > > > It is caused by bibtex-map-entries (used in > > org-cite-basic--parse-bibtex) when ran on a malformed bibtex buffer [1]. > > > > The proposed patch validates the bibtex buffer before processing and > > throws an error if issues are found. `bibtex-validate` also > > conveniently displays a list of errors with clickable links to > > problematic lines. > > > > I believe that it is useful for the users to see such issues instead of, > > say, failing silently on malformed bibliographies. > > > > WDYT? > > I haven't tested it, but this is an excellent idea! > > Bruce > > > Best, > > Ihor > > > > [1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55036 > > > > * lisp/oc-basic.el (org-cite-basic--parse-bibtex): Validate the > > bibliography before parsing. Display list of issues if any (via > > `bibtex-validate`). > > (org-cite-basic--parse-bibliography): Set buffer file name needed by > > `bibtex-validate`. Empty the cache in case of error. > > --- > > lisp/oc-basic.el | 38 ++++++++++++++++++++++++-------------- > > 1 file changed, 24 insertions(+), 14 deletions(-) > > > > diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el > > index 873986d07..79f7a4844 100644 > > --- a/lisp/oc-basic.el > > +++ b/lisp/oc-basic.el > > @@ -214,6 +214,10 @@ (defun org-cite-basic--parse-bibtex (dialect) > > (let ((entries (make-hash-table :test #'equal)) > > (bibtex-sort-ignore-string-entries t)) > > (bibtex-set-dialect dialect t) > > + ;; Throw an error if bibliography is malformed. > > + (unless (bibtex-validate) > > + (user-error "Malformed bibliography at %S" > > + (or (buffer-file-name) (current-buffer)))) > > (bibtex-map-entries > > (lambda (key &rest _) > > ;; Normalize entries: field names are turned into symbols > > @@ -258,21 +262,27 @@ (defun org-cite-basic--parse-bibliography > (&optional info) > > (when (or (org-file-has-changed-p file) > > (not (gethash file > org-cite-basic--file-id-cache))) > > (insert-file-contents file) > > + (setf (buffer-file-name) file) > > (puthash file (org-buffer-hash) > org-cite-basic--file-id-cache)) > > - (let* ((file-id (cons file (gethash file > org-cite-basic--file-id-cache))) > > - (entries > > - (or (cdr (assoc file-id > org-cite-basic--bibliography-cache)) > > - (let ((table > > - (pcase (file-name-extension file) > > - ("json" (org-cite-basic--parse-json)) > > - ("bib" (org-cite-basic--parse-bibtex > 'biblatex)) > > - ("bibtex" > (org-cite-basic--parse-bibtex 'BibTeX)) > > - (ext > > - (user-error "Unknown bibliography > extension: %S" > > - ext))))) > > - (push (cons file-id table) > org-cite-basic--bibliography-cache) > > - table)))) > > - (push (cons file entries) results))))) > > + (unwind-protect > > + (condition-case nil > > + (unwind-protect > > + (let* ((file-id (cons file (gethash file > org-cite-basic--file-id-cache))) > > + (entries > > + (or (cdr (assoc file-id > org-cite-basic--bibliography-cache)) > > + (let ((table > > + (pcase (file-name-extension > file) > > + ("json" > (org-cite-basic--parse-json)) > > + ("bib" > (org-cite-basic--parse-bibtex 'biblatex)) > > + ("bibtex" > (org-cite-basic--parse-bibtex 'BibTeX)) > > + (ext > > + (user-error "Unknown > bibliography extension: %S" > > + ext))))) > > + (push (cons file-id table) > org-cite-basic--bibliography-cache) > > + table)))) > > + (push (cons file entries) results)) > > + (setf (buffer-file-name) nil)) > > + (error (setq org-cite-basic--file-id-cache nil))))))) > > (when info (plist-put info :cite-basic/bibliography results)) > > results))) > > > > -- > > 2.35.1 > > > > > > > > -- > > Ihor Radchenko, > > PhD, > > Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) > > State Key Laboratory for Mechanical Behavior of Materials, Xi'an > Jiaotong University, Xi'an, China > > Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg > > > > --000000000000906cc305dd155b68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I would see if you can cache the result and not do it more= than needed; it can add a performance issue on large files.

John

-------= ----------------------------
Professor John Kitchin (he/him/his)
Dohe= rty Hall A207F
Department of Chemical Engineering
Carnegie Mellon Uni= versity
Pittsburgh, PA 15213
412-268-7803
=

On Wed, Apr 20, 2022 at 8:39 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:
On Wed, Apr 20, 2022 at 8:28 AM = Ihor Radchenko <= yantar92@gmail.com> wrote:
>
> There is an edge case triggering infinite loop in oc-basic.
>
> It is caused by bibtex-map-entries (used in
> org-cite-basic--parse-bibtex) when ran on a malformed bibtex buffer [1= ].
>
> The proposed patch validates the bibtex buffer before processing and > throws an error if issues are found.=C2=A0 `bibtex-validate` also
> conveniently displays a list of errors with clickable links to
> problematic lines.
>
> I believe that it is useful for the users to see such issues instead o= f,
> say, failing silently on malformed bibliographies.
>
> WDYT?

I haven't tested it, but this is an excellent idea!

Bruce

> Best,
> Ihor
>
> [1] https://debbugs.gnu.org/cgi/bugreport.= cgi?bug=3D55036
>
> * lisp/oc-basic.el (org-cite-basic--parse-bibtex): Validate the
> bibliography before parsing.=C2=A0 Display list of issues if any (via<= br> > `bibtex-validate`).
> (org-cite-basic--parse-bibliography): Set buffer file name needed by > `bibtex-validate`.=C2=A0 Empty the cache in case of error.
> ---
>=C2=A0 lisp/oc-basic.el | 38 ++++++++++++++++++++++++--------------
>=C2=A0 1 file changed, 24 insertions(+), 14 deletions(-)
>
> diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
> index 873986d07..79f7a4844 100644
> --- a/lisp/oc-basic.el
> +++ b/lisp/oc-basic.el
> @@ -214,6 +214,10 @@ (defun org-cite-basic--parse-bibtex (dialect)
>=C2=A0 =C2=A0 (let ((entries (make-hash-table :test #'equal))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (bibtex-sort-ignore-string-entries t= ))
>=C2=A0 =C2=A0 =C2=A0 (bibtex-set-dialect dialect t)
> +=C2=A0 =C2=A0 ;; Throw an error if bibliography is malformed.
> +=C2=A0 =C2=A0 (unless (bibtex-validate)
> +=C2=A0 =C2=A0 =C2=A0 (user-error "Malformed bibliography at %S&q= uot;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (or (b= uffer-file-name) (current-buffer))))
>=C2=A0 =C2=A0 =C2=A0 (bibtex-map-entries
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (key &rest _)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Normalize entries: field names are= turned into symbols
> @@ -258,21 +262,27 @@ (defun org-cite-basic--parse-bibliography (&= optional info)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (or (org-file-ha= s-changed-p file)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 (not (gethash file org-cite-basic--file-id-cache)))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (insert-file-co= ntents file)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setf (buffer-file-n= ame) file)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (puthash file (= org-buffer-hash) org-cite-basic--file-id-cache))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let* ((file-id (cons file (= gethash file org-cite-basic--file-id-cache)))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= (entries
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= (or (cdr (assoc file-id org-cite-basic--bibliography-cache))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (let ((table
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(pcase (file-name-extension file)=
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("json" (org-cit= e-basic--parse-json))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("bib" (org-cite= -basic--parse-bibtex 'biblatex))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0("bibtex" (org-c= ite-basic--parse-bibtex 'BibTeX))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(ext
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (user-error "Unknown= bibliography extension: %S"
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 ext)))))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 (push (cons file-id table) org-cite-basic--bibliograp= hy-cache)
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 table))))
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push (cons file ent= ries) results)))))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (unwind-protect
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (condition-ca= se nil
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= (unwind-protect
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0(let* ((file-id (cons file (gethash file org-cite-basic--file= -id-cache)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(entries
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (or (cdr (assoc file-id org-cite= -basic--bibliography-cache))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (let ((table
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0(pcase (file-name-extension file)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0("json" (org-cite-basic--parse-json))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0("bib" (org-cite-basic--parse-bibtex 'biblat= ex))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0("bibtex" (org-cite-basic--parse-bibtex 'Bib= TeX))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(ext
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 (user-error "Unknown bibliography extension: %S"= ;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ext)))))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (push (cons= file-id table) org-cite-basic--bibliography-cache)
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 table)))) > +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 (push (cons file entries) results))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 (setf (buffer-file-name) nil))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (error= (setq org-cite-basic--file-id-cache nil)))))))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when info (plist-put info :cite-basic/bibl= iography results))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 results)))
>
> --
> 2.35.1
>
>
>
> --
> Ihor Radchenko,
> PhD,
> Center for Advancing Materials Performance from the Nanoscale (CAMP-na= no)
> State Key Laboratory for Mechanical Behavior of Materials, Xi'an J= iaotong University, Xi'an, China
> Email: yantar9= 2@gmail.com, ihor_radchenko@alumni.sutd.edu.sg
>

--000000000000906cc305dd155b68--