From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AItsOkNER1+yCwAA0tVLHw (envelope-from ) for ; Thu, 27 Aug 2020 05:27:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kGRINkNER189CQAAbx9fmQ (envelope-from ) for ; Thu, 27 Aug 2020 05:27:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 695A294005D for ; Thu, 27 Aug 2020 05:27:31 +0000 (UTC) Received: from localhost ([::1]:58902 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBARd-0003hm-LV for larch@yhetil.org; Thu, 27 Aug 2020 01:27:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBARJ-0003fx-3D for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 01:27:09 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:32882) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBARH-0008KW-JV for emacs-orgmode@gnu.org; Thu, 27 Aug 2020 01:27:08 -0400 Received: by mail-pf1-x429.google.com with SMTP id u20so2605985pfn.0 for ; Wed, 26 Aug 2020 22:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SVyA4Ecr0ypIr/jJHG8ruwabbgK8w1jNPq2gXxIHFA4=; b=TPpA3RI1KyP1vuTmNFDAhfNECQHB4PqmJOTWyLLVPgGuOHuCU0LoLY3ZuGHXvt21JM +KLVJGIumzdO8p0I5DfKDkg0JlOxdV9otGJN9en8wKEZUPoXGaTU/B1UW5zaq96NTdHu zHDW57nRd3GI9DoOVK93cIF8fL2eSAYrz5+R4qAdqFM/ylSckl+DF5JCDD7BzDPMHoVQ Xb1K/e2pomi92RqjtDI+70xjIgRcSz55eSqtEBCiAh7WclI9SlPIqsJMPbtxpDY2YlMe eo9CnkMBQkx3rICEzzZbORu+JPY0n97E3MCijpMlQ13oDZXtRWxccW6nvCMqSaS75BuR 0EOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=SVyA4Ecr0ypIr/jJHG8ruwabbgK8w1jNPq2gXxIHFA4=; b=f5XYiDDcEPlnBIhluQP223b4tSMzE+7QkNbbI9L5xgjGftO2ZFtnXphCuElxmWYfBH 2OWWqkCdVYSFzfYrZ1FQlqJSkqTXc0EI4CW8iGsclLqsWKVH7FylmlaBTCt8h+OY/dMl RznHkziI6fg35+W0BbvKr2I2A/AWC5+nC60+3B7uDYssEFhRCa27pi2T53y3hPqTuU2F Izb7xXwiqmzGNBmQUrf/TfHhW4aSTvWd4xx6nExBZNBWxwXzrhRO6r2Q5t3YXct9dI3E mjxejwEKPKLJubm7UEtGRI+TBX3yy/iXxMYeZcMwhWpTQ3MN1QVr1hxwgrKQd42YroEA Vpvw== X-Gm-Message-State: AOAM533mihuqenMkSw3Wyyj4SQQ+Y16m0LodRMryoNsrVD99qCrHInhd +EAHJPP3U+mgrwrM0Em47qrAmEmz09F6JW7tal/cW8NDP/B0Fw== X-Google-Smtp-Source: ABdhPJw2EawP3sYiGzKjxvlGNTabUgLz7dQi26kmTVQOkXeLgGrFezhMWKrMiko8+rZBtk/N9gNACA27hwsawomO8KM= X-Received: by 2002:a65:6545:: with SMTP id a5mr13601196pgw.43.1598506025823; Wed, 26 Aug 2020 22:27:05 -0700 (PDT) MIME-Version: 1.0 From: Naoya Yamashita Date: Thu, 27 Aug 2020 14:26:54 +0900 Message-ID: Subject: [PATCH] Add org-md-src-block for src-block formater To: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000d7819c05add52f21" Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=conao3@gmail.com; helo=mail-pf1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (body hash did not verify) header.d=gmail.com header.s=20161025 header.b=TPpA3RI1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: aaRcxL2s/wJX --000000000000d7819c05add52f21 Content-Type: multipart/alternative; boundary="000000000000d7819a05add52f1f" --000000000000d7819a05add52f1f Content-Type: text/plain; charset="UTF-8" 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 ``` ``` --000000000000d7819a05add52f1f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
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
```or= g
#+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


=C2=A0 =C2=A0 print(1 + 2)

=C2=A0 =C2=A0 (print "hello= ")

=C2=A0 =C2=A0 something source code

```
## after
```markdown

# Table= of Contents



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

```emac= s-lisp
(print "hello")
```

```
something source c= ode
```

```
--000000000000d7819a05add52f1f-- --000000000000d7819c05add52f21 Content-Type: application/x-patch; name="0001-Add-org-md-src-block-for-src-block-formater.patch" Content-Disposition: attachment; filename="0001-Add-org-md-src-block-for-src-block-formater.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kecc9yd30 RnJvbSAwZmZhMWY4ZjZkZWRlMjZiN2YxZThjZTRhZmMxZmJjZDJmNDU3NTViIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBjb25hbzMgPGNvbmFvM0BnbWFpbC5jb20+CkRhdGU6IFRodSwg MjcgQXVnIDIwMjAgMTM6NTI6NTAgKz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