From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/23025 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Laurent_Ren=C3=A9_de_Cotret?= Newsgroups: gmane.text.pandoc Subject: Re: feature proposal: pretty printing of Native format Date: Sun, 23 Jun 2019 14:10:07 -0700 (PDT) Message-ID: <25fbb536-424e-4032-a786-743dd075e80f@googlegroups.com> References: <6c1c4146-20b8-437a-878a-24c4ac915946@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1370_273668172.1561324207245" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="125240"; mail-complaints-to="usenet@blaine.gmane.org" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCS6HBMTVQCRBMGVX7UAKGQEACW2YQA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Sun Jun 23 23:10:17 2019 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi1-f192.google.com ([209.85.167.192]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hf9kd-000WNi-3V for gtp-pandoc-discuss@m.gmane.org; Sun, 23 Jun 2019 23:10:15 +0200 Original-Received: by mail-oi1-f192.google.com with SMTP id b124sf4547813oii.11 for ; Sun, 23 Jun 2019 14:10:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=HcEueDhHQL65elaGz3kz+Mq2auQJNDy3s4r4sAK/LqI=; b=lms2Q8EfD5OsRXH1BDF4l4sBNlc9Hirg5e38XXzX8ZDm8JFFZJ0Lb4VTfxDIwuV8WV VLXBOxZRc4YDpYR8uDhk55NIkO2ZW1bpFBo027mRf1WC827lCcAcTHczkpGJVa9fqXzN OJnDLsvkpFGhHK93GYay5UD/1467kLUjLiCvNbzNAZOF5xl1QrKng+UzRBeFMqMuNEI4 3ad+tD/xxQm7naZGZH3xZlFLMWTdceNcROg5D06O6Z68fzKAylkNAmZpCsQwBRnf9SuD ysgeHXVwQ9Z40oi/REiZf5Asbr1WLmW8QgStzi4tAghjcIMrRqXR2nWAM7qJszVsMslw LWTg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=HcEueDhHQL65elaGz3kz+Mq2auQJNDy3s4r4sAK/LqI=; b=IJV0ET0kA3d9Ew6r142vUAEzBc1P6aKTXRL8apR/hy2PViQKio9jCE2ZaDrD/gAaQy VM5UusYKhRRwCbUad4X4SFfzczKEwDG14lfgRj7iaotAgkpwhzJoz7PPq83qoNP5GhXn oE9fGizIJ408sfNos5Hkt1mhbnogIWL4orUmjA3WVUXdEU3sipnFvsnuvyNLIiV9I5LP iHZoSo6fSrtAz02YbFFph81kEGEsvsGwHSaQUaaNpcUMoOlijtdz2itET+KMm1XGfraZ k4KkwkmtuY3Mu7v6y60dFGqd33exorbBdbW4F9Z8QQERyBtzDQhDiuJCzQsj/ilubCkN GPpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=HcEueDhHQL65elaGz3kz+Mq2auQJNDy3s4r4sAK/LqI=; b=EL9nImOtwn713m+OlM9Xk+QTrSOYS4rex/Ubhp0D+OaG7J1IAeMsAYDV8M6zSVZPfb IfSWF42ZKAw1c4h3ySFdicoyKo+EnPsoygi1bI0qqG8NQlk4vLSs4ON0kYWiA4cVbp5S 1XpSNcXRkCF41iCgAu0N3u87B+CVOLelKMSsc4a8gctIirSMhPuyQ165L1jsidp+pQMr TKkI5c/C0ZvBqighyLx0jQWpSw6j0gHNCQVA7vb/JNIL7OCwkb0L7znVHJw+mV9TN0Qm kFdwu94eSYoU49mOkkvaWMncRlJ9G+jIoNDXB4NzowuHpYBmq49GZPLslQ3kigGmjRqd EHRw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: APjAAAVqApvGqbt8ZzrV8BJ2JQxF2qfKkvYHcY/nXLsNqYnB733bGwL1 /iXvwNupcn/mMNpfFpT5oIE= X-Google-Smtp-Source: APXvYqwNx5qlFGrRXmfCzKXMTisK7uJa6xxiiudFLy0mNszZVKDs0WXlSgu2E/b/sjS5twj2I+29bQ== X-Received: by 2002:a05:6830:10d3:: with SMTP id z19mr17377545oto.196.1561324208741; Sun, 23 Jun 2019 14:10:08 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:60d7:: with SMTP id b23ls681173otk.14.gmail; Sun, 23 Jun 2019 14:10:08 -0700 (PDT) X-Received: by 2002:a9d:6e8a:: with SMTP id a10mr7670727otr.295.1561324207794; Sun, 23 Jun 2019 14:10:07 -0700 (PDT) In-Reply-To: X-Original-Sender: laurent.decotret-Re5JQEeQqe8AvxtiuMwx3w@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:23025 Archived-At: ------=_Part_1370_273668172.1561324207245 Content-Type: multipart/alternative; boundary="----=_Part_1371_227048627.1561324207246" ------=_Part_1371_227048627.1561324207246 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes I see that Text.Pandoc.Writers.Native is more than what I thought.=20 Piping to a file looks better than the Windows terminal. Pretty-printing=20 works better there. Additionally, Hans' suggestion above is fine for now. Regards, Laurent On Sunday, June 23, 2019 at 6:22:02 AM UTC-4, John MacFarlane wrote: > > > Actually Text.Pandoc.Writers.Native does do some=20 > prettification; it doesn't just do "show." You can=20 > see this if you print something with nested block=20 > structure, like lists or blockquotes.=20 > > If there are ways you think this should be improved,=20 > feel free to make suggestions or do a PR.=20 > > Laurent Ren=C3=A9 de Cotret >=20 > writes:=20 > > > Hello,=20 > >=20 > > I often work on Pandoc filters, and I regularly look at Pandoc's native= =20 > > format.=20 > >=20 > > Here is an example of the output in my terminal:=20 > >> pandoc -i myfile.md --to native=20 > > [Para [Image ("fig:myfigure",[],[]) [Str "Figure",Space,Str=20 > "1:",Space,Str=20 > > "This",Space,Str "is",Space,Str "a",Space,Str "caption"]=20 > > ("generated/other\\8842295943125512100.jpg","fig:")]=20 > > ,Para [Str "As",Space,Str "you",Space,Str "can",Space,Str=20 > "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."]]=20 > >=20 > > It would be very useful to get a pretty-printing version of the above,= =20 > e.g.:=20 > >=20 > > [=20 > > Para [=20 > > 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:")=20 > > ],=20 > > Para [=20 > > Str "As",Space,Str "you",Space,Str "can",Space,Str=20 > "see",Space,Str=20 > > "in",Space,Str "fig.\160\&1,",Space,Str "pandoc-crossref",Space,=20 > > Str "is",Space,Str "compatible",Space,Str "with",Space,Str=20 > > "the",Space,Str "ouput",Space,Str "of",Space, Str "pandoc-pyplot."=20 > > ]=20 > > ]=20 > >=20 > > After a cursory look at the source in Text.Pandoc.Writers.Native, it=20 > would=20 > > be possible to make a nice, indented, pretty version of native Haskell,= =20 > > given that WriterOptions type has the writerColumns attribute.=20 > >=20 > > Is this something that the Pandoc community might be interested in?=20 > Should=20 > > it be a different format than "native", called "pretty-native" or=20 > something?=20 > >=20 > > I'm happy to put together a pull request.=20 > >=20 > > Laurent=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google=20 > Groups "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send= =20 > an email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org .=20 > > To post to this group, send email to pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org=20 > .=20 > > To view this discussion on the web visit=20 > https://groups.google.com/d/msgid/pandoc-discuss/6c1c4146-20b8-437a-878a-= 24c4ac915946%40googlegroups.com.=20 > > > For more options, visit https://groups.google.com/d/optout.=20 > --=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/25fbb536-424e-4032-a786-743dd075e80f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_1371_227048627.1561324207246 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Yes I see that Text.Pandoc.Writers.Native is more than wha= t I thought.=C2=A0

