From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28513 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Interpolation in default file paths -- the current output format? Date: Tue, 01 Jun 2021 14:06:45 -0600 Message-ID: References: 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="8644"; mail-complaints-to="usenet@ciao.gmane.io" To: BPJ , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBYVG3KCQMGQEINL6GQQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jun 01 22:07:01 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ua1-f59.google.com ([209.85.222.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1loAfF-00020s-1t for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 01 Jun 2021 22:07:01 +0200 Original-Received: by mail-ua1-f59.google.com with SMTP id t19-20020ab021530000b029020bc458f62fsf8143498ual.20 for ; Tue, 01 Jun 2021 13:07:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1622578020; cv=pass; d=google.com; s=arc-20160816; b=xMP/h1gSDzmE7K0hCw8E+PzmEgokRJTEAGi474VvMr6fpGH8Pdq84ozAaWyErnuY3s fNRJFgDt5vwTK5ulU1R3pfqVuRvFebehzSaW9X51G8qSw21w5om0waInVUoxTipjnn4N 67RXenWC9pQEaokmCHZXrliklP58hLHYN6LH1RzvwhyCe7wy6keJq31PP15QHCp/QLaT yqoZAePm8YBu0Cwzq9PayyKdv/wr+bknL4bbZ1f4/lUMmoOar66WR+1aIGFUyq0Ra/6J 1EXgRADTzbf1KlKnfc48PntZngGncfaBEpQcdxaGNTT+vCRM+utleVt1s0U/daQWWSf3 xKBw== 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=x7WL/GDiCKOhBnsOdH7M5cFrrv6KJQnH0SeMAprgMBM=; b=kFO7xH7lzMSUowZ+DzzKq0NOFquQod2gydnKLpY0OIZkb9yh8H3mEaYHVpT79KKsLB lgY2IFSfhOU6GJul7CinRRCDZsrGABUU5bE9ciuDbe/lALzfRykmiC+jSv3vqQWyPm0U M24rX6eMdhTJqWzIA3rr/Ly1YMLvJ2Pb+unPacnn9f9PMKGa0yBUdFMZ0Gkq5Sfz3hTz ifRQ6xeqzgRYXP/+ymQniBeJ8zoCrOv9vIcSFzR/0IyVEVBxtu/94yqK/An+6aLOiGis nufsmAhhFgHjdsfg2id3tNQb3Em9b9U8wdsVOX8GlAGL5cHxdN856Km8cwFpAlj2jvLp 2saQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=lPyD2Tto; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=x7WL/GDiCKOhBnsOdH7M5cFrrv6KJQnH0SeMAprgMBM=; b=fvt+/Vo4UHEURsHPvLHWdHIKFzRxiGT4pfqJZCn65Kx8wU8ChHCZc1zE3Diobg/Ypr fF+L31LPiZn0S8w5+oRP9PwoCMEMdc1tMhI9nL073UN/+dCQ35I/Z/zpRWcnwe3mdTBp 5EVqjAlLwnWGz4zCe5FpJ/un4BU1cyT0BUW4o65BCH78ZUHlbvLmUweap/TH+AAvPs7W +/RlyQtJxms9frVuadszE8WIttOACIMKOc3p3lfeOUPGyxAcp8gIFhAridFLaj5bU4HC +QrEQHTtRFMMgD681AGN4S3HDA7+0EGMbKKNKqT8DZBkVZ1taur8/+blMfojah1jc2UQ 2n+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=x7WL/GDiCKOhBnsOdH7M5cFrrv6KJQnH0SeMAprgMBM=; b=XSeNzhlQRRA2MIefZJ1gtP8ZtebAs/BjxHj9uerjqdqevO4gp/d6TdH0X9yF3bkRhs 0esXtBZTEgG6UWa1i0G5q2Z5edo/17tE/CzlMjw2P3hrWreECsNhdn7bZBiaumcbT2wB YHWhwev5GlVZuwOdFVQRgamj3sNLZFTdSQexsInllanjpYrqUpHbsT48W8MkVr/wdlZP NLjPMBNibGfQgsuCeGv0kWV5YROzWdqmWsp5FgVzUH9RNcIqWhksubAvgw73iFlnoEba D/zL9jx5oCPu+vUTUUlwQ8yJTGy+OQ0TkHwcptTBXtHEhNeqCpbxNZ2qmOXQmwHEre/q BrFw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533eb3nol1lc+lY4NG0ixJGyS0mSvbJDzcz8zKekfx3zvGefQgWl fNBtGDOaenCN0CaDxpi52S0= X-Google-Smtp-Source: ABdhPJxal8rzrVYqlBFeGdIv2L4e56zeAL+0pR2YQw8N0ULhu1+DTkLSiSGyVWanilN+8RK7SLlJTg== X-Received: by 2002:ab0:3256:: with SMTP id r22mr17769660uan.47.1622578020197; Tue, 01 Jun 2021 13:07:00 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9f:2f12:: with SMTP id x18ls2382264uaj.3.gmail; Tue, 01 Jun 2021 13:06:58 -0700 (PDT) X-Received: by 2002:ab0:3759:: with SMTP id i25mr11575468uat.17.1622578018619; Tue, 01 Jun 2021 13:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622578018; cv=none; d=google.com; s=arc-20160816; b=QMw4YqrNORNv8TkoqEfIbRwiWfGkDt4H6b6mgwKVM8ELslJdw6VbZVFce8nG72uHSJ xF5YlzwQsuKIH2wFOfg8FljHH850JH/PHWqSb48KnE7fUTfJbddRak+uoWf3gs7i7xR+ y+gvOU5H1U/cHO5cl+/vRfYqiT769riWQvQNn1MY8U2m4cqOHh9CTQPJZARNSWh5ldMt T+vS1ylmiZRfb/vVL1coFTTmNYZwz19+TEh+cbGD3nxKAagLQCeMF2h+cCocdXXu7Jyp csgzLRiiq71Ef+bfXl+X2yrOPxmGjRcnljGyoSamIJn9+rpsuGViCPBDNUqdoXnQAyYQ +vZg== 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=6miolmkAGPZBm3j5ERLXc8gSkF97mA05t0S0IOYqx/M=; b=kPDPDSzKeQjIxTQDnM34ZyMhN1uq6KnLyB4PWSI5uUbNUJekhit5vnb34ITyc9jAn0 HoeQ0mizAGqreBy0LazyBwsSSDlJumm/jV6lvahC2N4vGk6t+aqAlROkMAwim7uYn/tV VeunSSLBym9FevJMUMQ1jG+B1OAN1nJuX6zFVqeKyc8/1BV61ABV1OmWQw2U7262WfnT Q9xaYsnkTZjER+P3C2tIl0rcwsLDbOJX6+M0lqsIvikQuIA1vbMY1gMOw0aqOD/yQMVu xk4Gp+rN6gV0b0f8sRzYB3tFvNXvqLx5z4wzkk3OGZcZmNEK5e7K/frjnrsSDrbsVyph gEoA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=lPyD2Tto; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com. [2607:f8b0:4864:20::536]) by gmr-mx.google.com with ESMTPS id p201si50052vke.1.2021.06.01.13.06.58 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Jun 2021 13:06:58 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) client-ip=2607:f8b0:4864:20::536; Original-Received: by mail-pg1-x536.google.com with SMTP id q15so245527pgg.12 for ; Tue, 01 Jun 2021 13:06:58 -0700 (PDT) X-Received: by 2002:a05:6a00:16d3:b029:2e9:e076:e65a with SMTP id l19-20020a056a0016d3b02902e9e076e65amr9446020pfc.21.1622578017545; Tue, 01 Jun 2021 13:06:57 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id u13sm9834971pga.64.2021.06.01.13.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 13:06:56 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id B4AB5A23E; Tue, 1 Jun 2021 16:06:45 -0400 (EDT) In-Reply-To: X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=lPyD2Tto; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::536 as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@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:28513 Archived-At: You can already interpret arbitrary environment variables, so you could do: FORMAT=docx pandoc -t $FORMAT -d defaults and in defaults.yaml you could have output-file: output.${FORMAT} defaults: ${.}/defaults/${FORMAT}.yaml BPJ writes: > I have been thinking about the feature with `${HOME}` etc. in default file > paths. It would be good to also have `${OUTPUTFORMAT}` (or just `${FORMAT}` > like the Lua variable) so that you could do things like this: > > ``````yaml > defaults: > - ${.}/defaults/${FORMAT}.yaml > `````` > > Filters, CSS, includes and metadata/variables come to mind as things which > often should be different based on the output format in a single-source > scenario which could be handled this way, but there probably would be other > uses which at least I can't foresee. > > While there certainly are situations where you could invert this and say > > ``````yaml > defaults: > - ${.}/defaults/common.yaml > `````` > > in `./defaults/latex.yaml` there certainly are situations where including > the format-specific file from the common file will be more intuitive. > > /bpj > > -- > 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/CADAJKhB3zWPC_601kJYNjFO7_y2%2BxK1M7x_YG6AvJnRDe_BrGw%40mail.gmail.com.