From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31507 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Lua filters: Extensions with pandoc.read? Date: Tue, 04 Oct 2022 15:31:02 +0200 Message-ID: <87r0zn3dff.fsf@zeitkraut.de> References: <87czbrfrzr.fsf@zeitkraut.de> <87v8oz3ohm.fsf@zeitkraut.de> 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="13169"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBSXU6CMQMGQEXAW4ZDI-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Oct 04 15:51:11 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ej1-f58.google.com ([209.85.218.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ofiKE-0003HF-8O for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 04 Oct 2022 15:51:10 +0200 Original-Received: by mail-ej1-f58.google.com with SMTP id dm10-20020a170907948a00b00781fa5e140fsf5015977ejc.21 for ; Tue, 04 Oct 2022 06:51:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1664891470; cv=pass; d=google.com; s=arc-20160816; b=HZgvVTMJyuZy6OkIN+84BhDrePLXhxvv+UB981HBzhOnXi/s/FM6bAl/AWX2kdAtQX dx0dY1Qe56V8/wKVRQ2VOWZRvSLoBaz4GK0sVJlY9EhOyvHRgpYjQGncCuJqhmsmahE6 hXaaUXQdU31aKCsJRRUn9AZAfVZVJ5UtalmUkZjLFn6wYZgksh2vyw8Q6x/qbYyawrT6 ZReHKo578OsT2JHbpPilaJ9xlpoaXNdI0yubKMi29DjEcpSOY/UDJuZ1ikHG8y9t+IbT SihlJrXJpXgiHNyjbgCEenmQovvi+VBzgi9gdIqYSTpHYRcA759gHdKKH+7sN7SooSOR C7AQ== 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=iiaipXdH2zPjq2zYidAIk80tirgTibZxGZglxmS8YXI=; b=ACJdGCHAHoLSYJV/6nTLP4FvdJNN7um//6LyC1hPsC2oMHAw2bp8CA49f9vQ2CPJiZ NnGP9yQ6PbjU1rTiu7FjLuLHH43Wr1lZItycvuIKZ4vQcBtpt2bPLF385HgISb4CxQl/ 4cvEoV1Xms9Yiqmu1k4GdzVv+w1+73UrLAcWUZRuA9rlLCjlr6zzxb68uDyOwyCvbwAh 9/E+ZsN9KBBP0Mfs3R7gm+E5S6j4Aq9ZB6IC1I47HiMjkzNZcLdvx0Jby06hQUqbnieo se+lHv66BafbqAQfnxqbsl/lUqaiU7Xt59cgOKiP88nJGQKuNm9sUoAMmUU4EiJDhgRv xMDA== 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.152 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=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 :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=iiaipXdH2zPjq2zYidAIk80tirgTibZxGZglxmS8YXI=; b=Ppqs8e2Z5I+DTwDxFhcdzGweuhQ8J0oXLAm/vhd0ccbrd5oYk2mOB+cvKVjEp8IkuR AemG6qS2m/2KncR40ciostGpcJYw5yiRC3BVSN/rqJhIVdo7GO38degcNCxddQHWnma/ XAYaDV1uThAIJJcvqUkL2is41ibvdxoWQ6UYc5pccNdg8vFo8fl65sKmY/vw+FVUzaaM 5/PlqOqlmnnGuV6cFuIDLzNF71EFIXcdQZ6cFgtsLYZNzo2pEcJ80L0AWqvg1Zr6QUyl Yi97SSywEBPR7D6Jpt1wvGGSfBindBPPr5My3WDMZo4wgUpY2PzH5+bl5HBCBEVoJ 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 :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=iiaipXdH2zPjq2zYidAIk80tirgTibZxGZglxmS8YXI=; b=WIC82r/Dfm5ygpDvGQc+z5VvnzO/PYMKW37FsK6DB0zWmg5PJ9gPtztXcI58V9x7Ro v2zqVe7kMZA+iuCNP4/p744aQ/Bvx4GklVCeLBnOG+qIfubIffu7oa8IWMDFyC7jdf9Q NZx0OjwB+ahbxyZpgyc09LpOjxbY5cLUrIRiQfO0tztHRVtx/xYRvo3tZ0zPlOjLMcC1 ckrTrGkQvJqF9ctOHSSDT6rB2tnbBBVsu/xnEJsFahyady6FG0wP7YiTTzOJfd4S6Pfy GpmF4A8DZaajBbbcdO3b Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf11WAUwWlFbZjN1AXiseTSX74cO6YC97ClzlV/4N3SEy2/EoHpP yL1C4qhgBcLBcXD98DS5Kgo= X-Google-Smtp-Source: AMsMyM7K8AedMBfMGL1diI8H/LGtzpSxxf9QCva9h04fBMBMG53sjWOToKfSPAGCgecb8UpHsXlv9w== X-Received: by 2002:a05:6402:3584:b0:458:d3fa:fb89 with SMTP id y4-20020a056402358400b00458d3fafb89mr12534129edc.218.1664891469808; Tue, 04 Oct 2022 06:51:09 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:906:bb0a:b0:781:dc04:ef3e with SMTP id jz10-20020a170906bb0a00b00781dc04ef3els1121952ejb.5.-pod-prod-gmail; Tue, 04 Oct 2022 06:51:05 -0700 (PDT) X-Received: by 2002:a17:906:794b:b0:787:a9ee:3bf0 with SMTP id l11-20020a170906794b00b00787a9ee3bf0mr18954456ejo.354.1664891465426; Tue, 04 Oct 2022 06:51:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664891465; cv=none; d=google.com; s=arc-20160816; b=Fk2xn8ptbMhhoq2M/6e/qUVeRwmCs512fV6Ai24nVF4MrHiskRC+O5Pwd7b42IRr/a TggfVPpMiqmqRIzNKNHp0Sp9zTC6rTP1TuqW6iVUAuCc14BqGnuZbU1dwHw7p2lHvEz+ gYDYONAfARsyvM1DTkw57LZNga/pwmXldKDceklmDaQ7AiSoHeIjY0+fz2p7/tlmAM8t gWLvXZHDtks7GNk7MiWaptNeWYgUCNhNDrI4nX98+b9EtufmJxxL0wvHU5xTLmAVRmsm dCBILSDd/rDrOYL1s9hkVEz0p6pgAFrsm+xJs9u0CQAgOYlKf8XfgqsLDPcEj/rl/3ny nDrg== 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=zbXkwUfupq+nvYVf9y2+qaUqknPrlT5HNykl+1GZoco=; b=XOLuTZ3EZH61uK/Hx+nA4wJTkhOqc7yKJJe3qvMLvt4ifk/KKcAd2BDJ7Tw88zjC+t LRJN/xTMn9+8btk+B44XD54HqxqXqoZm3QCP6XcQZ5Je5TVh3ZTiIq/iDc3qTdoz0QL5 Bf7AJIflEOvdLx7YhvqucI+xcN1wq8BbSvEsbSBUD5y/ONLjCtPCjM2YzXL10kHlkY/S Y3k2bHq63B2kapEQh/YxUBjQArkc1gZTg9kwPp/kPk+VYAKAH9jDzr/ow6w/ZZZtFm1I N8LcJzUnAI+QuGguqA27yZbWkL/LlS1TY9GKhhmxQO5zZ7/GrX7WiPjaMtgwOQxUHKJz BJ4Q== 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.152 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org. [80.241.56.152]) by gmr-mx.google.com with ESMTPS id n8-20020a056402060800b004593fb0c160si114230edv.1.2022.10.04.06.51.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Oct 2022 06:51:05 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.152 as permitted sender) client-ip=80.241.56.152; Original-Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4MhfHW2f5mz9sTx for ; Tue, 4 Oct 2022 15:51:03 +0200 (CEST) In-reply-to: X-Rspamd-Queue-Id: 4MhfHW2f5mz9sTx 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.152 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:31507 Archived-At: BPJ writes: > Den tis 4 okt. 2022 11:52Albert Krewinkel sk= rev: >>=C2=A0 =C2=A0 -- absolute set of extensions >>=C2=A0 =C2=A0 { format =3D 'docx', >>=C2=A0 =C2=A0 , extensions =3D {'auto_identifiers', 'styles', 'citations'= } >>=C2=A0 =C2=A0 } > > This `extensions` field would be identical to the `enable` field, > wouldn't it, or would it mean that all default extensions not > explicitly mentioned in it would be disabled? And what would happen if > someone uses it together with `disable` and/or `enable`; which would > be ignored, or would it be an error condition? Mmmh, good point. My initial idea was to use the format's default extension when no `extensions` field is given. But that's confusing, because now omitting the `extensions` field can have multiple meanings ("fall back to reader options" or "use default extensions"), depending on which other fields are set. Not a good interface. Maybe extensions should be Lua objects with some convenient methods: ``` lua { format: 'markdown', extensions: pandoc.extensions.default('markdown'):disable{'smart'} } ``` Bit more typing, but much cleaner. > If the format can be a table as described I think it is better to > always ignore the format/extension info in the ReaderOptions =E2=80=94 an= d > say so clearly in the documentation! Yes, I think you are right. > Also I assume that `pandoc.write()` would behave analogously? Definitely, `read` and `write` should stay symmetric. --=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/87r0zn3dff.fsf%40zeitkraut.de.