From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29426 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Lua filter broken after upgrade to 2.15 (macOS) Date: Sun, 31 Oct 2021 19:22:37 +0100 Message-ID: <7BA44317-17A2-450D-90FD-97F61FCC6129@zeitkraut.de> References: <7c1cf170-c5cb-4203-a4ba-36407f0ebfecn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=----LKUES68W88WMK5HC8X5HZBE472JEM7 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13001"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRB6N57OFQMGQE7B6HFFQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Oct 31 19:22:54 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lj1-f190.google.com ([209.85.208.190]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mhFTo-0003AS-FE for gtp-pandoc-discuss@m.gmane-mx.org; Sun, 31 Oct 2021 19:22:52 +0100 Original-Received: by mail-lj1-f190.google.com with SMTP id a20-20020a2eb554000000b0020de66f70bcsf4964371ljn.1 for ; Sun, 31 Oct 2021 11:22:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1635704571; cv=pass; d=google.com; s=arc-20160816; b=DGR1d+DwwvWWTyt4eRfuO8wcYj+4yn4Zz5sch0k+TZLdEoNmFJGUAJISAlY1u1fFA/ z0S3KWjmYOLOE9h2GqgFw35yZ8rYjtlgvv8cmVqLrjnkDScMojOgFcMcXS7ySFmkJxSo W2MOpJghHTHuFLY4oXr7V6yh1D/ogvh6jSEFli7YVqd4DZtl4EOah72ik5zwgz0QY3T5 +961p0vxoaEz1U4l3pOvFindmas2NOYj33qFWzgi74Rqc1JYB3u1q+a+I5/7RCb1rH6U og+puHpBZXr+q1rNNNJcn6QPFbuuncLPUTNda+qD1VuyE72NgKRSvuSSYzsg1aC/jLyp lwQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:references:in-reply-to:subject:to:from:date :sender:dkim-signature; bh=a2VOHO3PkYsALrFCeaH1f6vllRzjeKFc1vAV075co68=; b=WvVAI5bZZ+gOzWobNddA60ERLoJogEsii0okFcLB6StR/rqtkLSBEXuMX8LmoNTd1h YQjjXVMIxOxMFC9IIcHlYGB9TA5zt3+c8gt+YBaxge+D9O6mIXY2jT3YUti3IRzL5D/7 ISEyhZgIukfYulLexMWfFgMV5E2VaHNybq1qpWRxnMrxLfSw99M2gPzZRnJkgJMelFG4 pKY0wRIhq2KeAbSAplSSWwDDDYFHPGKcXb1hYC0GPgiHLZqlr2RDCq+jfwyhZW+pou+R lhckzxzMTwtCNNqHZbpA72aHGo95dhP8I8NGtorcnX8R5daSIJEwsU6p+cXKLHVr18K7 QwJg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:subject:in-reply-to:references:message-id :mime-version:content-transfer-encoding:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=a2VOHO3PkYsALrFCeaH1f6vllRzjeKFc1vAV075co68=; b=nxT/wd+Lw9ECqgSg5cdKoatSx9Hswd40ipH8/56GCgJmYm/yMlaKVkdkquzX4ghi19 HtOJDEfKMtKHECqT0gSCb0ECkC6actqnCXOsguUdfvrGPlPpelK2IaL7a0smBoaan9my COhiO9PFJz8lt69XIkpAFJvZMHQaQhJx3OJRLpHreFd/fjLJA3adU9u/6Mv57JwryhUb 41FhMJc0vqgSqc1bXhmdjyAtlkb1neFTqmrS2fRzKqbuRbt2uhzLhZIJIHwB7Xn875Jb CeJyQ3/+VaDd1xZwcUuPm2/1cI/XWfpgW+LZ9dSHh4gtaZhu/2NLEjEpCQO2IR8I1zrg bOmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:subject:in-reply-to :references:message-id:mime-version:content-transfer-encoding :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=a2VOHO3PkYsALrFCeaH1f6vllRzjeKFc1vAV075co68=; b=aVn7MHveJEhNNZlPUAIkz9tU7t/KIuMLKs7pLboHqDuMjQ9ek5L4p3+UhhAmN4HZK1 KdtRieTcOjL2fl5fTAYLmqLhFRqTOtyojRRnS4JWiv+CBcmW6oh7+Lf2/TjBs8oJcNuM entOFEWKrp3Fy+jxYwgvT8/v/f4gGYv9H6ykLYlISqLd911JAQ+VrjgKCRo5ha6WLV8f UH+Mp6nkXtBcNoCYkdUS3w8QDHqfasOz8MoEorSzLYCOkSa/yFntdeuafhtkW8knlIxF FRQEsG15+ZW/QgCyqd5dRYCH6I7pQi0Hd9Aw50YbGQE6tMs5M7AZ/FtU86jFKjryd4Me Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533E8HQt6CJYHoIHgEq4Oeyr9XaktEIjRf9Ezl11rEG1Jf5U7kmg iaE3tqAAOmQEGPoJJdGLgas= X-Google-Smtp-Source: ABdhPJzYXxCbvP8QgqiANGlcRaDO5f7NX4Clm2jUna2YF9hy7/SLureSaeSbxFRuEjH2rLnx1GI8Ug== X-Received: by 2002:a2e:531e:: with SMTP id h30mr26149242ljb.401.1635704571315; Sun, 31 Oct 2021 11:22:51 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:1314:: with SMTP id x20ls2782541lfu.1.gmail; Sun, 31 Oct 2021 11:22:48 -0700 (PDT) X-Received: by 2002:ac2:53a3:: with SMTP id j3mr23690165lfh.514.1635704568512; Sun, 31 Oct 2021 11:22:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635704568; cv=none; d=google.com; s=arc-20160816; b=N1SYrdfEZO24TKMAnDhe/eh9LzeFngmgtZklAvbx4XHZ+mhvQLoU41tuNGOWw9/izT xoxtWxmo5dNDv5bqEG6dVhcaCSURot+Lqyj0geV+Tuiql5edX75+gRKap/iwa6HnTlhm X9/7VudiREuENo9QBivIIu7CaTwvcoXgeDHDB1eg+egBLi3A5rkRJ4vNgJYTxs4lTlAh QiF0zPKWcTTtWJpp68VgBTPhd6nH6c2Hu3aN/NDqiRq3Qqol8um6MrBt/AUNSNmxazim j8F70G3wtW4Yirg5hq/ouW1flYGFIqnuI1aKLB15UFxC9xyd48/4U7Vlpv02Rbq1/2jY n1FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:to:from:date; bh=CvNCcev7KtMXPExVkL6WqBkHJ/CQO+S3xrA4gW4yMFE=; b=g2wghaxFL6lU/k//ap+LNkJe55Ikb/4xHW8Waiie8Bmdmhk3H5onfVubEswo3rfeiy +WrPjxtEj8Am+1uZbi0LTiZpSeCD/Vt58mRBBY4GwGniBra8DP2aUzxPbpDOBArCJaF7 B76GWRkue83xE1/EvBwa0NE3Fkm/KYRJDGeUUkYIArx8LOv2kt7xRD+ZjWnV+mi59GUP x22kKENH8nGGtpg68K2xSWvUPtJCSWkSsjtbZCOsXx04KadvGKGUx0J5qrPBiuKId9e9 Kgz7k0+1b8uOFEuegfxOoI+55PfJHvgZDIgZglcshZeT6FVaODsGzRGZEjF4+4X/B60P 9h7g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org. [80.241.56.171]) by gmr-mx.google.com with ESMTPS id q9si147337ljg.7.2021.10.31.11.22.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 11:22:48 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) client-ip=80.241.56.171; Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4Hj4K33H9WzQjgP for ; Sun, 31 Oct 2021 19:22:47 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de In-Reply-To: X-Rspamd-Queue-Id: 196E8C0A X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.171 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@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-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29426 Archived-At: ------LKUES68W88WMK5HC8X5HZBE472JEM7 Content-Type: text/plain; charset="UTF-8" That seems reasonable. Although, tbh, I'm surprised that this ever worked at all. Looking at the old code it seems like it shouldn't. I'll take a look. Am 31. Oktober 2021 18:43:30 MEZ schrieb John MacFarlane : > >Perhaps for backwards compatibility we should fix things >so that Str with no argument is treated as an empty string? > >John MacFarlane writes: > >> I can confirm that using pandoc.Str('') instead of pandoc.Str() >> works. >> >> >> Albert Krewinkel writes: >> >>> Can't test right now, but can you try to pass an empty string to pandoc.Str('')? >>> >>> Am 31. Oktober 2021 14:18:16 MEZ schrieb Philipp : >>>>Hello everyone, >>>> >>>>I'm experiencing a problem with a self-written Lua-filter after upgrading >>>>to 2.15. >>>> >>>>The filter ran (and still runs) fine with older versions of pandoc, but >>>>with 2.15 I get the following error: >>>> >>>>PandocLuaError "Error during function call:\n\tstring expected, got >>>>string\n\twhile retrieving function argument string\n\twhile retrieving >>>>arguments for function Str\nstack traceback:\n\t[C]: in field >>>>'Str'\n\tscripts/klausur.lua:11: in function >>>>\n\t[C]: in ?\n\t[C]: in field >>>>'walk_block'\n\tscripts/klausur.lua:8: in function 'processheader'" >>>> >>>>stack traceback: >>>> >>>>[C]: in field 'walk_block' >>>> >>>>scripts/klausur.lua:8: in function 'processheader' >>>>The corresponding Lua code looks like this (I hope the formatting is >>>>preserved): >>>> >>>> 7 function processheader(elem) >>>> 8 return pandoc.walk_block(elem, { >>>> 9 Str = function(elem) >>>>10 if string.match(elem.text, "%%%d+p%%") ~= nil then >>>>11 return pandoc.Str() >>>>12 end >>>>13 end >>>>14 }) >>>>15 end >>>> >>>>I'd be thankful for any suggestion what is going wrong here. >>>> >>>>Kind regards, >>>>Philipp >>>> >>>> >>>>-- >>>>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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7c1cf170-c5cb-4203-a4ba-36407f0ebfecn%40googlegroups.com. >>> >>> -- >>> 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/DDB22D9A-22FC-48BB-B1D0-18B059FD92D7%40zeitkraut.de. > >-- >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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2ee81ks3h.fsf%40Johns-Air.hsd1.ca.comcast.net. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7BA44317-17A2-450D-90FD-97F61FCC6129%40zeitkraut.de. ------LKUES68W88WMK5HC8X5HZBE472JEM7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable That seems reasonable. Although, tbh, I'm surprise= d that this ever worked at all. Looking at the old code it seems like it sh= ouldn't.

