From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33160 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: requiring other lua files from parent directories from within filters Date: Thu, 05 Oct 2023 22:34:28 +0200 Message-ID: <871qe8olcu.fsf@zeitkraut.de> References: <875y3lnzho.fsf@zeitkraut.de> <82dabe2b-28c9-4ea3-a299-36a8c01b31b6n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26701"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRB2F57SUAMGQEI35MR2I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Oct 05 22:39:09 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f55.google.com ([209.85.221.55]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1qoV7k-0006lE-Sh for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 05 Oct 2023 22:39:08 +0200 Original-Received: by mail-wr1-f55.google.com with SMTP id ffacd0b85a97d-3217fdf913dsf1091509f8f.3 for ; Thu, 05 Oct 2023 13:39:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696538348; cv=pass; d=google.com; s=arc-20160816; b=BkNWJCsuk4HVNFKQLAW0vVleF0lJchP2UrVGnW6n5g0c72eOo9UNsP7yFEW49WC4jy X7foH7RQGYRHFc1cAycG/hOPwFc1xuCw1jxMYCcmviAQbIzjtmXVrZ3gx0nFb/ZqKI15 6u4O2LzYMsxXAse8lYeBjETp416J1V0eCqPBphM7eqyf0KgstaiScFK09bHXsWwoKCZt akF60hiG/ymaS+c/s68G1kxSP2upzMDGn8a48x9N43HHoSIqtErLGz7+RIuGQUl8WDCl 61xvezE0Vwp+w+MXC80NymU/n5wXWGaaSXLJJgB2k/7oQ0Fs0zfJxty6NIleC8Gx28S8 71+w== 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:in-reply-to:date:subject:to:from:references :sender:dkim-signature; bh=cN2blKZ48v8ElpMtz87D9sPVm4p5dYZ5rwncZNk6hfA=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=V8mjYZK4UFwbezsnYnM5srSGHxSHpO7BNIemj7Jpz1zpBrW4mdkwD/6mKd7MOko5uU HenbVxpUAtN6jbgk/baFq0Nw/Pu6zjWzQKfIYH67CCSKT0yAfY2Gv/blZ/R3Bx1X/oZc 40K133N2VUNMFEdhkJMWWY/YUFmXR5FO0JqijkVjtIwRRy5xfvMHiW8zobrm8Sc6GxZq WZSucUS+G8bm/IK0TJ5HfbGYUnt613ixvkVSygjG2s4mBf/AUxB7rFRRrKDKuHyHzwVW /ovQBRoYfTzGrVeCsnEeuYMFDtegXZTfeig12M0rWqJmfg8HBN4eJ587FnqQgfbt8akG fsPA== 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=20230601; t=1696538348; x=1697143148; darn=m.gmane-mx.org; 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 :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:sender:from:to:cc:subject:date :message-id:reply-to; bh=cN2blKZ48v8ElpMtz87D9sPVm4p5dYZ5rwncZNk6hfA=; b=fwPcjVwp54T85Pd/b3fbY3VEmBVujFLAnGJscbcIEWnd0BF6APioCBH+TaJh1Wct4S +9UB4MtvHNSQhNDKssayTNPDmqj7AyK3QcskhcRThACTnBU9sz0WZu8nXWCM8HzhO6fn Q/WYuSdAp6cp6pfIJqpjiRy6NmdpJe3OCJDrBgmw3/pca7d54JXVh8XGH0gqwt910eYa nCHq+Amd9jFRrZkNgOmjmLNz+2zrjH/old58tw9P8m8N0ZC04PFMxxhJ/Y84d5C/wJBD fkf4dm710u2EXqZt X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696538348; x=1697143148; 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 :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to; bh=cN2blKZ48v8ElpMtz87D9sPVm4p5dYZ5rwncZNk6hfA=; b=WwyLtH+1j77XgfzHwox8ciCSZkvU6bx8S/kLU/iWBMR0cEJUGGZkgSzSD9yku+HbFJ Qpwf9xnrZ6JGojukv3kD99rzu2HWuUA3csuPkWIIqU2vev/Q2Z3bJ+ukkP7K94+SHTTA szLF3EpFZ9+PdZluyEXOrG6MsmagoDA7IilW9EG+V/iQv5D7ghFfIJ/Vmli5HMpoxEID BF+MSfFOQuf/dr9i16AKMWU6uMPD5xXZ1jFzo38083oEENNLnQJ6ubujre Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0Yyiv+7ieG78VJvKxombtTVRdeYU9afPgysRHLd4z0OHS0BYhYT2 kdtacWAVl5GKcuYvzBMn9AY= X-Google-Smtp-Source: AGHT+IFZrlr4P++hjtyOnAL/9av1pfEeu6RRAPVgGDxPaeKuk5GnruWnFYoGuz6tj1AA3XSIew2PdQ== X-Received: by 2002:a5d:6450:0:b0:315:ad1a:5abc with SMTP id d16-20020a5d6450000000b00315ad1a5abcmr5714277wrw.5.1696538348013; Thu, 05 Oct 2023 13:39:08 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a5d:5409:0:b0:31f:8541:c1d0 with SMTP id g9-20020a5d5409000000b0031f8541c1d0ls609245wrv.0.-pod-prod-01-eu; Thu, 05 Oct 2023 13:39:01 -0700 (PDT) X-Received: by 2002:adf:fd12:0:b0:321:4ca9:ee86 with SMTP id e18-20020adffd12000000b003214ca9ee86mr5947880wrr.53.1696538341586; Thu, 05 Oct 2023 13:39:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696538341; cv=none; d=google.com; s=arc-20160816; b=AGaOI02B2Ah72SQj70/e6PTL3BjbQhqB2zTaHGkP5UiDPRLGlrkyQj4jDab/jH8vnx +DKdyvhrbMWT/cacVna+gMFpZT3Nt9DvF9eFVze8vNWxSq2ER+FDqFDLhjR1T/xeEFIk 7LTJ+p9zKHuJEHJirONciimlBGpYQ3QblEa5W4+a1n7qVDQiYfPH38AtObJ1qLn3queF rbcX3XJZwOOKcvO8Nl6MXl02rVfsRlPIBTpW4rFj/Df2gFSy57+6tzV5OqxM4XLPyuTg hKRbSISPGVrcI11xL7daW9Fb4mJbZJWE9YjSRCHyNNYOsZIgNINItlQSAbJ/qIl954qO 3PAA== 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:in-reply-to:date :subject:to:from:references; bh=U9eez9vvH3l1rxuFM7IudUNdcI3tZVf6p6FQQOfgPlg=; fh=m01AhCNo7xUywHldCVYouaJypLlN7JgtNYbImzBf4N4=; b=wuBmGl9kF1spYvo7tMARpQB4S3yUMlWwm2v4083YN8NkTA3Kz9A3pLZb3OOgeXuxH0 7wW5GGY2H13v+AUwkoNqjO0wm+Am09EZQ83/DeeFNaXhHOQrt0H3eGdoYWLHB7oNJPCE j+5y2QVJtHatQ8e+ibP5uqLPShcwXkym03vc03qmf/TddXgu73ToGo6BjCu0v8TGcdOL z1HNun2cFeORBdq3EbsNAjiQMRDpNYaTMsZ3PVbYGi4CoY6ATR1bLIdqqo6lrp2tpbDv kTcmZi0ILGqla6L3Fqata4ZX1J9R6QxhcWkd/Ps7evZRNyhoPgxqxhDKozSeuhi20QF3 kdpQ== 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 ba7-20020a0560001c0700b00325960b967dsi130925wrb.3.2023.10.05.13.39.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 13:39:01 -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 smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4S1k1H05d1z9sks for ; Thu, 5 Oct 2023 22:38:59 +0200 (CEST) In-reply-to: <82dabe2b-28c9-4ea3-a299-36a8c01b31b6n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> 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:33160 Archived-At: jcr writes: > On Thursday, October 5, 2023 at 6:19:10=E2=80=AFAM UTC-4 Albert Krewinkel= wrote: > > That's elegant. Another way to get the value of `myDir` would be=20 > > local myDir =3D pandoc.path.directory(arg[0])=20 > > and should also work on all platforms. It relies on pandoc's built-in=20 > path library and on a feature of the default lua interpreter, which=20 > pandoc replicates for compatibility:=20 > https://www.lua.org/manual/5.4/manual.html#7=20 > > I find with pandoc 3.1.8 that while `arg` is defined for a script execute= d with `pandoc lua`, it is nil for a filter executed with `pandoc > -L`. So I'm back to my borrowed elegant solution. Alternatively, adding this to the top of the file would ensure that the relevant values are set: local arg =3D arg or {[0] =3D PANDOC_SCRIPT_FILE} --=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/871qe8olcu.fsf%40zeitkraut.de.