From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: RFC: Proposal for an Org Special Block for ox-html Date: Fri, 25 May 2018 11:09:10 -0400 Message-ID: References: <87o9h56jdl.fsf@gmail.com> <87lgc87vf1.fsf@gmail.com> <87in7c7tye.fsf@gmail.com> <87d0xj7r79.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000354e2f056d092786" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMELO-0006US-Op for emacs-orgmode@gnu.org; Fri, 25 May 2018 11:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMELN-0006CW-De for emacs-orgmode@gnu.org; Fri, 25 May 2018 11:09:26 -0400 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:40833) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMELN-0006Av-37 for emacs-orgmode@gnu.org; Fri, 25 May 2018 11:09:25 -0400 Received: by mail-wm0-x22d.google.com with SMTP id x2-v6so8128438wmh.5 for ; Fri, 25 May 2018 08:09:24 -0700 (PDT) In-Reply-To: <87d0xj7r79.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-org list --000000000000354e2f056d092786 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Aaron, On Fri, May 25, 2018 at 10:19 AM Aaron Ecay > I=CA=BCm not sure I made myself clear in the previous message. In any ca= se, > this org: > > =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82 #+attr_html: :open t > =E2=94=82 #+begin_details > =E2=94=82 #+begin_summary > =E2=94=82 Open for details > =E2=94=82 > =E2=94=82 More summary. > =E2=94=82 #+end_summary > =E2=94=82 Many details here. > =E2=94=82 #+end_details > =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > > exports to this HTML (using current-ish master with no additional > modifications beyond the tweak to org-html-html5-elements): > > =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > =E2=94=82
> =E2=94=82 > ..=E2=94=82
> =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80 > No, sorry, you were clear. I just wanted to have the exported HTML to be clean, i.e. not have that '=3D"t"' portion. That said, I agree that it is just easier to just do that in ox-html. > which displays in the open state in a browser (in any event, in Chromium > 66). So I think what you want already exists for this feature. > Thanks for checking that. What is wrong with: > > #+attr_html: :style color:red; > - red list 1 > - red list 2 > > ? > Nothing :) My implementation though needs those divs as I want to assign classes and styles to Markdown blobs. > That works in vanilla org today (exporting to html), without needing to > generate extra =E2=80=9Cstyle=E2=80=9D and =E2=80=9Cdiv=E2=80=9D elements= . > Agree. I looked at the file briefly. I had trouble determining what might > represent missing features in ox-{html,md}, and what was included to > work around quirks in a particular implementation of markdown. > Your assessment is correct.. ox-blackfriday is mainly to make things Just Work with the Go Blackfriday markdown parser.. and thus all that lives in that separate library. In addition, it adds the missing pieces that raw HTML provides like assigning styling to various blocks, etc. > I don=CA=BCt understand why you are bothering with markdown at all > in your usecase. If it was me, I would just generate HTML from org and > skip the markdown step entirely. > I gave a lot of thought whether I should export to HTML or Markdown. In the end, I am a fan of committing stuff that is readable. So it boiled down to my personal preference. I prefer to commit Markdown instead of HTML. It's very easy to track the corresponding changes from Org to Markdown, than rather from Org to HTML. Also, the ox-hugo exported Markdown is easy for collaborating documentation with other folks (e.g. I contributed to official Hugo documentation using ox-hugo exported Mardown.. I get to write the doc in Org, and they get the Markdown doc source.. everyone is happy). But then I also wanted to mask all the shortcoming of Markdown. So ox-hugo helps bridge that gap by filling in HTML snippets only where needed. I hope that makes sense. It seems to me like you could get rid of ox-blackfriday, leaving behind > only a small ox-html-plus-plus containing whatever QOL improvements to > the vanilla html backend suited your taste (and that of ox-hugo=CA=BCs us= ers). > That's a possibility. But as I said above, there isn't a strong reason to have Hugo blog post source in HTML. If the set of QOL improvements is empty, then the custom backend would > disappear entirely. Less code for the same features =3D maintenance win = in > my book. YMMV of course... > Thanks. --=20 Kaushal Modi --000000000000354e2f056d092786 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aaron,

On Fri, May 25, 2018 at 10:19 AM Aaron Ecay <aaronecay@gmail.com>
I=CA=BCm not sure I made myself clear in the previous message.=C2=A0 In any= case,
this org:

=E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80
=E2=94=82 #+attr_html: :open t
=E2=94=82 #+begin_details
=E2=94=82 #+begin_summary
=E2=94=82 Open for details
=E2=94=82
=E2=94=82 More summary.
=E2=94=82 #+end_summary
=E2=94=82 Many details here.
=E2=94=82 #+end_details
=E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80

exports to this HTML (using current-ish master with no additional
modifications beyond the tweak to org-html-html5-elements):

=E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80
=E2=94=82 <details open=3D"t">
=E2=94=82 <summary>
..=E2=94=82 </details>
=E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80

No, sorry, you were clear. I just wanted to have the exported HTML t= o be clean, i.e. not have that '=3D"t"' portion. That sai= d, I agree that it is just easier to just do that in ox-html.
=C2=A0
which displays in the open state in a browser (in any event, in Chromium 66).=C2=A0 So I think what you want already exists for this feature.

Thanks for checking that.


What is wrong with:

#+attr_html: :style color:red;
- red list 1
- red list 2

?

Nothing :) My implementation though n= eeds those divs as I want to assign classes and styles to Markdown blobs.
=C2=A0
That works in vanilla org today (exporting to html), without needing to
generate extra =E2=80=9Cstyle=E2=80=9D and =E2=80=9Cdiv=E2=80=9D elements.<= br>

Agree.


I looked at the file briefly.=C2=A0 I had trouble determining what might represent missing features in ox-{html,md}, and what was included to
work around quirks in a particular implementation of markdown.

Your assessment is correct.. ox-blackfriday is main= ly to make things Just Work with the Go Blackfriday markdown parser.. and t= hus all that lives in that separate library. In addition, it adds the missi= ng pieces that raw HTML provides like assigning styling to various blocks, = etc.
=C2=A0
I don=CA=BCt understand why you are bothering with markdown at all
in your usecase.=C2=A0 If it was me, I would just generate HTML from org an= d skip the markdown step entirely.

I ga= ve a lot of thought whether I should export to HTML or Markdown. In the end= , I am a fan of committing stuff that is readable. So it boiled down to my = personal preference. I prefer to commit Markdown instead of HTML. It's = very easy to track the corresponding changes from Org to Markdown, than rat= her from Org to HTML.

Also, the ox-hugo expor= ted Markdown is easy for collaborating documentation with other folks (e.g.= I contributed to official Hugo documentation using ox-hugo exported Mardow= n.. I get to write the doc in Org, and they get the Markdown doc source.. e= veryone is happy).

But then I also wanted to mask = all the shortcoming of Markdown. So ox-hugo helps bridge that gap by fillin= g in HTML snippets only where needed. I hope that makes sense.

It seems to me like you could get rid of ox-blackfriday, leaving behind
only a small ox-html-plus-plus containing whatever QOL improvements to
the vanilla html backend suited your taste (and that of ox-hugo=CA=BCs user= s).

That's a possibility. But as I = said above, there isn't a strong reason to have Hugo blog post source i= n HTML.

If the set of QOL improvements is empty, then the custom backend would disa= ppear entirely.=C2=A0 Less code for the same features =3D maintenance win i= n my book.=C2=A0 YMMV of course...

Than= ks.
--

Kaushal Modi

--000000000000354e2f056d092786--