emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org d0201d5 3/3: oc-csl: Fix global affixes


From: ELPA Syncer
Subject: [elpa] externals-release/org d0201d5 3/3: oc-csl: Fix global affixes
Date: Wed, 3 Nov 2021 11:57:25 -0400 (EDT)

branch: externals-release/org
commit d0201d5801f59a33a6e914286393cefafdb25f60
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    oc-csl: Fix global affixes
    
    * lisp/oc-csl.el (org-cite-csl--create-structure): Properly
    concatenate global affixes to the first or last cite, as intended.
---
 lisp/oc-csl.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index 7e2a0fb..7cd63c3 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -487,16 +487,20 @@ INFO is the export state, as a property list."
     (let ((global-prefix (org-element-property :prefix citation)))
       (when global-prefix
         (let* ((first (car cites))
-               (prefix (org-element-property :prefix first)))
-          (org-element-put-property
-           first :prefix (org-cite-concat global-prefix prefix)))))
+               (prefix-item (assq 'prefix first)))
+          (setcdr prefix-item
+                  (concat (org-element-interpret-data global-prefix)
+                          " "
+                          (cdr prefix-item))))))
     ;; Global suffix is appended to the suffix of the last reference.
     (let ((global-suffix (org-element-property :suffix citation)))
       (when global-suffix
         (let* ((last (org-last cites))
-               (suffix (org-element-property :suffix last)))
-          (org-element-put-property
-           last :suffix (org-cite-concat suffix global-suffix)))))
+               (suffix-item (assq 'suffix last)))
+          (setcdr suffix-item
+                  (concat (cdr suffix-item)
+                          " "
+                          (org-element-interpret-data global-suffix))))))
     ;; Check if CITATION needs wrapping, i.e., it should be wrapped in
     ;; a footnote, but isn't yet.
     (when (and (not footnote) (org-cite-csl--note-style-p info))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]