* Gottfried <gottfried@posteo.de> [2023-02-07 20:26]:
Hi Jean,
a side question:
................................................................
I installed markdown and Asccidoc in my distro GNU Guix, in order to try it
out.
...................................................................
but markdown can be used only in installing "ReText" or "ghostwriter"
How do you use them in Emacs?
Search for discount markdown, it has table of contents feature, and
valid HTML, and is fastest.
You can install markdown-mode for Emacs.
markdown is basically used on command line, in shell, like:
echo "## Hello" | markdown
<h2>Hello</h2>
Emacs helps you to make that conversion easily. markdown-mode has
preview already.
Can you install markdown-mode?
The same with Asccidoc.
I have made functions so I just press single key for conversion.
How can I bind that function to some key like C-c a ?
(defun rcd-markdown-preview ()
"Preview Markdown."
(interactive)
(let* ((output (rcd-markdown (buffer-string)))
(file (concat (buffer-file-name) "-MD.html")))
(with-temp-file file (insert output))
(browse-url file)))
You can do following:
(keymap-set markdown-mode-map "C-c a" #'rcd-markdown-preview)
You need Emacs 29.1 for that function to work.
I have just tried it, it works well.