* org-mode code fence for markdown
[not found] <20221125204848.72322cc8.ref@debian>
@ 2022-11-25 19:48 ` Norwid Behrnd
2022-11-26 6:48 ` Ihor Radchenko
0 siblings, 1 reply; 3+ messages in thread
From: Norwid Behrnd @ 2022-11-25 19:48 UTC (permalink / raw)
To: emacs-orgmode
Dear list,
based on previous experience to fence small snippets of code in org-mode e.g.,
for Fortran in a pattern like
```org
* example Fortran (not FORTRAN 77)
#+begin_src f90 :tangle echo.f90
program test
implicit none
write (*, '(A)') "Fortran"
end program test
#+end_src
```
I seek a similar fence to document a pattern in Markdown. An example would be
a nested list such as
```markdown
* Item 1
* Item 2
- Item 2a
+ Item 2a1
- Item 2b
* Item 3
```
Contrasting to my anticipation, neither `C-c C-, s` followed by a tentative
«md», nor «markdown» yield a box which opens by `C-c '`. Neither table 1, nor
2 on worg's documentation[1] mentions markdown.
Is there a special key (similar to f90 for contemporary Fortran) /to tangle/
selected, individually fenced snippets of .md stored in one .org file into one
.md file which wasn't yet added to these tables? Or -- given subtle
differences in the dialects e.g., by Gruber, GitHub, Pandoc -- is there too
little benefit for such an additional bridge, perhaps especially whole .org
documents may be rewritten into any of the three forms of .md by pandoc, and
`C-c C-e` equally may be configured to export a buffer of running Emacs
org-mode to .md?
Norwid
[1] https://orgmode.org/worg/org-contrib/babel/languages/index.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mode code fence for markdown
2022-11-25 19:48 ` org-mode code fence for markdown Norwid Behrnd
@ 2022-11-26 6:48 ` Ihor Radchenko
2022-11-26 17:10 ` Norwid Behrnd
0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2022-11-26 6:48 UTC (permalink / raw)
To: Norwid Behrnd; +Cc: emacs-orgmode
Norwid Behrnd <nbehrnd@yahoo.com> writes:
> I seek a similar fence to document a pattern in Markdown. An example would be
> a nested list such as
>
> ```markdown
> * Item 1
> * Item 2
> - Item 2a
> + Item 2a1
> - Item 2b
> * Item 3
> ```
>
> Contrasting to my anticipation, neither `C-c C-, s` followed by a tentative
> «md», nor «markdown» yield a box which opens by `C-c '`. Neither table 1, nor
> 2 on worg's documentation[1] mentions markdown.
It should, if you have markdown-mode installed.
Try
#+begin_src markdown :tangle yes
,* Item 1
,* Item 2
- Item 2a
+ Item 2a1
- Item 2b
,* Item 3
#+end_src
Note that you need to escape the stars as they would be recognized as
Org headings otherwise.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-mode code fence for markdown
2022-11-26 6:48 ` Ihor Radchenko
@ 2022-11-26 17:10 ` Norwid Behrnd
0 siblings, 0 replies; 3+ messages in thread
From: Norwid Behrnd @ 2022-11-26 17:10 UTC (permalink / raw)
To: emacs-orgmode
Ihor Radchenko <yantar92@posteo.net> wrote:
>
> It should, if you have markdown-mode installed.
>
> Try
>
> #+begin_src markdown :tangle yes
> ,* Item 1
> ,* Item 2
> - Item 2a
> + Item 2a1
> - Item 2b
> ,* Item 3
> #+end_src
Affirmative, after installing elpa-markdown-mode (example in Linux Debian's
synaptic), the box opens as anticipated. The text's markup indications for
e.g., text in bold, italic equally work as does joining snippets via tangle
(C-c C-v t).
> Note that you need to escape the stars as they would be recognized as
> Org headings otherwise.
Similar to org-mode (self)reporting about org-mode, i.e.
```org
#+begin_src org
,* level one
,** level two
,** level two
#+end_src
```
the escaping comma equally is added on the fly when closing the box (C-c ') for
a box about markdown, too. The handy promotion/demotion of headers, or entries
of a list (M-left, M-right) which equally is available in an open box about
orgmode however is absent for an open box about markdown (M-up/M-down is
absent for both); however, this is not perceived as a constraint.
Thank you, the issue is resolved.
Norwid
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-11-26 17:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221125204848.72322cc8.ref@debian>
2022-11-25 19:48 ` org-mode code fence for markdown Norwid Behrnd
2022-11-26 6:48 ` Ihor Radchenko
2022-11-26 17:10 ` Norwid Behrnd
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).