From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/20401 Path: news.gmane.org!.POSTED!not-for-mail From: Greg Tucker-Kellogg Newsgroups: gmane.text.pandoc Subject: problem with pandoc.utils in lua filters Date: Thu, 21 Jun 2018 22:16:36 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_7338_1230111879.1529644596957" X-Trace: blaine.gmane.org 1529644472 13745 195.159.176.226 (22 Jun 2018 05:14:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 22 Jun 2018 05:14:32 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWL756DJIILNDFS3ECRUBFQ7O542-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jun 22 07:14:28 2018 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f59.google.com ([209.85.218.59]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fWEOx-0003Sd-Hr for gtp-pandoc-discuss@m.gmane.org; Fri, 22 Jun 2018 07:14:28 +0200 Original-Received: by mail-oi0-f59.google.com with SMTP id y123-v6sf3172812oie.5 for ; Thu, 21 Jun 2018 22:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=5e+ORZPh/0fW0QJVqKHRlOCcUevQTqHlZ9Kbsvz1ElM=; b=Bcj8exhcrC+TL/lplnkaJPU9bM6FA+l44/mrdy/9YGF1igcKvhqnGYnH87aD3YX5xH 1xxHB7wakVkNJl2BOC431pcV+kCJ13ifRNQhREj6n6GLjLxw8FBTqruE3RrywqhuZ/FA JgvzKVUVc+saiDyyrF4ZaASJlFLDY7gMjsmzqimiIFQVGccYYYIZv6pGqSKvSEhnP/c2 4ybNYTI+G/SFaTCWXWPwu+JFeFIk76CkDi9qKmP0ceX5cq+DPz6aseJH9sDoOQxGECGA yjMb0HrYaczL7aQNae6OsIAQTBoov19fpvKteKtP5TEiIEE2vnavWmWW8lk2+H6N/Kcb Rf9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=5e+ORZPh/0fW0QJVqKHRlOCcUevQTqHlZ9Kbsvz1ElM=; b=vG6HVfb1dbPuZO28Sr9AxgogJ259Yl/yRpUDXwGZgDPoybs2Ik+5xBV/c8ish8RRPP blei4uA1FHOBLJNimvQS9CS8YHcvDVwB2swTzyGpLwTW6iQr88Jz5cgMKu33WlF8My1D rD8EjNnLJtdmAR1JqcFnjZvPufWwIaL2+IZmvE5KcUb1a//nsW4F8RU1iyiPF+7j02mQ YPdDCJyGkxb9bfc5aADfkCpnC2tD+iE+GIuOL69jd9+OyYGiS2fo1BLJ1T+39y+AV0Lu Uosrll/mB+ApXZYtbERsOWkhSqRyKA/71JZ8LWJNR8yfi+1qRi6yLhkDgZR0w890sQnk +Q/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=5e+ORZPh/0fW0QJVqKHRlOCcUevQTqHlZ9Kbsvz1ElM=; b=jxHTWyldg9NcbX+HazZ2wG0QkRliox0rkRRIGm3ZfScsM6SDqBQLxmt6oWVYsIufZp YmUzxEeRA2oAzWK3uNYA/QeSnjuLa58Ca2o2+rAXIFNDfuWE+u2paJmPwYkYjcgiHO6z qMbPTQVkIPBlbVLS/SoPFUqegpFOWRiTBZ73pEXrygIw4hVEx5E/1Vu9rbTdc6/mtA8D BmyRepqxJ8V1S6eFRWYhK4BIrgvjRCGDUzbbWLJtbPoJNe+21BGH+KVzNMnhUSCrAJnL ARIiOS9R8LP0zRltLf+kL3Cb5Sa1CPCN0HU7horwu4LzaZuihMuFEXH+ojYbU1Ew/uV6 Ug7w== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APt69E1ToX1N/Q1FJ+6fXybyErb6g2ILpfTVMaWjl9PWCGwC6fLy5/ec YEJAtlK+mHN3q0BVLHKw0lI= X-Google-Smtp-Source: ADUXVKI5zMcz86SBdgjT5lJVokPYLlE8nVPDU8zKS35VjtgiZtwXCXTK40aX6Xl7QDzJFBtWiFNH3g== X-Received: by 2002:aca:d60f:: with SMTP id n15-v6mr10282oig.6.1529644598688; Thu, 21 Jun 2018 22:16:38 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:ac85:: with SMTP id v127-v6ls2555845oie.19.gmail; Thu, 21 Jun 2018 22:16:37 -0700 (PDT) X-Received: by 2002:aca:5208:: with SMTP id g8-v6mr10103oib.1.1529644597626; Thu, 21 Jun 2018 22:16:37 -0700 (PDT) X-Original-Sender: gtuckerkellogg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Spam-Checked-In-Group: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:20401 Archived-At: ------=_Part_7338_1230111879.1529644596957 Content-Type: multipart/alternative; boundary="----=_Part_7339_21135210.1529644596959" ------=_Part_7339_21135210.1529644596959 Content-Type: text/plain; charset="UTF-8" I just updated to the latest lua-filters, and every use of pandoc.utils.stringify throws an error, e.g., [lua-filters-(git:master)] make bash runtests.sh abstract-to-meta author-info-blocks bibexport cito scholarly-metadata scrlttr2 section-refs short-captions spellcheck task-list wordcount PASS abstract-to-meta Error running filter author-info-blocks.lua: Error while running filter function: author-info-blocks.lua:103: attempt to index a nil value (field 'utils') --- - 2018-06-22 13:10:07.567118906 +0800 +++ expected.native 2018-06-21 17:12:08.200722160 +0800 @@ -0,0 +1,5 @@ +Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str "Jane",Space, Str "Doe",Superscript [Str "*",Str ",",Str "1",Str ",",Str "\9993"],Str ",", Space,Str "John",Space,Str "Q.",Space,Str "Doe",Superscript [Str "*",Str "," ,Str "1",Str ",",Str "2"],Str ",",Space,Str "and",Space,Str "Juan",Space,Str "P\233rez",Superscript [Str "2"]]),("title",MetaInlines [Str "Affiliation", Space,Str "Blocks",Space,Str "Example"])]}) +[Para [Superscript [Str "*"],Space,Str "These authors contributed equally to this work."] +,Para [Superscript [Str "1"],Space,Str "Federation",Space,Str "of",Space, Str "Planets",LineBreak,Superscript [Str "2"],Space,Str "Acme",Space,Str "Corporation"] +,Para [Superscript [Str "\9993"],Space,Str "Correspondence:",Space,Link ("" ,[],[]) [Str "Jane",Space,Str "Doe",Space,Str "<",Str "jane.doe-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org" ,Str ">"] ("mailto:jane.doe-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org","")] +,Para [Str "Lorem",Space,Str "ipsum",Space,Str "dolor",Space,Str "sit", Space,Str "amet."]] Makefile:2: recipe for target 'test' failed make[1]: *** [test] Error 1 FAIL author-info-blocks PASS bibexport PASS cito Error running filter scholarly-metadata.lua: Error while running filter function: scholarly-metadata.lua:77: attempt to index a nil value (field 'utils') .... A similar error for section-refs. I ran across the problem when trying to use Pandoc Scholar . I'm using pandoc 2.2.1, [lua-filters-(git:master)] pandoc --version pandoc 2.2.1 Compiled with pandoc-types 1.17.5.1, texmath 0.11.0.1, skylighting 0.7.2 Default user data directory: /home/gtk/.pandoc Copyright (C) 2006-2018 John MacFarlane Web: http://pandoc.org This is free software; see the source for copying conditions. There is no warranty, not even for merchantability or fitness for a particular purpose. I think this must be something I'm doing wrong, because it would be failing the CI tests and other people would notice. Does anyone have a suggestion? Thanks in advance, Greg -- You received this message because you are subscribed to the Google Groups "pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/cf37938e-dd08-4509-a275-66d1dc359c61%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_7339_21135210.1529644596959 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just updated to the latest lua-filters, and every use of= pandoc.utils.stringify throws an error, e.g.,=C2=A0

