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

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

[elpa] externals/org 104311c7f8 2/2: org-cite-basic--get-field: Throw an


From: ELPA Syncer
Subject: [elpa] externals/org 104311c7f8 2/2: org-cite-basic--get-field: Throw an error on non-nil field values
Date: Tue, 17 Jan 2023 07:58:08 -0500 (EST)

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

    org-cite-basic--get-field: Throw an error on non-nil field values
    
    * lisp/oc-basic.el (org-cite-basic--get-field): Throw an error when
    the field value is not a string.  Document the new behavior.
    
    Link: https://orgmode.org/list/87edsnsocj.fsf@localhost
---
 lisp/oc-basic.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 62165d98e5..12b627e71c 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -332,7 +332,9 @@ Optional argument INFO is the export state, as a property 
list.
 
 Return value may be nil or a string.  If current export back-end is derived
 from `latex', return a raw string instead, unless optional argument RAW is
-non-nil."
+non-nil.
+
+Throw an error if the field value is non-string and non-nil."
   (let ((value
          (cdr
           (assq field
@@ -343,6 +345,8 @@ non-nil."
                    entry-or-key)
                   (_
                    (error "Wrong value for ENTRY-OR-KEY: %S" 
entry-or-key)))))))
+    (when (and value (not (stringp value)))
+      (error "Non-string bibliography field value: %S" value))
     (if (and value
              (not raw)
              (org-export-derived-backend-p (plist-get info :back-end) 'latex))



reply via email to

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