From mboxrd@z Thu Jan 1 00:00:00 1970 From: flow Subject: Re: orgmode to markdown Date: Thu, 04 Jun 2015 15:26:24 +0200 Message-ID: <1433424384.15774.108.camel@sindominio.net> References: <1433064971.9859.25.camel@sindominio.net> <87iob85rd2.fsf@nicolasgoaziou.fr> <1433237666.15774.24.camel@sindominio.net> <877frksag5.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-fY0oPbMh8OvxkC3HqdG2" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0VAI-00042I-IO for emacs-orgmode@gnu.org; Thu, 04 Jun 2015 09:26:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0VAF-0005oR-Au for emacs-orgmode@gnu.org; Thu, 04 Jun 2015 09:26:34 -0400 Received: from eternauta.sindominio.net ([80.81.122.47]:44052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0VAE-0005kY-Um for emacs-orgmode@gnu.org; Thu, 04 Jun 2015 09:26:31 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by lesnaus.sindominio.net (Postfix) with ESMTP id 316D840548C for ; Thu, 4 Jun 2015 15:26:29 +0200 (CEST) Received: from eternauta.sindominio.net ([127.0.0.1]) by localhost (lesnaus.sindominio.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RGQmuChj9GH2 for ; Thu, 4 Jun 2015 15:26:26 +0200 (CEST) Received: from lozoya (unknown [195.182.30.62]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lesnaus.sindominio.net (Postfix) with ESMTPSA id 5DCB7405475 for ; Thu, 4 Jun 2015 15:26:26 +0200 (CEST) In-Reply-To: <877frksag5.fsf@nicolasgoaziou.fr> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-fY0oPbMh8OvxkC3HqdG2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Nicolas! El jue, 04-06-2015 a las 00:18 +0200, Nicolas Goaziou escribi=C3=B3: > flow writes: >=20 > > I guessed setext support 6 levels so I don't know why ox-md supprot jus= t > > 2 levels although my exporter seems to support 3 levels. Why? >=20 > Setext style supports only 2 levels. Atx supports 6 of them, per > . I'm sorry I mixed between setext and atx :) > > That's a good question but not what I wanted to know. What I want -and > > I would like to know whay ox-md doesn't- is to export org as org-mode > > to html does: > > > > - The title becomes h1, so the org title becomes # or =3D=3D=3D, I don'= t mind > > - The * becomes h2, so the org * becomes ## or ---- > > - The ** becomes h3, so the org ** becomes ### (in case it supports 3 > > leveles) > > - etc. > > > > What do you think about it? >=20 > I think it is very opinionated and may be undesirable in the general > case. It means that every headline would be numbered 1.xxx.=20 I wasn't talking about numbering headings but creating headings :) > Also some Markdown extensions provide meta-data keywords to specify, > e.g., the title of the document. This behaviour would just get in the > way for them since headlines would get one too many level with no real > reason. >=20 > There are several workarounds: >=20 > - you can define filters to add another level to each headline and > title at the beginning of the document. >=20 > - you can use a {{{title}}} macro, e.g., >=20 > @@md:#@@ {{{title}}} >=20 > and shift other headlines >=20 > If this is common enough, we could also add a defcustom to toggle this > behaviour (yet, off by default). But is it common enough? That's a good question and also why ox.md works in this way. I probably didn't explain it properly and it is because I'm used to write #+title header in org-mode. #+title it is exported to html as h1 what is great. I think that's a common header when you write org-mode, isn't it? So I guess if orgmode to html exports title-orgmode as h1-html, I think it could be exported also to md because it alrealdy exists. The exporter then could look for both title options: 1. the org-mode header and if there is a #+title, it could be h1 and the others org-mode headings (* ** ***, etc) md headings (## ### ###).=20 2. or {{{title}} If none of them are included, it should keep the behaviour it already has. If not, it could translate it to markdown heading1 If you think this is an uncommon use of org-mode, then I should use you suggestion or make something different ;) Best! >=20 > Regards, --=20 "La tradici=C3=B3n de los oprimidos nos ense=C3=B1a que la regla es el =C2= =ABestado de excepci=C3=B3n=C2=BB en el que vivimos." Walter Benjamin, Tesis de Filosof= =C3=ADa de la historia --=-fY0oPbMh8OvxkC3HqdG2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVcFIAAAoJEHHxaMZhqplwxqcP/jVkLJSb07ia4ciOgxITixT4 8kBkldEacKBXP3ZswuBagqvCiwe8N0AGU44G8qaygZYG1UfACSG7gGTTAf3x9N3w Y5JHFJZx3I9CIZLRnfBAedguLH0dxAnORyx6qkN/IgTpzt8o0buB40J1T6ZYXHHN VnDBu4vrvDdeLhqCmrdbvSZAVQ/X0hh0mr+S32erKkagUXrz2d44R01OfUT532Ir 8ciQjZll9BfnDxPl+7P3Z0UcxQkpYAv5M97Wv4Nn7AJaWHNU7cX6b2bNI1UTz/vY mGFdQgVar+himkhnGGBNc+q3VqEgsRYLUfzw/UDXgCNAz+meMb2OG5+zhvUrSKan tfYOUMRk+Iw5OqMgqygCTKdRUFqC8znyM0l1O8njG3YDqrooSu+GdDvqm8N6H3XD xZk1e9/qd4IFObf4fC+SHp7GeQx1RgaMDXgbrzsghWPNyjXKF5xKpGQkGkb3DpJU jDSr2biWoe7m+NHB0gLM6044kgxLpkrjX+MUwfYgSLjFYobZkj39JxWnwDYNJdAR kogL6b1nh9S6p8sC881lEg59Wz5BOIAAAbaH9dE7iS/fHONgATzim2kWBUpKMgSv QsN/VpbBFq3iAvR3NwSah0wb+86GBqmvwXy28o9Ql/07she9UEkc1uXO69T1LqyZ cQOY/vhSLuZ9fG8iqLW7 =AYmb -----END PGP SIGNATURE----- --=-fY0oPbMh8OvxkC3HqdG2--