emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: flow <adolflow@sindominio.net>
To: emacs-orgmode@gnu.org
Subject: Re: orgmode to markdown
Date: Thu, 04 Jun 2015 15:26:24 +0200	[thread overview]
Message-ID: <1433424384.15774.108.camel@sindominio.net> (raw)
In-Reply-To: <877frksag5.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]

Hi Nicolas!

El jue, 04-06-2015 a las 00:18 +0200, Nicolas Goaziou escribió:
> flow <adolflow@sindominio.net> writes:
> 
> > I guessed setext support 6 levels so I don't know why ox-md supprot just
> > 2 levels although my exporter seems to support 3 levels. Why?
> 
> Setext style supports only 2 levels. Atx supports 6 of them, per
> <http://daringfireball.net/projects/markdown/syntax#header>.

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 ===, 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?
> 
> I think it is very opinionated and may be undesirable in the general
> case. It means that every headline would be numbered 1.xxx. 

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.
> 
> There are several workarounds:
> 
>   - you can define filters to add another level to each headline and
>     title at the beginning of the document.
> 
>   - you can use a {{{title}}} macro, e.g.,
> 
>       @@md:#@@ {{{title}}}
> 
>     and shift other headlines
> 
> 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 (## ### ###). 
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!

> 
> Regards,

-- 
"La tradición de los oprimidos nos enseña que la regla es el «estado de
excepción» en el que vivimos." Walter Benjamin, Tesis de Filosofía de la
historia


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2015-06-04 13:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-31  9:36 orgmode to markdown flow
2015-05-31 22:12 ` Nicolas Goaziou
2015-06-02  9:34   ` flow
2015-06-03 22:18     ` Nicolas Goaziou
2015-06-04  9:54       ` Rasmus
2015-06-04 13:26       ` flow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433424384.15774.108.camel@sindominio.net \
    --to=adolflow@sindominio.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).