From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30694 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: BPJ Newsgroups: gmane.text.pandoc Subject: Re: Custom readers and writer paths Date: Mon, 6 Jun 2022 21:53:16 +0200 Message-ID: References: <874k0xpszm.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000004da08305e0ccd358" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32818"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Albert Krewinkel To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCWMVYEK54FRBOFW7GKAMGQEUMUHLEI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 06 21:53:32 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f56.google.com ([209.85.128.56]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nyIn6-0008LR-5q for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 06 Jun 2022 21:53:32 +0200 Original-Received: by mail-wm1-f56.google.com with SMTP id k5-20020a05600c0b4500b003941ca130f9sf5171537wmr.0 for ; Mon, 06 Jun 2022 12:53:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654545211; cv=pass; d=google.com; s=arc-20160816; b=Vo2zF1laUpvuGbDmEPgj974/PPJgPbo4+3OMeC5UPA9k+FwwVjMVqFSDOL4KokDZ83 iZAp5iWKne+P9cbBpxlYIuEkqGG2BkQElLXue3Wu7MnK+P7HIz2fRbXGdKRyeFu+L+W4 p9e6whhZvAjfblQdESBQi7ZgpzhsQL4KkQp1s6BnnP6bDT5vbE0Ipu+XfcFptXLtZwBA Q3pp/E77CZ/y1Q6zF5pLtFvoGyI2O/PseSN+19OUZNy7iErolnJkpR9sOpvgocFuVzcI xxNSfXIxfZc+e2g4oh/6NuuyX4DioqFIAG6wFyovf9THiJ3CLjUMwyAX3Uwxj69JIzKo Vo3A== 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:cc:to:subject:message-id:date:from :reply-to:in-reply-to:references:mime-version:sender:dkim-signature; bh=CnzqX/0kon+rF83qAE3EZcEPVmN6Wyn+JxsfPd49Dd0=; b=CcRtBknNe6+Ni3nzHzF9U5jEwoKppj1vG1hYhKqQP0txF85YgrCKhttwO+F8jyioH2 tEBrAYeUNiQTDJt5mmcsRHkBiHfPmGPlwTzle0V19jghEkGiAJdYwj45UsQhNe36j8TU v/vBRWAS1Kbz/adncDxLww18AICyv+Y1+F2Nogn0ND3phcBHCveMKtVvi/oCVVkusB9a Eo3TXiHE4CaWaZRLh9x3u+5CdZpZTOf+oME1w0arZmyIyso8uSFScjo1NtQgZvhb5hA8 rdjOeHOtSs/zqlXFgZJg6i2U67KXO0x/f3fyRvm//CETQ4apoDE5XqdlJNrYeaNPMaRb gTlw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.47 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:mime-version:references:in-reply-to:reply-to:from:date :message-id:subject:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=CnzqX/0kon+rF83qAE3EZcEPVmN6Wyn+JxsfPd49Dd0=; b=lXCjtDkkxVAQkB29Kr9QxrkkpJCUHKxr2ZKvqrmlHMgr9fFbYnGwqbV4zs9KgGFetH ggrUpIltwmJMJenJym9ktoZjqH9dyiyNFw6V2bpBqkmhMhBOXh8BVYHGYBtE3Db0R3KV 6v1yMKY/wSGbC8z3o9w9dBNiZCGJsckRyCFGURe2Rk5RMXhXfrm/hqo5g3RPuv+7rH0C dMXYxD7HUmsczK76GW6tNE3T73lLAUcJ8KW4ru4fN624w7h1/WZNKPc/VMnqSnltKiJq NvD++97Q9SVntuj8ylcoCzlSvs840+d/qgywOAgUmX6cBS5DtB9c7zHkWiA6TVqeyxvP TazA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:mime-version:references:in-reply-to :reply-to:from:date:message-id:subject:to:cc:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CnzqX/0kon+rF83qAE3EZcEPVmN6Wyn+JxsfPd49Dd0=; b=rDpP75P2cObvNCZ5wtkq+EblKkh7HGFmtOYtpu29L6OwGeBW5UZIN4TN3Dvu9pvnYX HASrHyJiF7fiqPlr26GAmGe4MaWuMmqg8fpdI9LXQ5Qhjd/drZBBeUNT4k43zIscIcjY iASooZcA2Mcc2od9ogBfJqbO9ruwCUd/iwLQJiTnZn4cocjIl31+nuauRY7gIoHEp+4b sn0NiOt6NRRK5Jbchxh+9kWhkD99DNXcQO44bPW+WRFrB0q9+Q2XYj9ewQHGHV4UncS3 oM2yNtArP0Yb+ny4rHH0eQz6aDjvmz9Bg2KLZjLbxDCCj9ETBDPutxnWvxu5cuzlTzTw G3Zw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM531w6wi+9ZUcqH2UatgeDcR418yQo4D+DxllF9rvDx0kH8uQFIJH NOZED8WhY0qSezXts1hoHgs= X-Google-Smtp-Source: ABdhPJyueuChhcsWJuEmXE5mJqYsRWDOGDhnCAr55tG0RlTvMwOU+XmQ42S0Z4pYXsS8gZHZKeah+w== X-Received: by 2002:a5d:6a92:0:b0:210:3387:23ec with SMTP id s18-20020a5d6a92000000b00210338723ecmr23640276wru.102.1654545211725; Mon, 06 Jun 2022 12:53:31 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a5d:59ab:0:b0:214:1ae1:5d70 with SMTP id p11-20020a5d59ab000000b002141ae15d70ls1629165wrr.2.gmail; Mon, 06 Jun 2022 12:53:27 -0700 (PDT) X-Received: by 2002:adf:eac4:0:b0:217:737b:e77a with SMTP id o4-20020adfeac4000000b00217737be77amr9845642wrn.121.1654545207530; Mon, 06 Jun 2022 12:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654545207; cv=none; d=google.com; s=arc-20160816; b=xQ57pz2TapGEvewZYy/w4xluVKBASX96HiI9H/kOL7NHsy+iZeBa41tZHT8hanqNzJ 8iXa+yBrz6b66SKeGUrVwYkcDieqoSIbZDfD/NOJ+2XOnWGZgT5Nb4KVuufzRxjBdQOY mjJJJyJxaPmAtO/u8XyaYcVgUgFQ5Atn0vvq0wrdmaS4xYwGN3bmWyX1mu0tINkkPccI avF5NK8nBRuIOprrNqTwihi1fzdv0NnaA1ruj/r2zG14V7PvS2lsT+Ga67Qean8/aEBc rfgKCjNO07oE6K0dyCvMMpu9Opnj5cjO/VF7+NidgrSsGtYX6+5qJZpKSswIv9lmE4jc 0i6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:reply-to:in-reply-to:references :mime-version; bh=Hj91RI1b3Fs83K2EceRrMt1q5iMLyG0TeHK35In44KM=; b=W9UpKZ/ED9OparBx0clOxjhrfTpHMfcZEE9jCyymaIXAL803C5ge8iZ0yrJ8A3aREL uw7EL61LQXFBIdqwqPDHyqnbnk60t+ZeAuG+W4AhjrNUoIHIJGtoonjw7l8B73C4Gb0E o90/FdDu6/Lr9xSz8NOWWL9LVC1hY8SU0xgbcPtVPIqqq+5zJnQOUNauLUMSc9VEmRv/ uRK5XMiT7kiuouYmJyi+nSTLozriNlHaV0YlfA7TkOuxlctC4uV71lBaLKMtUprKHj8F OjM1PXYiCwbNIcbOJZT29UhSGOx9qEq/l+zGAUKNli8DXVIiifjObgATRFz2EFbl0yPO OCDQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.47 as permitted sender) smtp.mailfrom=melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Original-Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com. [209.85.218.47]) by gmr-mx.google.com with ESMTPS id j6-20020a5d4526000000b0020c9eedfe67si578444wra.3.2022.06.06.12.53.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 12:53:27 -0700 (PDT) Received-SPF: pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.47 as permitted sender) client-ip=209.85.218.47; Original-Received: by mail-ej1-f47.google.com with SMTP id bg6so11167801ejb.0 for ; Mon, 06 Jun 2022 12:53:27 -0700 (PDT) X-Received: by 2002:a17:907:6e12:b0:6fe:c2fd:89b7 with SMTP id sd18-20020a1709076e1200b006fec2fd89b7mr22218899ejc.581.1654545206582; Mon, 06 Jun 2022 12:53:26 -0700 (PDT) In-Reply-To: X-Original-Sender: melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of melroch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 209.85.218.47 as permitted sender) smtp.mailfrom=melroch-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:30694 Archived-At: --0000000000004da08305e0ccd358 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Den m=C3=A5n 6 juni 2022 20:39John MacFarlane skrev: > Albert Krewinkel writes: > > > I'm not sure if it's better or worse, but we could also look for the > > reader in LUA_PATH (via `require`). Using a bit of pseudo-code: > > > > if file_exists(reader_path) then > > dofile(reader_path) > > reader =3D Reader > > else > > reader =3D require (reader_path:gsub('.lua$', '')) > > end > > > > The reader library would have to `return` the Reader function instead o= f > > just defining it as a global. > > Probably better not to change the interface in this way. > > Maybe treating these like filters is the most sensible/least > surprising thing to do. IMO the most sensible. That way you can just clone readers/writers off GitHub without authors needing to go through the hassle of setting up a Lua rock. Having to do that will likely discourage people from publishing their code at all. Also of course templates, filters, defaults all work that way already. I have my data dir in my dropbox directory and symlink it in ~/.local/share, or rclone it on my Android devices (via Termux) where dropbox isn't a regular storage directory. Should we have readers/ and writers/ > subdirectories of user data? Or custom-readers/ custom-writers/ ? > Since they are already subdirectories of the dedicated pandoc data directory `readers/` and `writers/` should suffice. Seven characters less to type for each compared to `custom-*`. > -- > 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/yh480kv8tdd4de.fsf%40joh= nmacfarlane.net > . > --=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/CADAJKhDdwHuvBjTCAAwrFY6RcaZ%2Bd_FRMnkVp3MMUtntrsBdYg%40mail= .gmail.com. --0000000000004da08305e0ccd358 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


Den m=C3=A5n 6 juni 2022 20:39John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> skrev:
Albert Krewinkel <albert+pandoc@z= eitkraut.de> writes:

> I'm not sure if it's better or worse, but we could also look f= or the
> reader in LUA_PATH (via `require`). Using a bit of pseudo-code:
>
>=C2=A0 =C2=A0 =C2=A0if file_exists(reader_path) then
>=C2=A0 =C2=A0 =C2=A0 =C2=A0dofile(reader_path)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0reader =3D Reader
>=C2=A0 =C2=A0 =C2=A0else
>=C2=A0 =C2=A0 =C2=A0 =C2=A0reader =3D require (reader_path:gsub('.l= ua$', ''))
>=C2=A0 =C2=A0 =C2=A0end
>
> The reader library would have to `return` the Reader function instead = of
> just defining it as a global.

Probably better not to change the interface in this way.

Maybe treating these like filters is the most sensible/least
surprising thing to do.

IMO the most sensible. That way you can just clone reade= rs/writers off GitHub without authors needing to go through the hassle of s= etting up a Lua rock. Having to do that will likely discourage people from = publishing their code at all. Also of course templates, filters, defaults a= ll work that way already. I have my data dir in my dropbox directory and sy= mlink it in ~/.local/share, or rclone it on my Android devices (via Termux)= where dropbox isn't a regular storage directory.


=C2=A0 Should we have readers/ and= writers/
subdirectories of user data?=C2=A0 Or custom-readers/ custom-writers/ ?
=

Sinc= e they are already subdirectories of the dedicated pandoc data directory `r= eaders/` and `writers/` should suffice. Seven characters less to type for e= ach compared to `custom-*`.



--
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 pandoc-discuss+unsubscribe@googlegroups.= com.
To view this discussion on the web visit https://groups.google.com/d/msgid/p= andoc-discuss/yh480kv8tdd4de.fsf%40johnmacfarlane.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://group= s.google.com/d/msgid/pandoc-discuss/CADAJKhDdwHuvBjTCAAwrFY6RcaZ%2Bd_FRMnkV= p3MMUtntrsBdYg%40mail.gmail.com.
--0000000000004da08305e0ccd358--