[lua-filters-(git:master= )] make
bash runtests
.s= h abstract= -to-meta author-info-blocks bibexport cito scholarly-metadata scrlttr2 section-refs short-captions spellcheck task-list wordcount
PASS
abstract-to-meta
Error= running filter author-info-blocks.lua:
Error while running filter function: author-info
-blocks.lua:103: attempt to index a nil value (f= ield '= utils'= )
---
- 2018-06-22
13:10:07.567118906 +0800
=
+++= expected<= span style=3D"color: #660;" class=3D"styled-by-prettify">.native 2018-06-21 17:12:08.200722160 +0800
@= @ <= span style=3D"color: #660;" class=3D"styled-by-prettify">-0,0 +1,5 @@
+Pandoc (Met= a <= span style=3D"color: #660;" class=3D"styled-by-prettify">{
unMeta =3D fromList [("author",MetaInlines [Str &= quot;Jane",Spac= e,<= span style=3D"color: #606;" class=3D"styled-by-prettify">Str "Doe",Superscript [Str "*",S= tr = ",",Str "1",Str ",",Str "= \9993"],Str ",",Space,Str "John",Space,Str "Q."<= /span>,Space,Str "Doe",Superscript [Str = "*&qu= ot;,Str ",",Str "1",Str ",",Str<= /span> "2"= ],Str ",",Space,Str &= quot;and",Space= ,Str "Juan",Space,Str "P\233rez",Superscript [Str "2"]]),("title",MetaInlines [Str "Affiliation",Space,Str <= /span>"Block= s",Space= ,Str "Example"])]})
+[Para [= Superscript [= Str "*"],Space,Str "These authors contributed equally to this work."= ]
+,Para [Superscript [Str "1"],
Space,Str "Federation",Space,Str= "of&= quot;,Space,Str "Planets",LineBreak,Superscript [Str = "2&qu= ot;],Space,Str "Acme",Space,Str &= quot;Corporation"]
+,<= /span>Para= [Superscript [Str "\9993"],Space,Str "Correspondence:&q= uot;,Space,Link ("",[],[]) [Str = "Jane= ",Space<= span style=3D"color: #660;" class=3D"styled-by-prettify">,Str "Doe",Space,Str &= quot;<",Str<= /span> "jane.doe@examp= le.com",Str ">"= ] ("mailto:jane.doe-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org","")]
+,Para [Str "L= orem"= ,Space,Str "ipsum",Space,Str "dolor",Space,Str "sit",Space,Str "amet."]]
Makefile:2= : recipe
for
target 'test' failed
make
[
1]: *** [test= ]
Error 1
FAIL author
-info-blocks
PASS bibexport
PASS cito
Error running filter scholarly-metadata.lua:
Error= while running filte= r function= : scholarly-
metadata.lua:77: attempt to index a nil value (fi= eld 'u= tils')=
....


A simil= ar error for section-refs.

I ran across the = problem when trying to use=C2=A0Pandoc Scholar. I'm using pandoc 2.2.1,

[lua-filters-(git:master)] pandoc --version
pandoc
2.2.1<= /span>
= Compiled
with pandoc-types 1.17.5.1, texma= th 0.11.0.1, skylighting 0.7.2
Default user data directory: /= home/gtk/.pandoc
Copyright (C) 2006-2018= John MacFarlane
Web: =C2=A0http://pandoc.org
This is free software; see the source for copying conditions
.
There is no warranty, <= /span>not<= span style=3D"color: #000;" class=3D"styled-by-prettify"> even for merchantability or fitness
for a particular purpose.
<= /div>


I think this must be somethin= g I'm doing wrong, because it would be failing the CI tests and other p= eople would notice. Does anyone have a suggestion?

Thanks in advance,

Greg

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/cf37938e-dd08-4509-a275-66d1dc359c61%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_7339_21135210.1529644596959-- ------=_Part_7338_1230111879.1529644596957--