After writing an .org file in orgmode, I anticipated the export by C-c C-e m m would fence snippets of code including a keyword to label the language the snippets are about. As an example of the pattern imagined
``` python
for i in range(5):
print(i)
```
The manual describes C-c C-s C as a chord within markdown mode to «insert[s] a GFM style backquote fenced code block.» which in this form is not compatible within orgmode.
Actual Behavior
Running Emacs orgmode, the export by C-c C-e m m only yields
for i in range(5):
print(i)
without fencing back ticks prior / after, and without a label about the language in question. So far, I obtained the pattern wanted with pandoc, e.g. by
Is there an option to permit export of fenced snippets of code e.g., by an additional line (similar to +#OPTIONS: in the file's header) in the .org file?
Steps to Reproduce
I prepared an .org file (attached in the .zip below), test.org. It contains some text, a labeled snippet of Python, an other about Fortran. While running orgmode, I exported this document by C-c C-e m m to write file test.md (equally provided).
Software Versions
Based on a thread on the orgmode discussion board org-mode code fence for markdown I amended Emacs 27.1 as provided by Linux Debian 12/bookworm by elpa-markdown-mode (2.5-1)and elpa-markdown-toc (0.1.5-1) via the synaptic package manager.
Markdown mode, version: 2.5
Markdown toc version: 0.1.5
Emacs, version: GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-11-27, modified by Debian
Expected Behavior
After writing an .org file in orgmode, I anticipated the export by
C-c C-e m m
would fence snippets of code including a keyword to label the language the snippets are about. As an example of the pattern imagined``` python for i in range(5): print(i) ```
The manual describes
C-c C-s C
as a chord within markdown mode to «insert[s] a GFM style backquote fenced code block.» which in this form is not compatible within orgmode.Actual Behavior
Running Emacs orgmode, the export by
C-c C-e m m
only yieldswithout fencing back ticks prior / after, and without a label about the language in question. So far, I obtained the pattern wanted with pandoc, e.g. by
Question/feature suggest
Is there an option to permit export of fenced snippets of code e.g., by an additional line (similar to
+#OPTIONS:
in the file's header) in the .org file?Steps to Reproduce
I prepared an .org file (attached in the .zip below),
test.org
. It contains some text, a labeled snippet of Python, an other about Fortran. While running orgmode, I exported this document byC-c C-e m m
to write filetest.md
(equally provided).Software Versions
Based on a thread on the orgmode discussion board org-mode code fence for markdown I amended Emacs 27.1 as provided by Linux Debian 12/bookworm by elpa-markdown-mode (2.5-1)and elpa-markdown-toc (0.1.5-1) via the synaptic package manager.
2022-11-29_markdownmode_report.zip