Piping to a file looks better than th= e Windows terminal. Pretty-printing works better there. Additionally, Hans&= #39; suggestion above is fine for now.

Regards,Laurent

On Sunday, June 23, 2019 at 6:22:02 AM UTC-4, John MacFarla= ne wrote:

Actually Text.Pandoc.Writers.Native does do some
prettification; it doesn't just do "show." =C2=A0You 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 <laurent...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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&qu= ot;,Space,Str "1:",Space,Str=20
> "This",Space,Str "is",Space,Str "a",= Space,Str "caption"]=20
> ("generated/other\\8842295943125512100.jpg","f= ig:")]
> ,Para [Str "As",Space,Str "you",Space,Str &quo= t;can",Space,Str "see",Space,Str=20
> "in",Space,Str "fig.\160\&1,",Space,Str &q= uot;pandoc-crossref",Space,Str=20
> "is",Space,Str "compatible",Space,Str "wi= th",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 ab= ove, e.g.:
>
> [
> =C2=A0 =C2=A0 Para [
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Image=20
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("fig:myfigure"= ;,[],[])=20
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [Str "Figure",= Space,Str "1:",Space,Str "This",Space,Str=20
> "is",Space,Str "a",Space,Str "caption&quo= t;]=20
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ("generated/other\\= 8842295943125512100.jpg","fig:")
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0],
> =C2=A0 =C2=A0 Para [
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Str "As",Space,Str "you= ",Space,Str "can",Space,Str "see",Space,Str=20
> "in",Space,Str "fig.\160\&1,",Space,Str &q= uot;pandoc-crossref",Space,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 Str "is",Space,Str "com= patible",Space,Str "with",Space,Str=20
> "the",Space,Str "ouput",Space,Str "of&quo= t;,Space, Str "pandoc-pyplot."
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0]
> ]
>
> After a cursory look at the source in Text.Pandoc.Writers.Native, = it would=20
> be possible to make a nice, indented, pretty version of native Has= kell,=20
> given that WriterOptions type has the writerColumns attribute.
>
> Is this something that the Pandoc community might be interested in= ? Should=20
> it be a different format than "native", called "pre= tty-native" or something?
>
> 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-...@googlegroups.com.
> To post to this group, send email to pandoc-...@googlegroups.com.
> To view this discussion on the web visit
https://groups.= google.com/d/msgid/pandoc-discuss/6c1c4146-20b8-437a-878a-24c4ac9= 15946%40googlegroups.com.
> For more options, visit https://groups.go= ogle.com/d/optout.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/25fbb536-424e-4032-a786-743dd075e80f%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_1371_227048627.1561324207246-- ------=_Part_1370_273668172.1561324207245--