[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: text formating
From: |
Jean Louis |
Subject: |
Re: text formating |
Date: |
Wed, 8 Feb 2023 01:28:02 +0300 |
User-agent: |
Mutt/2.2.9+54 (af2080d) (2022-11-21) |
* 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.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Re: text formating, (continued)
Re- text formating, Gottfried, 2023/02/05
Re: text formating, Gottfried, 2023/02/07
- Re: text formating,
Jean Louis <=
- Re: text formating, Gottfried, 2023/02/08
- Re: text formating, Jean Louis, 2023/02/08
- RE: [External] : Re: text formating, Drew Adams, 2023/02/08
- Re: text formating, Gottfried, 2023/02/09
- RE: [External] : Re: text formating, Drew Adams, 2023/02/09
- Re: [External] : Re: text formating, Gottfried, 2023/02/09
- RE: [External] : Re: text formating, Drew Adams, 2023/02/09
- Re: [External] : Re: text formating, Gottfried, 2023/02/09
- Re: [External] : Re: text formating, Jean Louis, 2023/02/09
- RE: [External] : Re: text formating, Drew Adams, 2023/02/09