From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/30692 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Custom readers and writer paths Date: Mon, 06 Jun 2022 11:38:21 -0700 Message-ID: References: <874k0xpszm.fsf@zeitkraut.de> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22330"; mail-complaints-to="usenet@ciao.gmane.io" To: Albert Krewinkel , pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBIMT7GKAMGQEGR4PUTI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 06 20:38:29 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f192.google.com ([209.85.167.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nyHcT-0005aZ-5O for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 06 Jun 2022 20:38:29 +0200 Original-Received: by mail-oi1-f192.google.com with SMTP id bx31-20020a0568081b1f00b0032e3d0b1db9sf7153194oib.17 for ; Mon, 06 Jun 2022 11:38:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654540708; cv=pass; d=google.com; s=arc-20160816; b=00cgw6vkSbR2jvviK5c1it+Xgp7tFP2VvTOhXg3DTQ4IDKMz/Q1TAvdw3weH6vrZrj 87BDD+g0/emf90aiGE4zbeaXhUe2RaUI2jmq855S9pcneFiV2ubEPU8gtlj0Jl3ODhTO aI9QHoo4NBYLAAahk//DJyrs5UD3hB4E0Qm0zCTg75WZXFlaXCIP7dvkG3EFYNNKIHFN V9C0OqYhw/Lhr0AGUi8OocWUCuzahuXDdKpNFl/CLt3+buTCqtvCe7XMMZXsmJtSKZfD hCYaz0BHl8Xz475bR5jqP04ah4faMqhSyVsjIioSPLsZlrqLs8JW5utEddIh7m2s4d8V imCQ== 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:mime-version:message-id :date:references:in-reply-to:subject:to:from:sender:dkim-signature; bh=x3QdckKy3IooXXG6GAh8T6yx9HtNr8ksCDValivQEBw=; b=ri5Q9znXo6sOezWC5yr2g08TODluVyy0PjLnej9iFTwCQ/9fJ6FZyUPAEiuZw5c+Hn g7+PLfT3bzyW1l0O75VtXQjXCm4jcq6gV7SK75C4Q62P1mwpJMMGn1aV6cZxhwQ4anQb f5MexeFIWK1e23G37X2OHi5Bx4+XuNkOUwSuS86O786m65iVm0LyKjb/Sq37Qw1F2vZ8 ZoTkA8hkxE2tYvB8DeJIv/6RX3/wGCby1bqEpAjA/9c92gyIHa4Mizck0BxiTrKIe8cl o4KKALmoL4+ZNp30H2AokdRtDOrBZyz2QMJXw6pA4M1REog4TXEvWgOI2+Qi/M4xKJyp oIaA== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=owGawzPa; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=x3QdckKy3IooXXG6GAh8T6yx9HtNr8ksCDValivQEBw=; b=GrcJtUA7AkuLnNF+7Fcqd9co8kbaxdnaUQjUsqhh2OyGOtca+R0by4i9KENF5++EFa 8+0lD8Q3yALPxXy5dlw/QcmzqxvL1fNVuXfbFQj0VAkJjtLyWESvb8K5DhWEdpJCskIb WCZIJfxtZhqoPP4OzRIko/XutDFKge8QPWZ1e7Ej10agvlcC1gSSB64Vl+n9XwEApowb qgWYFL2uYVisWg+NBOY19DZZxgdQCnfkg31wbqt+lokMHjp5/FtpCr0WCfvMfvRHN9D6 FtvZEwvMjQYx7QB671AvFwEp8OvHprxMiSxzcykGF06Tbcf6R4MFFWa8XS7EJiw98E2d DC1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:subject:in-reply-to:references :date:message-id:mime-version:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=x3QdckKy3IooXXG6GAh8T6yx9HtNr8ksCDValivQEBw=; b=xQdo8HMlxv3Tw0VaGGzWhxchcrWUaIv4ZccW/0cXU+V507fzN/UdFireI3oJF9VUdh G4iUp7pEAzXWnKQ9GpQHAE2LLeW+nVgjBdBT3TNlfZkmDDfTugSrv8GvxMIdbOhQlbKV E3NeR05WgM35uKIn1fbX09jQAvYAC7yVFjnFCKXz+HIU/aVs6kjyQiHTrEW6JeufvJ0I Cxqzg3wWmkxGh78pf6ftg/X/qFMIU38mr+cWUEu4fJ16eXZw6bqRBpzyWOQYFq2p8MNF mGp4SQ6D811LznC098xD2a1IRAZTdR7aycdcON4slSykT09hZxhB08QIXaFzn6+roYfc s5iQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM530HB/WYjNLgRqWj1aGPOMrEljnt6XCGuDzVxk1hHSbkrkYlJFYQ JU2DS1nP0A82p7UMURQ0OJM= X-Google-Smtp-Source: ABdhPJxd6lGb+DcFI40v4E8dMGcSUygdQOukfCwlExsBDdtzQO+GZusTIdy0Z4W/tVpadYuFMTdNKQ== X-Received: by 2002:a9d:5907:0:b0:60b:b346:73d2 with SMTP id t7-20020a9d5907000000b0060bb34673d2mr10557917oth.130.1654540708025; Mon, 06 Jun 2022 11:38:28 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:a1a0:b0:d7:1d2b:ec1a with SMTP id a32-20020a056870a1a000b000d71d2bec1als4052193oaf.3.gmail; Mon, 06 Jun 2022 11:38:25 -0700 (PDT) X-Received: by 2002:a05:6870:b605:b0:f3:375:fdba with SMTP id cm5-20020a056870b60500b000f30375fdbamr14292040oab.123.1654540705484; Mon, 06 Jun 2022 11:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654540705; cv=none; d=google.com; s=arc-20160816; b=ZY3rrJr10V1+wfHYaIKqTGhWsMuKN8WDOKDYyKh/by94IhMPXuDlZfqDZjThP/RjrK 4zkxk6hd7AwexfNzDJlIWYZJP07h54Y/zt0Xs2Yc5+gb/qxLwRnr4zPDnKtWHPJAYH3A UWleWUDqqbPMxCWE5bm1GQmko6E1E/ezxRZHY8MN47Y2M4KelQMGSCGFDF3TrXsjaxqU RUvxQqy+GM5ulg+yEAUSm9FBKY/T7f/XcPwdp1/gwy9XkxtLil32jt7YoTkIW1J1Sprl KvKvQ1hsVEv/OkyuEA4TfKqSr0ZuZf9EYT+PSO3m79kgNrrilYdD4LZHaP9c+rtAQUB1 5DVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :dkim-signature; bh=hJUO6qpW3SdDoH/rX4k+3p0glc34z6Y05u4usc1xgrs=; b=RJ8bQViNoH2wybK/0dJof3nRt0u7nz7W5nNHdz0pEwPj3rvY80CPHXi4suIMFVhyvT /cWrWAGVEzTHqyA3VdqZQY+P5OLWuAXWqjiP9P483qF+b6w4yboF8F5CxBbtlHdeQsPk Vn1W/HU4jFPy7FVHApwgatzbd+BznhirvaNi2weYbd+XJ7hs//U4YPqn/omhPZrFq/Es zDwg2y0vrW2Ahq3BcpylNt5eLBoyZXii7d2M37Ph+TmgcvGD5KAwglTD/tQ+GtssI0hc +PfT10w7qx7MSUCqLJ7S8TJasZizjY1c+NbD5eQAOdS0gV5hVQ/+6m6gduLhDCvRssKF MSbg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=owGawzPa; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu Original-Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com. [2607:f8b0:4864:20::1031]) by gmr-mx.google.com with ESMTPS id pn6-20020a0568704d0600b000ddac42441esi1157697oab.0.2022.06.06.11.38.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 11:38:25 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) client-ip=2607:f8b0:4864:20::1031; Original-Received: by mail-pj1-x1031.google.com with SMTP id cx11so13521508pjb.1 for ; Mon, 06 Jun 2022 11:38:25 -0700 (PDT) X-Received: by 2002:a17:903:41cc:b0:166:3ce2:9bdd with SMTP id u12-20020a17090341cc00b001663ce29bddmr24846836ple.21.1654540704646; Mon, 06 Jun 2022 11:38:24 -0700 (PDT) Original-Received: from hermes.johnmacfarlane.net ([45.32.92.108]) by smtp.gmail.com with ESMTPSA id 21-20020a170902c21500b00163bfaf0b17sm8898601pll.233.2022.06.06.11.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 11:38:24 -0700 (PDT) Original-Received: by hermes.johnmacfarlane.net (sSMTP sendmail emulation); Mon, 06 Jun 2022 11:38:22 -0700 In-Reply-To: <874k0xpszm.fsf-9EawChwDxG8hFhg+JK9F0w@public.gmane.org> X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley.edu header.s=google header.b=owGawzPa; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::1031 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=berkeley.edu 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:30692 Archived-At: 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 = Reader > else > reader = require (reader_path:gsub('.lua$', '')) > end > > 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. Should we have readers/ and writers/ subdirectories of user data? Or custom-readers/ custom-writers/ ?