I'll take a look.

Am 31. = Oktober 2021 18:43:30 MEZ schrieb John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>:=

Perhaps for backwards compatibility = we should fix things
so that Str with no argument is treated as an empty= string?

John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> writes:

I can confirm that using pando= c.Str('') instead of pandoc.Str()
works.


Albert Krewinkel &= lt;albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:

Can't test right now, but can you try to pass an empt= y string to pandoc.Str('')?

Am 31. Oktober 2021 14:18:16 MEZ schrie= b Philipp <philipp.kupferschmied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:
Hello everyone,

I'm experiencing a problem= with a self-written Lua-filter after upgrading
to 2.15.

The fil= ter ran (and still runs) fine with older versions of pandoc, but
with 2= .15 I get the following error:

PandocLuaError "Error during function= call:\n\tstring expected, got
string\n\twhile retrieving function argu= ment string\n\twhile retrieving
arguments for function Str\nstack trace= back:\n\t[C]: in field
'Str'\n\tscripts/klausur.lua:11: in function <scripts/klausur.lua:9>\n\t[C]: in ?\n\t[C]: in field
'walk_bloc= k'\n\tscripts/klausur.lua:8: in function 'processheader'"

stack trac= eback:

[C]: in field 'walk_block'

scripts/klausur.lua:8: in f= unction 'processheader'
The corresponding Lua code looks like this (I ho= pe the formatting is
preserved):

