From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23014 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: feature proposal: pretty printing of Native format Date: Sun, 23 Jun 2019 12:21:45 +0200 Message-ID: References: <6c1c4146-20b8-437a-878a-24c4ac915946@googlegroups.com> 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: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134823"; mail-complaints-to="usenet@blaine.gmane.org" To: Laurent =?utf-8?Q?Ren=C3=A9?= de Cotret , pandoc-discuss Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBSFFXXUAKGQEXK6DX5Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jun 23 12:22:04 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f185.google.com ([209.85.167.185]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hezdK-000YrJ-JX for gtp-pandoc-discuss@m.gmane.org; Sun, 23 Jun 2019 12:22:02 +0200 Original-Received: by mail-oi1-f185.google.com with SMTP id f19sf4184020oib.4 for ; Sun, 23 Jun 2019 03:22:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1561285320; cv=pass; d=google.com; s=arc-20160816; b=Eit/gMdLo6RKuYWakghuPcpfUXBVUPWnv30bz+RlxkY6FgYAAkEy59g+kyVlDcbhHN bchQErBQBji4ewri37Pj6Qn6xWWu7tyy3Hi6sQsc0fhd5LtipN93vLhEDejmjXTrA/hz Ju/xcGBsOG0Tlsaz5TGDO1xe3F5Nn5NqWC/ZRsmmX3W6wGB3ftSuQJY7dIJa7F/zLMVd lJTLTVqHNMbonXBnuxVWKpnm7Fn4kXKE2MEiOrg3IGAFTB73qX8LABKM0VsFmeq5LC+g k0xlR2xrvTpVWAa5soQyfsWf+jdr8KOhNst6LCkWJqD0yL7Z63RzonYzluGh12/EW8Vd DDhw== 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:date:references:in-reply-to:subject:to:from :sender:dkim-signature; bh=SLimbAvsmphD+tPYxniKeWlT9HazZGuzZFtexXoOZnM=; b=vb/o9oUc5ly7qqPnVlRK7BXrxAmp4DVU02q7yI7g2+Fq6aIoFRziSwVSptU/7h9oiG 61Dq47qBOlY3ftWmMgIIR3Uzh4AKvPcdgyBURxa7fmEBfdQgASydHeJtDkQZZAJeaAbZ UxMbka7+u0kcie6oi/cPKiwzvtq9CyB6ZB6E1J2MQR9VGMmAP2Lbggvk/5W13Eja/2eO R+jDkyoJOkDu3EN7R3WEwBCSnfMgoSDajozI4fFzlZmJF/7eebqt/HZ300N+RZTCR35t ZzE7NHgZJPXprU16iX2j0rCOcwX60WLXOtRb+eepyvrdGGqD4ERbgirYpJ1EZQs/AUL0 3Qeg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=VmBcQvWx; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e 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:content-transfer-encoding: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=SLimbAvsmphD+tPYxniKeWlT9HazZGuzZFtexXoOZnM=; b=bk7dOdLkjMCAZmuxjglaPVzaBnP++yFtyL9jM8gAEPQAXA4V0vJjqcZXvxDTUXdJrP oM0g3XcXDDETzlp5iESFgp/dSwSmF70hZOaSNSpYmfOjQ7gXxeg+MdrkQfBhJoRHfJ9m o5JV48T5rMQzP8r4Dg7YDurHUWCgDzYoCGH9A43We6NW4m6cywMQwyMbjR4ENgUlCvoZ N1x4xB3LnA/lt1BDN+yS+0Sj4SNsgFs1rLvJqYnSwBcsiO7idxurz0Cy0KtT9FTrOG3/ WkDGPGo5qCRNPEGgeqovifPOlk+GjmvQ0uFA+rZmfukTS4FDw1BDXU+gKE2/UMMOUoxY BVzA== 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:content-transfer-encoding :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=SLimbAvsmphD+tPYxniKeWlT9HazZGuzZFtexXoOZnM=; b=q6LNS/3wIOyX3eCTgXqhGLkPghzUhud8tjiD42ODZ2roCMZQusRsU9xeQmPOMXVnMJ BJefu33n6nJKwbJ0tQoSCdT/ATcDzTlTbKidz3t4xIKNHQcKxq1rXBqPm5VFwcSU4M2W /BZGb5SLw8iMpaD3t0paRzxyGGExPJQNusojPk5rq+mxQhkNLvGI1SqBVYouGAXaMK9a ya6/0lueeFxpgK5aaPgLOQYE7K8VUCjjZPxgutEngsIJ2ZyHgn5KqMyvDj0yv3BuVwTm /jMR2i/MbHyOGci5YVO5EMmsGs3nbDW2LeuasjieFkhox7bRMUGzt7M1qauhYS7oIwsN Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAWIfMuYVrDD9n+/dTFuUROqocU/Cs+2C6y4G7Ow+7BoNUaSDm2f wl5CfZRY/BQ2A5CrwmVCIg8= X-Google-Smtp-Source: APXvYqx9VTpptVgz2GlpfKN9ZYkPI87IYdIHG1HhAZSbEqQnohJGm8+jb02NkqsGv0qCqogK58xbKA== X-Received: by 2002:a05:6808:d9:: with SMTP id t25mr7674310oic.26.1561285320606; Sun, 23 Jun 2019 03:22:00 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:6c1a:: with SMTP id f26ls537071otq.4.gmail; Sun, 23 Jun 2019 03:21:59 -0700 (PDT) X-Received: by 2002:a9d:3f66:: with SMTP id m93mr6449852otc.131.1561285319426; Sun, 23 Jun 2019 03:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561285319; cv=none; d=google.com; s=arc-20160816; b=yPmpzM9kd9PSlVCvmBRYYKEt9IA6NwGUQx2d8Q77n6TUpKF7U++AfzjtWiFC8qyG0j 9xZO89CC+pcizP56rga1Ye7TLw4ZY9UvOcF0oX1ffZLWmi3am2DXUILlC9EiwWW0yV+m wK80gHN9cIsKSEB/Z7tn/CSav2b+jvKBdHD01WUPh/65EtaOjB+CDv61yivZuWE2L29s y0dj4Y02M7kv+pML8xUYRFpAtix1vBtM4JjDirq+nmSc5Hb2EHdbfblCqov0Nqe4v4k9 aOVfZaWsgrmfqxs0ZViZySCLLCjAtKetSc6xeHicxmjGBx4zRLYcH+5xM5BE8PYi9MRz Tp0A== 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:date:references :in-reply-to:subject:to:from:dkim-signature; bh=lCTFAYR6lKy7vrXv+06Ms0CC8Iiw/uFIbhykYawnRMM=; b=cRz/79fOXz9qtuGbRE7Esg1CS8kVUgCO3kzWrYfx6EXBQDyBKLx5MLuZ7TjP5xNgxb dVC99xmdlYY/LLRAq7xVXCAcisS5rM9xHCyzVS10Lw+Dr1L25YN0VlYvhwMyfWLUxItu IQJUTvn0D+ETjLzblcIB2FUnn/AEgTvJBjJV8Ulhu2Gw0RdpCX22DJfDFvhtFUUo02FF iTjFFLAd5v4ldBifkNjW7jd4PT69wRz8Hg2JuC+8vqEFC8YrZ0t4EBPw5+mAwiRFXcv0 oojZkVWZaDbyN42KgY96UUxhmljIBskcJHI5H5tTcDTyMcb2G3Q6zeRdSrB5SJdU6Qtf dvpA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.s=20150623 header.b=VmBcQvWx; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com. [2607:f8b0:4864:20::62e]) by gmr-mx.google.com with ESMTPS id 188si540182oif.0.2019.06.23.03.21.59 for (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jun 2019 03:21:59 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e as permitted sender) client-ip=2607:f8b0:4864:20::62e; Original-Received: by mail-pl1-x62e.google.com with SMTP id m7so5202588pls.8 for ; Sun, 23 Jun 2019 03:21:59 -0700 (PDT) X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr63623854plb.103.1561285318902; Sun, 23 Jun 2019 03:21:58 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id x23sm9633623pfo.112.2019.06.23.03.21.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 23 Jun 2019 03:21:58 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id 43C1CA231; Sun, 23 Jun 2019 06:21:47 -0400 (EDT) In-Reply-To: <6c1c4146-20b8-437a-878a-24c4ac915946-/JYPxA39Uh5TLH3MbocFFw@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.20150623.gappssmtp.com header.s=20150623 header.b=VmBcQvWx; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:4864:20::62e 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.org gmane.text.pandoc:23014 Archived-At: Actually Text.Pandoc.Writers.Native does do some prettification; it doesn't just do "show." You can see this if you print something with nested block structure, like lists or blockquotes. If there are ways you think this should be improved, feel free to make suggestions or do a PR. Laurent Ren=C3=A9 de Cotret writes: > Hello, > > I often work on Pandoc filters, and I regularly look at Pandoc's native= =20 > format. > > Here is an example of the output in my terminal: >> pandoc -i myfile.md --to native > [Para [Image ("fig:myfigure",[],[]) [Str "Figure",Space,Str "1:",Space,St= r=20 > "This",Space,Str "is",Space,Str "a",Space,Str "caption"]=20 > ("generated/other\\8842295943125512100.jpg","fig:")] > ,Para [Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,Str= =20 > "in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,Str=20 > "is",Space,Str "compatible",Space,Str "with",Space,Str "the",Space,Str=20 > "ouput",Space,Str "of",Space,Str "pandoc-pyplot."]] > > It would be very useful to get a pretty-printing version of the above, e.= g.: > > [ > Para [ > Image=20 > ("fig:myfigure",[],[])=20 > [Str "Figure",Space,Str "1:",Space,Str "This",Space,Str=20 > "is",Space,Str "a",Space,Str "caption"]=20 > ("generated/other\\8842295943125512100.jpg","fig:") > ], > Para [ > Str "As",Space,Str "you",Space,Str "can",Space,Str "see",Space,St= r=20 > "in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space, > Str "is",Space,Str "compatible",Space,Str "with",Space,Str=20 > "the",Space,Str "ouput",Space,Str "of",Space, Str "pandoc-pyplot." > ] > ] > > After a cursory look at the source in Text.Pandoc.Writers.Native, it woul= d=20 > be possible to make a nice, indented, pretty version of native Haskell,= =20 > given that WriterOptions type has the writerColumns attribute. > > Is this something that the Pandoc community might be interested in? Shoul= d=20 > it be a different format than "native", called "pretty-native" or somethi= ng? > > I'm happy to put together a pull request. > > Laurent > > --=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= email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/6c1c4146-20b8-437a-878a-24c4ac915946%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. --=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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/m2tvcgr492.fsf%40macbook-air-3.home. For more options, visit https://groups.google.com/d/optout.