From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28339 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: Org mode AUTHOR and KEYWORDS parsing seems instinctively "wrong" Date: Thu, 13 May 2021 14:30:51 +0200 Message-ID: <87v97myfwk.fsf@zeitkraut.de> References: <57d2396b-e1e3-4096-9cd7-408f615a6839n@googlegroups.com> 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="7325"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBANY6SCAMGQEF64IG2Q-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu May 13 14:31:00 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f58.google.com ([209.85.128.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lhAUV-0001hO-NT for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 13 May 2021 14:30:59 +0200 Original-Received: by mail-wm1-f58.google.com with SMTP id n24-20020a7bcbd80000b029014287841063sf2110627wmi.3 for ; Thu, 13 May 2021 05:30:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1620909059; cv=pass; d=google.com; s=arc-20160816; b=D2AA3GHiqe9nypjjroFaFQUswu87AGf+IaplV7HebG1RnOqaHT8/PWYNt02JOxAOec MeBdEnIsDDaQW9Xw8E9CgFmjxFUKSWULhGlIOivSZrwDm+JDHSyVP57BQVQ8WiyKJxjR r9sQpJ1dxM52Xy92fl+9Qjuc7/JSgRZ9LElNuwP6zAaRQlwg67KgMx6CQNdj86i4n0u6 8JLTq+30vboCHB9fEDsuMmIWcY7IzEVNP9pZF0aEAtLs6f9XfnlkoUBK5EyDsxQz0Brk hRP239iptkWfBEVkit1mDSrK3w+ysm+ebNEuwOab5cflutDUWZUzrxYBl/zi+6hPVdNn WmSg== 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:in-reply-to:subject:to:from:references:sender:dkim-signature; bh=XucSzbRvTZUUNRB5Fn6/DKkjQ6tLqfpsYxJ0WhXjwR0=; b=wtQvsTblX67z3XhKeaAMTKtv6qnsupHVpq/40iEi0EHTh9oNiaZUp3vYQbxis2inWk q7BLDx/rNa4vLKdevixpsndrk6N+qhn1eXPhqNCWzIOh/3DgxgzjaOf42FjGuytJMZgQ bg53/JyMMSQD2Qn5YRfXIK1CU3OIO2EQRtXT6tz89RSGgUL1UWp2GI7MhaAOCPYYoO8T 3alOJcaWK6NmL2bXouiTMCMpwKtCSto/2pWweXHoH/NKLP9KeqeFKHwNdD5PXsIFACGD /YuvDj3ht3ak+757NNC9DHC28OeVzBd5qXyhwFu4kf6eprMtpd3jc8ZApic3PMJMhR5e vhLg== 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.172 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=20161025; h=sender:references:from:to:subject:in-reply-to: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=XucSzbRvTZUUNRB5Fn6/DKkjQ6tLqfpsYxJ0WhXjwR0=; b=gObHYUW9NWMTmTXPfL7DpczsdPXRa12mmGquc4tWvEkr7QqyMOKTexXDVzF07+dr+X ey/a01PfN6Ivo1IwT2LGBXoje5767zidBu5LHGXmZGBmtkKoHuAVofLl7aRZl+28Fj73 Xaibc1bPfStbjcCln0YrJptZxd4uOUHAEQXxAcg2xfspuGscDjjWjkFv93LqOvoZ+6jG 5DICP+3mK3GnQZinWa80h3a7z4+WX63sBv7g7G5+lS7cCau7l2ye/nRVBUkp4A4+IQ83 lZk0h6W7ytoxyhxIftw7CWyUo3SzkpomOI9LJESYB853+RW7q2G2cH69q8u8nXF2Is17 6eqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:references:from:to:subject:in-reply-to :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=XucSzbRvTZUUNRB5Fn6/DKkjQ6tLqfpsYxJ0WhXjwR0=; b=WyvhitgSmoZAdzcaYcRB4HBDT4ys+S+otmK4NnKfH1LvYlZ0ZqJXGXX416EuHSo8M1 9BuEo8QK99b8QiBxEv3NWaFyZXYck8D7NanSWbI6W25OG8xXxMkOB0pddEJKfIC3tElj GkpCXh0XwC0po/ocifM8HiYQGlevkaE6mOWzHYHQGB8GTwLrlu7YO7l9h35/dbQ4MtsM sdSGDohi0/KY7JLZsvRlsqY47DZrhkRNdHIgjEChBUzQtr5cUExrUci5QDjb47c1zwxz 741QCSCVF2Y/xaLo0zib04rOkfZ2pd9a6dhcaC5+LICO22fpLfwT9+6QqNWmyn5rMRap KnvA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5331OiI4+QocdfoOQfFbvtNVZRuty9TsLzSllsT0mqjYOXIq3o4g ZFgVVoKtv3+2RG6GVskLk0Y= X-Google-Smtp-Source: ABdhPJwCFN7ItBu8RpmqJxkibQNnNr2eog052QP2FwBz8XI6hXIL1nrrADKO7FbG8j33SbdRtZjbJQ== X-Received: by 2002:a5d:678d:: with SMTP id v13mr50163881wru.85.1620909059487; Thu, 13 May 2021 05:30:59 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:600c:198b:: with SMTP id t11ls4398744wmq.0.canary-gmail; Thu, 13 May 2021 05:30:57 -0700 (PDT) X-Received: by 2002:a05:600c:22d0:: with SMTP id 16mr43398089wmg.117.1620909057111; Thu, 13 May 2021 05:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620909057; cv=none; d=google.com; s=arc-20160816; b=lpfHr8w9+dNlojfeiH+5o7jpPf/8W/iFZUS9NJ+8G2sdbJOk4VF8CqdTAsS8tZXoTi OgXjYP5Tk5PV0U2b3ubFc/TBtRZZ/ooybYiN5Ki5y2/5bk0mVI3lm39B2LlML5+JpHL8 ySu38S0qHzk+dQkqeK1mbf2HusaauqdIVMHRJh4HrVBtZX+NiqrveAbYSUE0rq4lKYoc 8NCWFpaK376zi2J4nPKxuVH6UFrjbEk1XNHTCA4ayBw0qW79K9GB6WpLrbZDa0L+5tFS BYnMS1/x7RP/ix8fLu6E0a9f0GLBhWxtoZr70erh5hsFzZqa5O4TIyzswVhidn47ij9U w+Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:in-reply-to:subject:to:from:references; bh=BRNYOFH+19IGcfeYZDEEslQml08Hxx3kX1i+HLi5NsY=; b=tyJkf6+AoS1uSdWe8CsjCsjFvqFDosXOU4Pdm8m6xwxIYSBelxvYVcyDPcmbGSBTJs E5GWvFARipmmX0KrKbI+5OAtiOA6D4USKEWmaHF4TxRNr/HM0FnC9POUPiCMEg9doWUO 4xa8eUwb7hMMB4pywY3LWXnHBMEA1EUuQGBdI8sCQLlJ2y9x0RdhpzOx5jkhPb8xRZyK W+CrQ7mfIS/o+g3Vb99+jJuWTnbp4IFTn+fbz72kL3o1ndU7l8mTqlJI28eTgLqLLTzk 5PVQ1v/E8F0Mi9DBRN5I/2au2KaHEb+qGORvlJV0LuJ/ZU74292AZwfxsqZhLNzonUJm coYw== 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.172 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [80.241.56.172]) by gmr-mx.google.com with ESMTPS id o63si11643wme.3.2021.05.13.05.30.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 05:30:57 -0700 (PDT) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 80.241.56.172 as permitted sender) client-ip=80.241.56.172; Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (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-202.mailbox.org (Postfix) with ESMTPS id 4Fgrc066RRzQjmh for ; Thu, 13 May 2021 14:30:56 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Original-Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id wxQ8d0j6tQlv for ; Thu, 13 May 2021 14:30:52 +0200 (CEST) In-reply-to: <57d2396b-e1e3-4096-9cd7-408f615a6839n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Score: -6.79 / 15.00 / 15.00 X-Rspamd-Queue-Id: 535ED1867 X-Rspamd-UID: a02624 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.172 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:28339 Archived-At: We aim to stay close to the Emacs reference implementation, and the new behavior is consistent with that of Org mode exporters as of org-version 9.4. The changelog for pandoc 2.10 has this info: + The behavior of the `#+AUTHOR` and `#+KEYWORD` export settings has changed: Org now allows multiple such lines and adds a space between the contents of each line. Pandoc now always parses these settings as meta inlines; setting values are no longer treated as comma-separated lists. Note that a Lua filter can be used to restore the previous behavior. Here's a sample Lua filter to restore the old behavior (untested): --- Split a string on the given separator char. local function split_string (str, sep) local acc = pandoc.List() for substr in str:gmatch('([^' .. sep .. ']*)') do acc:insert(tostring(substr)) end return acc end function Meta (meta) meta.author = split_string(pandoc.utils.stringify(meta.author,',')) return meta end See https://pandoc.org/lua-filters.html for more details. HTH, Albert Garry Cairns writes: > tl;dr > I'd expect KEYWORDS and AUTHOR to be parsed as MetaList types. But it seems > they are individual strings/MetaInlines. Am I just misunderstanding the > intent? > > Background > I've used Slick as a static site generator for a little while > (https://ilikewhenitworks.gitlab.io/). I don't post very often, and when I > tried to write a post recently a rebuild of the code showed it no longer > worked. I should be able to fix my personal issue by downgrading versions, > but the root of the problem seems generally applicable. Given an org-mode > file with headers: > > #+TITLE: Org Mode in Hakyll > #+AUTHOR: Garry Cairns, Someone Else > #+DATE: 2019-03-17 > #+KEYWORDS: emacs, haskell > #+STARTUP: showall > > I'd expect KEYWORDS and AUTHOR to be parsed as MetaList types. But it seems > they are individual strings both from how my static site builder now fails > with an expected Array got String error, and from the following output: > > [nix-shell:~/code/ILikeWhenItWorks]$ pandoc -s -t native > posts/2019-03-17-org-test.org > Pandoc (Meta {unMeta = fromList [("author",MetaInlines [Str > "Garry",Space,Str "Cairns,",Space,Str "Someone",Space,Str > "Else"]),("date",MetaInlines [Str "2019-03-17"]),("keywords",MetaInlines > [Str "emacs,",Space,Str "haskell"]),("title",MetaInlines [Str > "Org",Space,Str "Mode",Space,Str "in",Space,Str "Hakyll"])]}) > > This is with > > [nix-shell:~/code/ILikeWhenItWorks]$ pandoc --version > pandoc 2.10.1 > Compiled with pandoc-types 1.21, texmath 0.12.0.2, skylighting 0.8.5 > > Am I misunderstanding here? -- Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124