From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32054 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ChrisD Newsgroups: gmane.text.pandoc Subject: Re: Directories for lua filters Date: Fri, 20 Jan 2023 13:55:46 -0700 Message-ID: <9c6e0ddc-b18d-205f-0868-3eb1498848f4@intielectronics.com> References: <69d75ee2-5140-4415-2da7-aef9ff91df5f@intielectronics.com> <1f6a4484-4173-21b9-efcc-d7cd3867d4f7@intielectronics.com> <1B880D38-AC8E-40B2-A4D1-15B534F81C6F@gmail.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------iQkFZ1MnmEIiyIHGv0OUO4PG" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10222"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDHMHIETYAGRBWH7VOPAMGQELV52MZY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 20 21:55:58 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f60.google.com ([209.85.167.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pIyQY-0002Pv-Co for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 20 Jan 2023 21:55:58 +0100 Original-Received: by mail-lf1-f60.google.com with SMTP id d14-20020a196b0e000000b004b562e4bfedsf2835166lfa.19 for ; Fri, 20 Jan 2023 12:55:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674248157; cv=pass; d=google.com; s=arc-20160816; b=row8yrp7ohZ03NCWcmuu6I6CnywbKnUiaZwPCT8ghLXMbA9N8InGLu7hTTkGI4T2Mp 4S4QAUsUWZA/gPuwoyrMg5Ohv9kmtqQ7aHxwo+0o885M0A07+jOm9mHDdz4u0NKkLBwB ytnVFGz60upuRY41leE6+39S6KaI5rLGYYU8HiT2t75wd53PPGZc3RV10S1+U0+XKHla i0qrhYIHg/TXeBBsbhefQ5pbotWzWUPCftWEmaJp6S3hsUbiTa6cm7SneqTl5/VIgJOq 6TfBMaPp1rBanMveTZ4DyjtJQcfMkfD8U7fnvyHAxDDPDA5uI1CfxGQGnX9Ylduh50Uj t/ww== 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:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:sender:dkim-signature; bh=Jo5smFaXp/hbQ9wNi6rg8ud1SRHjDSeF8LQDWCfA4PQ=; b=lPvLFSqS0mroG6s45iqtNrLXe/e0KTIDCnS6IKDmtjvvS9G7aj92qWFLQWpI7gFvAD bS6XnWta+5hMoKMKepOpEnjBi+y6Ib1f0p5Zw5MM4gSHiay3dXsp9XGx9J+kEr2xBfnB 6V2Hbhw+qaIakkQdyrXzXHF4Q2w3MAMRnPUQEMLzxE0udD3Ca+aELTd0tYgl/+oO+Jqi ALPC4moLDuSjYEXaGF+pls41Nc0zWn6ZL6GyVDeJxRyA6iNk/axCKKk61qSc0YR2sFwD d4n5+Kuvrs5WeapaSu6K8Nn467QQaxF7ebpieW8+JFAoGHwzL4FSxvsBHbnlN5ru1zqu WPnw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:in-reply-to :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:sender:from:to:cc:subject:date:message-id:reply-to; bh=Jo5smFaXp/hbQ9wNi6rg8ud1SRHjDSeF8LQDWCfA4PQ=; b=BOuKpDMymmJdFm1pPNPI7z79pfTwz2TnQP/nWjpLZC2uFvhh9CUwirug+RuaG8fwJf ycy1KU+t6n/78gljIaw5e4cxDE5BUptph3/C9e1MUXnxsmmn2fpzo4iF/V1CeCrqYkV0 cGDyrzI+sglxtj3P+7FBBgvuNYJvtES0VTk4i97QmrrnFI0Go6dPAwQxTIdOWs84O7DR DNSB6BxU6mq+go4m36++hCRUXaBAghA3Eb/aiLJWl7R9vXfVdjuz0C0J5I5l7bq8MXD7 qeWvZi0NO6//eO7faKqy743jwQ+pOa+RZAvFgM5DbIRvmBu4SONABxA3LgWdrwGck99F X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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-authentication-results:x-original-sender:in-reply-to :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=Jo5smFaXp/hbQ9wNi6rg8ud1SRHjDSeF8LQDWCfA4PQ=; b=fQrhADMOOl2y6+Z7CV2d+FL92Tjk6TEkYoZWEOtg2rrEzjgkUaKmP5ihEXmTUxti2Z 8jTLv4miKMv+zMQyvhZ9ghGWCD5f+xqwoqt9/C27Hnr9g7FC1cn63rj8stEzMOi1KUrM z49PbuYNsn7+u2ugOGY5Xin/phbp/4Q80O6kI01Cp8Ehczqs2vdZGfwpDK1m8YnquGXF /SYWNenHsXbH8XaNhUe1DM0HdyrwUsm/w10IHRvrpu0JYkPNFEEfypZQaDKuhLi8om4y M5dekTwrbWLWAgKNGi Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kon6A02p2HtWJhYxr0epT5lZwPBA9ZddcBWCOT69nb4/1ElPPi1 O7NLp779tgMvUCPDUnCie3A= X-Google-Smtp-Source: AMrXdXv+Py8nHpNaobmU311kYhmWt813qnDFbE2R1qCN6+MIzVCddSPV1x9+Bl9loCjeTPjTehJ3kA== X-Received: by 2002:ac2:528f:0:b0:4cc:79ee:545e with SMTP id q15-20020ac2528f000000b004cc79ee545emr1595478lfm.677.1674248157753; Fri, 20 Jan 2023 12:55:57 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:a413:0:b0:27f:e5b1:aff6 with SMTP id p19-20020a2ea413000000b0027fe5b1aff6ls898621ljn.6.-pod-prod-gmail; Fri, 20 Jan 2023 12:55:52 -0800 (PST) X-Received: by 2002:a2e:850c:0:b0:27f:ea39:9cc3 with SMTP id j12-20020a2e850c000000b0027fea399cc3mr4273873lji.51.1674248151900; Fri, 20 Jan 2023 12:55:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674248151; cv=none; d=google.com; s=arc-20160816; b=j3nn0Hj0KzC+K5iF35hZEO4IfcBPg96GjF4WmLlaQqMzPl6Rc6l+daNtHbq4sCTmZ5 lACSRE1lpf+YPe/20dk4YqfITL8TYImOsiTrsitZJGn2FWKLZWevzqtxpF/PTeKISbPd vY+X0d5HfY7gOM3KeedegeIU5pkfHrqMNzi4b5q4sZZRDJRBRxW3oBkgLd7i3NdwmNGy wSLgmsTqEaZYMZwOcviqXjMjtCK4YFjwRvHXHjZzo+FnNN7pTFeZNEaue39UcX8o2RpS 4ZzLQHiYeL+GDVYRUmjp1Hcp6aurIoHSBEjmLJr//1209kT5cIa5qo6VFzqZ9a0zYLVF IsNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:from:references:to:content-language:subject:user-agent :mime-version:date:message-id; bh=FBEinjzLQQD4WIbx7Yp5kFkGSPqfOWF7yJwxS0cYQNc=; b=u3IHJvPXKFVv27owg/BdYqwAGUSRQ9q0RdMC70LDSbqhfur00cPU0UoCtzRSUiqnMo JAtMPo9bkcy+i/NuOuHUQCxAi2S6bV1y66+D/6k7r8YBwjq30iZ3kWA4HYZNF7Opgs/Z vO3M4BNsR70pFqpdkSZzw0BoKUv2eek2rP8+8UDhQWVNqHYHMNJ8gweFnoFqIOZkPIwm 8tKcbboy4ZJ0u9fFDtpU50o3Q6NiVJV7ZmtXvjp0LsYeCEEXStl1Lcl36F+TK3bWYKiJ 4KWEMI83KbJmYzGi1Ejk4/RJkGpnJ4VbQF3i0RpenXvnVxx1nhGKDfNTJvyvpDxJ7yhh LceQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org Original-Received: from hamza.pair.com (hamza.pair.com. [209.68.5.143]) by gmr-mx.google.com with ESMTPS id bf26-20020a2eaa1a000000b0028586d0af2fsi1568428ljb.7.2023.01.20.12.55.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Jan 2023 12:55:51 -0800 (PST) Received-SPF: pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) client-ip=209.68.5.143; Original-Received: from hamza.pair.com (localhost [127.0.0.1]) by hamza.pair.com (Postfix) with ESMTP id 4E61C33E53 for ; Fri, 20 Jan 2023 15:55:49 -0500 (EST) Original-Received: from [10.104.138.18] (static-198-54-133-104.cust.tzulo.com [198.54.133.104]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hamza.pair.com (Postfix) with ESMTPSA id 1CC9E33E50 for ; Fri, 20 Jan 2023 15:55:47 -0500 (EST) Content-Language: en-US In-Reply-To: <1B880D38-AC8E-40B2-A4D1-15B534F81C6F-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> X-Scanned-By: mailmunge 3.10 on 209.68.5.143 X-Original-Sender: cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@public.gmane.org designates 209.68.5.143 as permitted sender) smtp.mailfrom=cd34-gg-4SSc53hpTiu9TMao6EloiEEOCMrvLtNR@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:32054 Archived-At: This is a multi-part message in MIME format. --------------iQkFZ1MnmEIiyIHGv0OUO4PG Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable I researched this a little more. The lua "require" function searches paths = using =C2=A0=C2=A0=C2=A0 global variable LUA_PATH =C2=A0=C2=A0=C2=A0 environment variable LUA_PATH =C2=A0=C2=A0=C2=A0 a fixed path which is "easy to change when you compile = lua" I do not have either of the LUA_PATH values set. Inside the interpreter, the search path is contained in package.path. On my win 10/pandoc 3.0 install, package.path contains this string (I have = split it across lines to be more readable): =C2=A0=C2=A0=C2=A0 C:\USERS\\APPDATA\LOCAL\PANDOC\lua\?.lua; =C2=A0=C2=A0=C2=A0 C:\USERS\\APPDATA\LOCAL\PANDOC\lua\?\init.lua= ; =C2=A0=C2=A0=C2=A0 C:\USERS\\APPDATA\LOCAL\PANDOC\?.lua; =C2=A0=C2=A0=C2=A0 C:\USERS\\APPDATA\LOCAL\PANDOC\?\init.lua; C:\USERS\\APPDATA\LOCAL\PANDOC\..\share\lua\5.4\?.lua; C:\USERS\\APPDATA\LOCAL\PANDOC\..\share\lua\5.4\?\init.lua; =C2=A0=C2=A0=C2=A0 .\?.lua; =C2=A0=C2=A0=C2=A0 .\?\init.lua I'm surprised not to find =C2=A0=C2=A0=C2=A0 C:\Users\\AppData\Roaming\pandoc\filters in that list. But it looks like (3) is enabled by the first line of package.path. I have = no clue how that gets set. On 1/20/2023 1:25 PM, John MacFarlane wrote: > Manual definitely covers both 1 and 2: it says > > In order of preference, pandoc will look for Lua filters in > > =E2=80=A2 a specified full or relative path, > > =E2=80=A2 $DATADIR/filters=C2=A0where=C2=A0$DATADIR=C2=A0is the user data= directory (see=C2=A0--data-dir, above). > > I wouldn=E2=80=99t expect 3 to work. =C2=A0If it does, that=E2=80=99s qui= te unexpected. =C2=A0Can anyone else reproduce this? > > >> On Jan 20, 2023, at 9:14 AM, ChrisD wrote: >> >> Sorry, this is my error. >> >> Filters work when placed in >> 1) The current working directory >> 2) $DATADIR/filters >> 3) /lua >> >> So the manual is correct, though it only specifies (2), not (1) or (3). >> >> Sorry for the noise. >> >> >> On 1/20/2023 9:47 AM, ChrisD wrote: >>> What is the correct location for lua filters? >>> >>> The pandoc manual says it will search for lua filters in $DATADIR/filte= rs. However that doesn't work for me on=C2=A0Windows. What does work is: >>> >>> 1) The current working directory >>> 2) $DATADIR/lua >>> 3) /lua >>> >>> The location of pandoc.exe for me is user//AppData/Local/Pand= oc. This is on my path. >>> >>> Is this an error in the manual, or do I have something configured wrong= ? It seems to me I must have read=C2=A0somewhere to use the lua sub-directo= ry, but I can't find it anywhere online now. >>> >> >> --=20 >> You received this message because you are subscribed to the Google Group= s "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit https://groups.google.com/d/msg= id/pandoc-discuss/1f6a4484-4173-21b9-efcc-d7cd3867d4f7%40intielectronics.co= m. > > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/1B880D38-AC8E-40B2-A4D1-15B534F81C6F%40gmail.com . --=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/9c6e0ddc-b18d-205f-0868-3eb1498848f4%40intielectronics.com. --------------iQkFZ1MnmEIiyIHGv0OUO4PG Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I researched this a little more. The lua "require" function searches paths using
=C2=A0=C2=A0=C2=A0 global variable LUA_PATH
=C2=A0=C2=A0=C2=A0 environment variable LUA_PATH=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0 a fixed path which is "easy to change when you compi= le lua"

I do not have either of the LUA_PATH values set.

Inside the interpreter, the search path is contained in package.path.
On my win 10/pandoc 3.0 install, package.path contains this string (I have split it across lines to be more readable):
=C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\lua\?= .lua;
=C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\lua\?= \init.lua;
=C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\?.lua= ;
=C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\?\ini= t.lua;
=C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\..\share\lua\5.4\?.lua;<= br> =C2=A0=C2=A0=C2=A0 C:\USERS\<username>\APPDATA\LOCAL\PANDOC\..\share\lua\5.4\?\init.lua;=
=C2=A0=C2=A0=C2=A0 .\?.lua;
=C2=A0=C2=A0=C2=A0 .\?\init.lua

I'm surprised not to find
=C2=A0=C2=A0=C2=A0 C:\Users\<username>\AppData\Roaming\pandoc\fil= ters
in that list.

But it looks like (3) is enabled by the first line of package.path. I have no clue how that gets set.






On 1/20/2023 1:25 PM, John MacFarlane wrote:
Manual definitely covers both 1 and 2: it says

In order of preference, pandoc will look for Lua filters in

=E2=80=A2 a specified full or relative path,

=E2=80=A2 $DATADIR/filters=C2=A0where=C2=A0$DATADIR=C2=A0is the user data dir= ectory (see=C2=A0--data-dir, above).

I wouldn=E2=80=99t expect 3 to work. =C2=A0If it does, that=E2=80= =99s quite unexpected. =C2=A0Can anyone else reproduce this?


On Jan 20, 2023, at 9:14 AM, ChrisD <cd34-gg@= intielectronics.com> wrote:

Sorry, this is my error.

Filters work when placed in
1) The current working directory
2) $DATADIR/filters
3) <Location of pandoc.exe>/lua

So the manual is correct, though it only specifies (2), not (1) or (3).

Sorry for the noise.


On 1/20/2023 9:47 AM, ChrisD wrote:
What is the correct location for lua filters?

The pandoc manual says it will search for lua filters in $DATADIR/filters. However that doesn't work for me on=C2=A0Window= s. What does work is:

1) The current working directory
2) $DATADIR/lua
3) <Location of pandoc.exe>/lua

The location of pandoc.exe for me is user/<username>/AppData/Local/Pandoc. This is on my path.

Is this an error in the manual, or do I have something configured wrong? It seems to me I must have read=C2=A0somewhere = to use the lua sub-directory, but I can't find it anywhere online now.


--=C2=A0
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit=C2=A0https://= groups.google.com/d/msgid/pandoc-discuss/1f6a4484-4173-21b9-efcc-d7cd38= 67d4f7%40intielectronics.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-dis= cuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-d= iscuss/1B880D38-AC8E-40B2-A4D1-15B534F81C6F%40gmail.com.

--
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/9c6e0ddc-b18d-205f-0868-3eb1498848f4%40intielectron= ics.com.
--------------iQkFZ1MnmEIiyIHGv0OUO4PG--