From: "David Lukeš" <dafydd.lukes@gmail.com>
To: emacs-orgmode@gnu.org
Subject: oc-basic: CSL-JSON year as number vs. string (nativecomp?)
Date: Sat, 18 Jun 2022 08:34:01 +0200 [thread overview]
Message-ID: <CAEPTPEyYFDPkBusfdEeeadtHmVbf-bXno_=-EKDJu0r6ET_gjQ@mail.gmail.com> (raw)
Hi all,
I've run into more problems with CSL-JSON support in oc-basic
(previously: https://list.orgmode.org/CAEPTPExcZKGAm3v-brzezfCwMM4h3hQtOq+89Qg+5ULJq1K4Yw@mail.gmail.com/).
I recently started to get errors like the following:
Error during redisplay: (jit-lock-function 544) signaled
(wrong-type-argument "Argument is not a string or a secondary string:
2007")
This patch makes them go away:
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index a937f7513..9e00310a4 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -189,7 +189,7 @@ Return a hash table with citation references as
keys and fields alist as values.
(cons 'year
(cond
((consp date)
- (caar date))
+ (number-to-string (caar date)))
((stringp date)
(replace-regexp-in-string
(rx
In this case, date is an array of numbers, so (caar date) is a number
(the publication year). Converting it to a string is the obvious fix.
Not sure why I haven't run into this error earlier, but I switched to
Emacs 28 somewhat recently, so nativecomp may be the problem here? It
sure seems plausible it wouldn't like a number where a string is
expected.
Best,
David
next reply other threads:[~2022-06-18 6:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-18 6:34 David Lukeš [this message]
2022-06-19 1:44 ` oc-basic: CSL-JSON year as number vs. string (nativecomp?) Ihor Radchenko
2022-06-19 1:55 ` Bruce D'Arcus
2022-06-19 3:31 ` David Lukeš
2022-06-19 13:39 ` Bruce D'Arcus
2022-06-20 12:06 ` Ihor Radchenko
2022-06-20 13:11 ` Bruce D'Arcus
2022-06-20 14:13 ` David Lukeš
2022-06-20 14:24 ` Bruce D'Arcus
2022-06-21 3:28 ` Ihor Radchenko
2022-06-21 12:02 ` David Lukeš
2022-07-31 4:05 ` Ihor Radchenko
2022-06-20 12:04 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAEPTPEyYFDPkBusfdEeeadtHmVbf-bXno_=-EKDJu0r6ET_gjQ@mail.gmail.com' \
--to=dafydd.lukes@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.