summaryrefslogtreecommitdiff
path: root/lisp/org/oc-basic.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2022-06-27 06:30:25 +0200
committerStefan Kangas <stefan@marxist.se>2022-06-27 06:30:25 +0200
commit087476bce183a404b2a7e62b15b5033504cb4819 (patch)
tree9e3036a0ef00c13a2c8b84d2ab5027a521134b92 /lisp/org/oc-basic.el
parent677d740e14adc30a8544220b9c49ea9c1527182b (diff)
parent48bda83d3591d33c5bb8292d9edb06ef3c3f93bd (diff)
downloademacs-087476bce183a404b2a7e62b15b5033504cb4819.tar.gz
emacs-087476bce183a404b2a7e62b15b5033504cb4819.tar.bz2
emacs-087476bce183a404b2a7e62b15b5033504cb4819.zip
Merge from origin/emacs-28
48bda83d35 Update to Org 9.5.4-3-g6dc785 c66b90a534 Mention Solaris 10 'make clean' and 'make check' ade34cf821 Mention further crashes on Solaris 10
Diffstat (limited to 'lisp/org/oc-basic.el')
-rw-r--r--lisp/org/oc-basic.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 775690f1767..9ed1b810fab 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -189,7 +189,14 @@ Return a hash table with citation references as keys and fields alist as values.
(cons 'year
(cond
((consp date)
- (caar date))
+ (let ((year (caar date)))
+ (cond
+ ((numberp year) (number-to-string year))
+ ((stringp year) year)
+ (t
+ (error
+ "First element of CSL-JSON date-parts should be a number or string, got %s: %S"
+ (type-of year) year)))))
((stringp date)
(replace-regexp-in-string
(rx