Re: [PATCH] oc-csl: Fix footnote status reporting for wrapped citations

2021-11-02 Thread Nicolas Goaziou
Hello,

András Simonyi  writes:

> the attached simple patch fixes a problem in oc-csl.el which led to
> missing footnote number information for citations that were
> automatically footnote-wrapped based on the used CSL style.

Applied with a small change. Thank you.

> +  (setq footnote (org-element-lineage citation
> +  '(footnote-definition 
> footnote-reference

I removed `footnote-definition', which cannot happen after a call to
`org-cite-wrap-citation'.

Regards,
-- 
Nicolas Goaziou



[PATCH] oc-csl: Fix footnote status reporting for wrapped citations

2021-11-02 Thread András Simonyi
Dear All,

the attached simple patch fixes a problem in oc-csl.el which led to
missing footnote number information for citations that were
automatically footnote-wrapped based on the used CSL style.

best wishes,
András
From 1423e0f600d8e4e29f275faa9c9117db9b081b19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A1s=20Simonyi?= 
Date: Tue, 2 Nov 2021 16:44:37 +0100
Subject: [PATCH] oc-csl: Fix footnote status reporting for wrapped citations

* lisp/oc-csl.el (org-cite-csl--create-structure): Update footnote information
when citation is wrapped in a footnote.
---
 lisp/oc-csl.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index 42886dc44..f59b14a88 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -506,7 +506,9 @@ INFO is the export state, as a property list."
 ;; a footnote, but isn't yet.
 (when (and (not footnote) (org-cite-csl--note-style-p info))
   (org-cite-adjust-note citation info)
-  (org-cite-wrap-citation citation info))
+  (org-cite-wrap-citation citation info)
+  (setq footnote (org-element-lineage citation
+  '(footnote-definition footnote-reference
 ;; Return structure.
 (apply #'citeproc-citation-create
`(:note-index
-- 
2.25.1