emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Naoya Yamashita <conao3@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Add org-md-src-block for src-block formater
Date: Thu, 27 Aug 2020 14:26:54 +0900	[thread overview]
Message-ID: <CAEPcJanfnU9RnJGm5KXMYbp_7_hGUxavY-wpyS0SyV0GxAywsQ@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 710 bytes --]

Hi,
I found `ox-md` exporter drop src-block language information.
My patch fixes the behavior; to embed src-block language information
using markdown src block grammar.

1. Open some buffer
2. Tnsert below code
3. Turn on `org-mode`
4. `C-c C-e m M` (export as markdown in temp buffer)

## org source
```org
#+begin_src python
print(1 + 2)
#+end_src

#+begin_src emacs-lisp
(print "hello")
#+end_src

#+begin_src
something source code
#+end_src
```

## before
```markdown

# Table of Contents



    print(1 + 2)

    (print "hello")

    something source code

```

## after
```markdown

# Table of Contents



```python
print(1 + 2)
```

```emacs-lisp
(print "hello")
```

```
something source code
```

```

[-- Attachment #1.2: Type: text/html, Size: 1156 bytes --]

[-- Attachment #2: 0001-Add-org-md-src-block-for-src-block-formater.patch --]
[-- Type: application/x-patch, Size: 1718 bytes --]

             reply	other threads:[~2020-08-27  5:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27  5:26 Naoya Yamashita [this message]
2020-08-27  5:34 ` [PATCH] Add org-md-src-block for src-block formater Nicolas Goaziou
2020-08-27 13:21   ` Naoya Yamashita
2020-08-27 16:53 ` Berry, Charles via General discussions about Org-mode.

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=CAEPcJanfnU9RnJGm5KXMYbp_7_hGUxavY-wpyS0SyV0GxAywsQ@mail.gmail.com \
    --to=conao3@gmail.com \
    --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).