From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32525 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ThomasH Newsgroups: gmane.text.pandoc Subject: Re: Use Writer in Lua Filter? Date: Fri, 5 May 2023 01:03:24 -0700 (PDT) Message-ID: <79a8dca6-9860-4109-b2e8-5841faa36cc0n@googlegroups.com> References: <9dc956cf-74a3-4e25-b4bd-62aae6dcc3f4n@googlegroups.com> <87jzxobp5d.fsf@zeitkraut.de> <87fs8cbnne.fsf@zeitkraut.de> <4c078a54-2252-4253-b2a5-6348ecc1f916n@googlegroups.com> <878re3bb7a.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2796_1455743446.1683273804062" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29357"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOJJAXZ7EPBBTPQ2KRAMGQE4TP7TVA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri May 05 10:03:29 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f60.google.com ([209.85.160.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1puqPY-0007QD-Of for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 05 May 2023 10:03:28 +0200 Original-Received: by mail-oa1-f60.google.com with SMTP id 586e51a60fabf-192742d001asf942510fac.3 for ; Fri, 05 May 2023 01:03:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1683273807; x=1685865807; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=Epag+3AjAxQNgy/o9JUtpbp9BlUux78X3yIb/FLOR94=; b=kCY7GOc3C4swLOlpYaxwDfkyu/YL2B1I5fMFKbb3wqWwPpIDft3cyvFsoGkpqHL8Ny 0EqOoEPx0ciTKrhKahLwvnw3vR54e8zJNJbNlrOGk47HnkqDfciDNjMug70+nVY5P41N mCN/siaXdNQhfSvrWkDZTVNSNfdfdRWxsZ7jpcY+WK/U2sLlCNa9vFRJ3va1n0x+oLj7 XUMA3xeNE7dkEzxaM3rDezjEl72rw3m8XmJGim0d9ntHpuHF4A5LHELLSq1VY9VkGL3C O5Qe9OF2vCvnI9wUvobIxVHd8hk3SluPplaLRTdFLrXrNkA2QA5awFW0yMIOZbVQGtOH iXCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683273807; x=1685865807; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Epag+3AjAxQNgy/o9JUtpbp9BlUux78X3yIb/FLOR94=; b=F41HHMgrXa2H94I1kxicwHxXtMrcdFrqBBkCrCeiYjyRJrMQbIDbZzaod7EBMKNMli ySGxODdZ1eHMKs/zT8oTqfCaE7u2zG7qBFR5Vu/TvmgCLczjgltghDm/7TR5JVU31PMS IZLvaraCF4wR0Rc+Io7oIin2jN+FBj0aeo6oJYu9OiS6ihVzSmQTbVJZKmtjgW++NCnP JZBIyLDKcwfOrxYqiwQZ3qKomYxHdacyceXd58p6/O92XzXhgV3gGImGIGIPP5KQTHXB mkTZGZ6VJlnbuWd5EX49U2pcCUWv3D45MtKFfZwsOp/WIsnROSfChOzMzAI6/8Ib296e NTxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683273807; x=1685865807; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=Epag+3AjAxQNgy/o9JUtpbp9BlUux78X3yIb/FLOR94=; b=dLOmb7KqK9JVGf9B2jrFHfiu1hiquoZlLMsGfcUzmG+5Xq2nwvdk8J/pXYDhRVRMNJ N476pQe6FVnhl5BLizGosiwfpwhacsEQFCbQfT5HJAkDNTEHAI4cqC4t7u7B7GVDMSkb fRWlZzqAsaKVV9NLcTc8h+87+a3RQSr4ZE+3lEK8UPNA3whuB4WieNKabjHuGAPEp6AY yiJ9U4axPA+se+z9F5lcoJFFrXFcr+hVN2ndS5JSx9wDMC+IX2ihelmw/XpWFpsdtJwC 7El3cI2poEXz47Vo7Dw5gUsxZa2Kg4Kd++ed9RFU4HwSsPUH+f Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDyZtNXqOoIBycqvbbT7JvnI3rJySIZJgYOPatfkIxlIcGjzBN6B tfjm3FVAaJBe9jdiB+VbV1U= X-Google-Smtp-Source: ACHHUZ4IG0o286A2wUfy5NO6hM9P9EjVwsfpxotFJpTf/aAbSsWVfMief1RhM2GCBYEw3zSdb89HkQ== X-Received: by 2002:a05:6870:c85:b0:177:7c7a:fcdb with SMTP id mn5-20020a0568700c8500b001777c7afcdbmr363370oab.1.1683273807532; Fri, 05 May 2023 01:03:27 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:ece:b0:38e:dc69:4942 with SMTP id q14-20020a0568080ece00b0038edc694942ls5233486oiv.3.-pod-prod-gmail; Fri, 05 May 2023 01:03:24 -0700 (PDT) X-Received: by 2002:aca:b557:0:b0:390:7dc9:ddc9 with SMTP id e84-20020acab557000000b003907dc9ddc9mr107671oif.10.1683273804720; Fri, 05 May 2023 01:03:24 -0700 (PDT) In-Reply-To: <878re3bb7a.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: therch-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-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32525 Archived-At: ------=_Part_2796_1455743446.1683273804062 Content-Type: multipart/alternative; boundary="----=_Part_2797_1212491805.1683273804062" ------=_Part_2797_1212491805.1683273804062 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, ok, sorry, I've only come to Lua through Pandoc, so I'm often not aware= =20 of general Lua features. I will keep an eye open for the 'show' method. T. On Friday, May 5, 2023 at 7:26:41=E2=80=AFAM UTC+2 Albert Krewinkel wrote: > > ThomasH writes: > > > I just wished that would have been more apparent from the docs. > > The `tostring` function is the default Lua way to convert an object "to > a string in a human-readable format". Still, I made a mental note to add > better docs once we switch from a Haskell to a Lua representation as > `tostring` output. > > The Haskell/native output will probably become available via show > methods, as in `block:show()`. This already works for Block elements, > but not for Inlines. > > > >> Albert Krewinkel writes: > >> > >> > The alternative is to use `pandoc.write`, e.g.: > >> > > >> > print(pandoc.write(pandoc.Pandoc {element})) > >> > >> The above is missing the second parameter: > >> > >> print(pandoc.write(pandoc.Pandoc {element}, 'native')) > > > --=20 > Albert Krewinkel > GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 > --=20 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 e= mail 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/79a8dca6-9860-4109-b2e8-5841faa36cc0n%40googlegroups.com. ------=_Part_2797_1212491805.1683273804062 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah, ok, sorry, I've only come to Lua through Pandoc, so I'm often not = aware of general Lua features. I will keep an eye open for the 'show' metho= d.

T.

On Friday, May 5, 2023 at 7:26:41= =E2=80=AFAM UTC+2 Albert Krewinkel wrote:

ThomasH <the...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org= > writes:

> I just wished that would have been more apparent from the docs.

The `tostring` function is the default Lua way to convert an object &qu= ot;to
a string in a human-readable format". Still, I made a mental note = to add
better docs once we switch from a Haskell to a Lua representation as
`tostring` output.

The Haskell/native output will probably become available via show
methods, as in `block:show()`. This already works for Block elements,
but not for Inlines.


>> Albert Krewinkel <albert...-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> writes:
>>
>> > The alternative is to use `pandoc.write`, e.g.:
>> >
>> > print(pandoc.write(pandoc.Pandoc {element}))
>>
>> The above is missing the second parameter:
>>
>> print(pandoc.write(pandoc.Pandoc {element}, 'native'))


--=20
Albert Krewinkel
GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124

--
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= /msgid/pandoc-discuss/79a8dca6-9860-4109-b2e8-5841faa36cc0n%40googlegroups.= com.
------=_Part_2797_1212491805.1683273804062-- ------=_Part_2796_1455743446.1683273804062--