From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23372 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: jiewuza Newsgroups: gmane.text.pandoc Subject: Re: Can't access keys containing spaces in pandoc Date: Wed, 04 Sep 2019 13:33:51 +0800 Message-ID: References: <92055fd0-049b-4943-a51a-2eb0905b59ca@googlegroups.com> <5E6256F2-6354-43F9-9A49-2328471A9D2B@gmail.com> <68fbd484-0729-4ee2-a7a2-0846cd0bbd28@googlegroups.com> <7c15c170-1b08-4274-b24e-280b4585c0c6@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="146292"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDS4Z3WZ2UDRBWUZXXVQKGQEOJPYR4Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Wed Sep 04 07:34:20 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-lf1-f61.google.com ([209.85.167.61]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1i5Nvv-000bwa-N4 for gtp-pandoc-discuss@m.gmane.org; Wed, 04 Sep 2019 07:34:19 +0200 Original-Received: by mail-lf1-f61.google.com with SMTP id q3sf1351095lfc.5 for ; Tue, 03 Sep 2019 22:34:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1567575258; cv=pass; d=google.com; s=arc-20160816; b=rw2Wp5Zo2whhYnFCoepzyQhrs7PYIMGg7biKBrNKDvu/UInWDhMWBspM0emgpK7+kK pVL/yvMCzbh9ELlT+3qNk+uzMEcfgRvejYT3lXnzsd8hqEyOzCZCU0Vjy6BnJXQ45EEB k/2znnZpCOPXJQwJT1NPW23aIhsvfN6MTbNf5lAHfEhalSo67pYWIDqvslqkXgr5kW3K wKprY8ZqGiirvayRuJzwspwMQqbKQCU9XF40YTdwXahFvK5EHE7CKfb//e6CesbPgT+1 vTbEzn1uEOW5+owm2m+3UioHk5PcxFptuHegWiuF6TZihxc+xFtoX8fHsk6eOLrGfpfi pMew== 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:cancel-lock:user-agent :mime-version:references:message-id:date:subject:from:to:sender :dkim-signature; bh=nomMNy26RUt+wfcVkYuqGAsZK882EAwA1yYTAz1SBoE=; b=GMhquyAxSLpi2qvGwPp7Jx0pnMxUVWxsZvF+6jkQ/BvOIMp88Ib5B89t/E2MHXUgXS nfmUXCNffmPfFPgg+858eXjnOoF5rvieNDLZRM/P2XTYcxD2+wxCalDAAdkobx1+oPef 79x0JdIOg29Ejh1skE3trGzmgvJC35M5LFWRRQP10Z0+ee9Jn95atUEyYX3oKRuV3Hug M3OVCzzeIfPyRHFMS4zX71/SZSe4LeWfwpwqUqFh8TkXxvIfUw62tPY5g25RTRe8dDgE 4sx14qg6/V2oqGXtG5a5B2gYVzKn8CRfBgLpBnkkTHP3qZUTxcVpGnfn52dFvAKG3DTF zsVw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:to:from:subject:date:message-id:references:mime-version :user-agent:cancel-lock: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=nomMNy26RUt+wfcVkYuqGAsZK882EAwA1yYTAz1SBoE=; b=bf0ANYF6cU9nP6RkTdTY1E9N0y/JpIXD/z8sO3OCN6BdSQ7HBJoElS7+kJ8D7g6aVZ jSiCY22mHCwaJyKnmT0SzuPk3/koKO8C/zKhN92I3KXyyGmnBqN8ja/ESyeWXarttDDa qIB2cvC+eDBfgq/R9Z92gNmuVi8aaJZSPnAikZt3P+VxmXvFf7EJHjWLUla/rpRFsWG9 tRN/g4LDY9QbAGha3uOPDIYwud0B38wGRxb0RMTFPIAQH54NesU9K8hdz2CVeZkVSDbh 5QkM62tY4WqWDj+1P7QfSFWtHEwSNk2LjxKuWAQbSao9Dndezq1YVupNeFOltMPx5NIa +dlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:to:from:subject:date:message-id :references:mime-version:user-agent:cancel-lock: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=nomMNy26RUt+wfcVkYuqGAsZK882EAwA1yYTAz1SBoE=; b=pKx/IsCFiPmQl8lrfwoKgAKmvJ2/ON+nEBhL54DSG96ztnmDM/bl9BPpPOX9V71l/A sTfHhhJakbdabaCghCzD6BI/FZhaoUdLdLTaRe9ZzzFfgumLB3SLnJWIcey4TnTsLdWT 66tWq3Rpqgw8FUvyi8tJ3wdFdHVuE2TBjS5sZrYSKEU0O4ZkQadDDZ3Hl6QXuYd8Ajun eClEhueQdWxi/aifv8WxTXAu7KRulrHlbagOdyZmF0NYr0Q83hOIL3rY6BwoGyUEvr6o +TUYYLmA2n8k5U/nPjRzZLN083xAFCz98WgRpZyqIgXzz8gZCa4B3QaNqJHJ4Tj7n0bi rsyA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWDQjtnSR7f6sSpQ/xD1RdNhIq0vgtwgcVnKy7G2d4Od+8yDrbR ZgQZO91MssZojZf3Dj0Nnrw= X-Google-Smtp-Source: APXvYqySPCmUzueuHmjHMkgE4WCBLK5ziAD0757ixxnvSPiMpqGwt49HYtwOZpILKjaDBa7Zsh9+pw== X-Received: by 2002:a2e:9114:: with SMTP id m20mr6966308ljg.103.1567575258732; Tue, 03 Sep 2019 22:34:18 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a2e:9f16:: with SMTP id u22ls2218586ljk.1.gmail; Tue, 03 Sep 2019 22:34:17 -0700 (PDT) X-Received: by 2002:a2e:99cc:: with SMTP id l12mr9555015ljj.5.1567575257844; Tue, 03 Sep 2019 22:34:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567575257; cv=none; d=google.com; s=arc-20160816; b=BFvKe7nY5O1zc3zTCY3toOjFgRX6nxO0HJ9WEhNzhlUY+EslEqQ1L+BfCU7MQY+lQq TfIDPX5klAjjHxHhjfO4TeeGrvbJpIV86rBVwt5j1jkuHcUEdBtZ0yxAUj7/Q5bzsUqX Pauffq9T2ghxMclM40dZUzfdnl3G8u0D8KhamBhdRYMWbtjZW8ilOxD+NxdznGJBN4Lj iqE85VUDUspUD4XW78VLQtdk9DOWTZXF5kPjykuEE/mdYjR9p+vhM7vHIo7l2mfPGT2s 6X8Oj9a6md+1cyxyDWzA7/wwzNaGYjz+yf/J70T/W968CBUbOrPwyoC+X5g2eqK27dR8 bw5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cancel-lock:user-agent:mime-version:references:message-id:date :subject:from:to; bh=95PhZVybyCS11233i3PpOP/2WjBM3j9JE5eMZzTcyLA=; b=neccC9Z4yoJHXqDGJYCA4/mC5iCdU/E/niWD3wd3BtChdayak+SUedpyYBHzPZYy// xyKoNlYCoVN9RXLk9HqYkRh9l390pkkE4rJQTHdGDhn13QYGQIl1vWOEJx6j1C+A4nV/ E5eiFA4TAsdm6mYFwL9dy9k8M/CY+0ZP3cB/NyxZRLZQ/X+0cISy9V9daFBCTmrCAnDb zGD8LjXtWmU/dJKViO4LIp7/kSWQEmyExFzKz30nNFpWDlt4iYSYP6QkcSNgoLjqTUfq AWKFBuXv2rM4LsNn7Sl8GWdoujg2tKzkAh1M+Q8K8KdbIs1PKe1esbSUJaAtP2puVRxA Zw5Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com Original-Received: from blaine.gmane.org (195-159-176-226.customer.powertech.no. [195.159.176.226]) by gmr-mx.google.com with ESMTPS id h6si1032132lfc.3.2019.09.03.22.34.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Sep 2019 22:34:17 -0700 (PDT) Received-SPF: neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) client-ip=195.159.176.226; Original-Received: from list by blaine.gmane.org with local (Exim 4.89) (envelope-from ) id 1i5Nvs-000bsg-MU for pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; Wed, 04 Sep 2019 07:34:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ Cancel-Lock: sha1:y9RKbMjnhT/SAPPoUK90wmp3dkc= X-Original-Sender: gtp-pandoc-discuss@m.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 195.159.176.226 is neither permitted nor denied by best guess record for domain of gtp-pandoc-discuss@m.gmane.org) smtp.mailfrom=gtp-pandoc-discuss@m.gmane.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=163.com 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.org gmane.text.pandoc:23372 Archived-At: This issue came up from yaml, so first of all I would like to make sure: Are we going to just support spaces or all the valid yaml thing (https://yaml.org/spec/1.2/spec.html#id2770814) And from the user's point of view, I prefer the former. Because the naming is consistent, and it is easier for users to customize templates without bearing any rules in mind. John MacFarlane writes: > It's something we could think about. > > There are two possible approaches here. > > 1. Modify doctemplates (our templating engine) to allow spaces in > variables. This would mean allowing things like > > $this is a long variable name$ > > in a template. I think this kind of thing makes it less clear > where the variables are, but it shouldn't pose any problem in principle. > > 2. Modify pandoc so that, when metadata is used to populate > template variables, spaces are automatically replaced by > underscores. In this case you'd use > > $this_is_a_long_variable_name$ > > in your template. > > Comments (from anyone) are welcome. > > Frederik Hartmann writes: > >> That's really not the answer I'd have hoped to hear... >> >> Do you know if a PR fixing this might be getting accepted? >> It's really limiting when perfectly valid yaml can't be used as template >> input. >> >> Thanks a lot though.