From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29990 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jacco Steur Newsgroups: gmane.text.pandoc Subject: Using lua filter include-files on pandoc 2.5 does not work Date: Sun, 16 Jan 2022 23:48:09 -0800 (PST) Message-ID: <091e1142-2cf5-40f0-a0f4-1c6a2bd0af4bn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1241_1655737307.1642405689483" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31338"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDUYXFMS4ECBBOV6SSHQMGQE6JEXN6I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jan 17 08:48:13 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f61.google.com ([209.85.210.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n9MkO-0007yt-IT for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 17 Jan 2022 08:48:12 +0100 Original-Received: by mail-ot1-f61.google.com with SMTP id h11-20020a056830400b00b00591920a8f96sf5614195ots.1 for ; Sun, 16 Jan 2022 23:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; 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=UHqrL48heKH6JfPdpOHuIyNcaLWrgw1YySe7KR42n9M=; b=TNrp3UY8jIhZi+cyeJkOmMbFWSNKjhlzV9iUX34BvOTQg9WSZI/rKu5InQXUjeeCl8 4UownlmgniObv96wAUm7Kvl1LFr9ceVkGLy9NLv0YkuZdyC7SmopIZ2zqL5D2ROAxbw6 L0FbWWsZYVSP5oORYAb4OZoMm94vma81Hwgyp3h8aC/fkeRu63HwZQNVDgjP/1K0iGUo 33OTarYcohDEc8gbOgjsQqXllcmJ0YvrAlyN60Y5m5VKpqk5kHFtb3pRdmSK40q0aWE7 R/0U5r6Yts9dCRUPpkZqholkb25O+hJ9qPqb+Q2xCSDdxcxBD8SFkSAQFlkWf17CnWfe WEBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=UHqrL48heKH6JfPdpOHuIyNcaLWrgw1YySe7KR42n9M=; b=Du/H+PxWHwYc5rbhb81U5fcjWrPIOlCrkR9WpvzhcjLGQuOErwnM6NR6kphIVOdEFo A8HEssm8+W1lQ+uyVJvfqTY8v77QWexX2j76ryDqyHtak9poecVzUSTBJv9seUQmi0ZD 9xr/Mv55wznIjuSEM2cfz8i701dAqL6eWkokCs4tXHvrdVHs/Ykm0tw8J1fBfYfposW6 HOxcnt0Qt7oRx+fCZHzNq8/huvrF39PigfnreRod/mDQfzIirEPx5hAMlVZHU7BtUoHT FzvonRGj233l8e8Jah18saLBtc+IMkdscxf/o5iXvJWl+DvW+C3cSkYUYXwLT1yRSG7p y8og== 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: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=UHqrL48heKH6JfPdpOHuIyNcaLWrgw1YySe7KR42n9M=; b=nkRI0ZfjDu177JaPhnkwPntrwMbQC+cIurN+KICD38FmUdxJYcFsdf+kUnsXrRs21O hJWMkf/7v6DIEvItY7op5t7D/6QS0DbNou2bLRURf8TGnshEb/mq50Y8KVHyigjlOGIk AgfE8F3YGCsTJ0dQbkxZXvWuv/B5JwjvAOBPVD2zsqzRIb4B5cBi0gXJbL3nGszKszW/ 2+UAtHjsyum2kH1JYZ9YzfxfDZdxzdV4vywm6gRYRc5a52TaDnh9irgtW9pNEaxQF8v3 EHdNdAfiYLrMbomHHk1HF/VD+rXe/iOLiQwckuEoK5+oHtxH0bi3TXtdUw8egZd8BWTr K9Sw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5315tJNTLo89EF/dLOM/7S7rWYhQtUUfUV5CPw2gJQaYykNE75ml rRswIKn3fA50kavFjAWIiec= X-Google-Smtp-Source: ABdhPJwCenV3A/M5JuYG86Jv8WzbJZ9cjxYDIDQNldZk9txUVgaAMC/aRuIR+sF2SwhaFWiHmOppQA== X-Received: by 2002:a9d:7096:: with SMTP id l22mr8215904otj.73.1642405691529; Sun, 16 Jan 2022 23:48:11 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6808:2209:: with SMTP id bd9ls2118402oib.9.gmail; Sun, 16 Jan 2022 23:48:10 -0800 (PST) X-Received: by 2002:aca:2409:: with SMTP id n9mr5844056oic.120.1642405690022; Sun, 16 Jan 2022 23:48:10 -0800 (PST) X-Original-Sender: jacco.steur-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:29990 Archived-At: ------=_Part_1241_1655737307.1642405689483 Content-Type: multipart/alternative; boundary="----=_Part_1242_1478464315.1642405689483" ------=_Part_1242_1478464315.1642405689483 Content-Type: text/plain; charset="UTF-8" My goal is debugging LUA filters with the zerobrane ide. I got stuck on this: On Ubuntu I installed pandoc 2.5 using sudo apt install pandoc. After that I cloned the lua filter repository (https://github.com/pandoc/lua-filters) When I run the pandoc commmand like so: >pandoc --lua-filter=include-files.lua sample.md --output result.html ( This lua filter requires this: local List = require 'pandoc.List' local path = require 'pandoc.path' local system = require 'pandoc.system' ) I get this error: include-files.lua:10: module 'pandoc.path' not found:no file 'pandoc.path.lua' in pandoc's datadir no field package.preload['pandoc.path'] no file '/usr/local/share/lua/5.3/pandoc/path.lua' no file '/usr/local/share/lua/5.3/pandoc/path/init.lua' no file '/usr/local/lib/lua/5.3/pandoc/path.lua' no file '/usr/local/lib/lua/5.3/pandoc/path/init.lua' no file './pandoc/path.lua' no file './pandoc/path/init.lua' no file '/usr/local/lib/lua/5.3/pandoc/path.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './pandoc/path.so' no file '/usr/local/lib/lua/5.3/pandoc.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './pandoc.so' stack traceback: [C]: in function 'require' include-files.lua:10: in main chunk After some research I found that there is a directory /usr/share/pandoc/data. The contents of this directory contains the lua files: init.lua pandoc.List.lua pandoc.lua sample.lua There is no pandoc.path.lua..... So pandoc is not checking /usr/share/pandoc/data and even if I set LUA_PATH like so: >export LUA_PATH=/usr/share/?/?.lua It gives me this error: Error running filter include-files.lua: include-files.lua:10: module 'pandoc.path' not found:no file 'pandoc.path.lua' in pandoc's datadir no field package.preload['pandoc.path'] no file '/usr/share/pandoc/path/pandoc/path.lua' no file '/usr/local/lib/lua/5.3/pandoc/path.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './pandoc/path.so' no file '/usr/local/lib/lua/5.3/pandoc.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './pandoc.so' stack traceback: [C]: in function 'require' include-files.lua:10: in main chunk What am I doing wrong here...... -- 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/091e1142-2cf5-40f0-a0f4-1c6a2bd0af4bn%40googlegroups.com. ------=_Part_1242_1478464315.1642405689483 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My goal is debugging LUA filters with the zerobrane ide.
I got stuck on this:

On Ubuntu I installed = pandoc 2.5 using sudo apt install pandoc.
After that I cloned the lua f= ilter repository (https://github.com/pandoc/lua-filters)
When I r= un the pandoc commmand like so:

>pandoc --lua-filter=3Dinclude-files.lua sample.md --out= put result.html
(=
This lua filter requires this:=
local List =3D require = 'pandoc.List'
local path =3D re= quire 'pandoc.path'
local syste= m =3D require 'pandoc.system'
)

I get this error:
include-files.lua:10: module 'pandoc.= path' not found:no file 'pandoc.path.lua' in pandoc's datadir
  &nb= sp;     no field package.preload['pandoc.path']
    =     no file '/usr/local/share/lua/5.3/pandoc/path.lua'
  =       no file '/usr/local/share/lua/5.3/pandoc/path/init.lua= '
        no file '/usr/local/lib/lua/5.3/pandoc/pat= h.lua'
        no file '/usr/local/lib/lua/5.3/pando= c/path/init.lua'
        no file './pandoc/path.lua'=
        no file './pandoc/path/init.lua'
  =       no file '/usr/local/lib/lua/5.3/pandoc/path.so'
&nb= sp;       no file '/usr/local/lib/lua/5.3/loadall.so'
&nb= sp;       no file './pandoc/path.so'
     =   no file '/usr/local/lib/lua/5.3/pandoc.so'
      =   no file '/usr/local/lib/lua/5.3/loadall.so'
      =   no file './pandoc.so'
stack traceback:
      &n= bsp; [C]: in function 'require'
        include-file= s.lua:10: in main chunk

After some research I = found that there is a directory /usr/share/pandoc/data.

The contents of this directory contains the lua files:
init= .lua  pandoc.List.lua  pandoc.lua  sample.lua
=
There is no pandoc.path.lua.....

So= pandoc is not checking /usr/share/pandoc/data and even if I set LUA_PATH l= ike so:
>export LUA_PATH=3D/usr/share/?/?.lua
It= gives me this error:
Error running filter include-files.lua:
= include-files.lua:10: module 'pandoc.path' not found:no file 'pandoc.path.l= ua' in pandoc's datadir
        no field package.pre= load['pandoc.path']
        no file '/usr/share/pand= oc/path/pandoc/path.lua'
        no file '/usr/local= /lib/lua/5.3/pandoc/path.so'
        no file '/usr/l= ocal/lib/lua/5.3/loadall.so'
        no file './pand= oc/path.so'
        no file '/usr/local/lib/lua/5.3/= pandoc.so'
        no file '/usr/local/lib/lua/5.3/l= oadall.so'
        no file './pandoc.so'
stack tr= aceback:
        [C]: in function 'require'
 = ;       include-files.lua:10: in main chunk
&n= bsp;
What am I doing wrong here......
 



--
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/091e1142-2cf5-40f0-a0f4-1c6a2bd0af4bn%40googlegroups.= com.
------=_Part_1242_1478464315.1642405689483-- ------=_Part_1241_1655737307.1642405689483--