7 function processheader(elem)=
8 return pandoc.walk_block(elem, {
9 Str =3D function(= elem)
10 if string.match(elem.text, "%%%d+p%%") ~=3D nil the= n
11 return pandoc.Str()
12 end
13 = end
14 })
15 end

I'd be thankful for any suggestion w= hat is going wrong here.

Kind regards,
Philipp


--
You received this message because you are s= ubscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe fr= om this group and stop receiving emails from it, send an email to pandoc-di= scuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web v= isit https://groups.google.com/d= /msgid/pandoc-discuss/7c1cf170-c5cb-4203-a4ba-36407f0ebfecn%40googlegroups.= com.

--
You received this message becau= se you are subscribed to the Google Groups "pandoc-discuss" group.
To u= nsubscribe from this group and stop receiving emails from it, send an email= to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussio= n on the web visit https://groups.goo= gle.com/d/msgid/pandoc-discuss/DDB22D9A-22FC-48BB-B1D0-18B059FD92D7%40zeitk= raut.de.

--
You received this message because you are subscribed to the Googl= e Groups "pandoc-discuss" group.
To unsubscribe from this group and stop= receiving emails from it, send an email to pandoc-discuss+unsubscribe@goog= legroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/m2ee81ks3h= .fsf%40Johns-Air.hsd1.ca.comcast.net.

--
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 view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/7BA44317-17A2-450D-90FD-97F61FCC6129%40zeitkraut.de. ------LKUES68W88WMK5HC8X5HZBE472JEM7--