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

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

[elpa] externals/org fbd08a0d9b 2/3: oc-basic: Display ?? in place of mi


From: ELPA Syncer
Subject: [elpa] externals/org fbd08a0d9b 2/3: oc-basic: Display ?? in place of missing citations on export
Date: Thu, 29 Dec 2022 09:57:53 -0500 (EST)

branch: externals/org
commit fbd08a0d9bcd606867cfb5e5beaea9a524565312
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    oc-basic: Display ?? in place of missing citations on export
    
    * lisp/oc-basic.el (org-cite-basic--format-author-year):
    (org-cite-basic-export-citation): Display "????" for missing year and
    "??"  for missing other fields.
    
    Reported-by: Ihor Radchenko <yantar92@posteo.net>
    Link: https://orgmode.org/list/871qr6kiuv.fsf@localhost
---
 lisp/oc-basic.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 01e314bfdb..1c56f6f805 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -580,8 +580,8 @@ INFO is the export state, as a property list."
                      (suffix (org-element-property :suffix ref)))
                  (funcall format-ref
                           prefix
-                          (org-cite-basic--get-author k info)
-                          (org-cite-basic--get-year k info)
+                          (or (org-cite-basic--get-author k info) "??")
+                          (or (org-cite-basic--get-year k info) "????")
                           suffix)))
              (org-cite-get-references citation)
              org-cite-basic-author-year-separator)
@@ -652,15 +652,17 @@ export communication channel, as a property list."
          (org-export-data
           (mapconcat
            (lambda (key)
-             (let ((author (org-cite-basic--get-author key info)))
-               (if caps (capitalize author) author)))
+             (or
+              (let ((author (org-cite-basic--get-author key info)))
+                (if caps (capitalize author) author))
+              "??"))
            (org-cite-get-references citation t)
            org-cite-basic-author-year-separator)
           info)))
       ;; "noauthor" style.
       (`(,(or "noauthor" "na") . ,variant)
        (format (if (funcall has-variant-p variant 'bare) "%s" "(%s)")
-               (mapconcat (lambda (key) (org-cite-basic--get-year key info))
+               (mapconcat (lambda (key) (or (org-cite-basic--get-year key 
info) "????"))
                           (org-cite-get-references citation t)
                           org-cite-basic-author-year-separator)))
       ;; "nocite" style.



reply via email to

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