all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Gottfried <gottfried@posteo.de>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: text formating
Date: Wed, 8 Feb 2023 01:28:02 +0300	[thread overview]
Message-ID: <Y+LQchSUxJtWN3XG@protected.localdomain> (raw)
In-Reply-To: <2f46bb4e-f7ae-63ab-8374-a70419bea8f0@posteo.de>

* 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/



  reply	other threads:[~2023-02-07 22:28 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-29 12:06 text formating Gottfried
2023-01-30 20:28 ` H. Dieter Wilhelm
2023-01-31  7:34 ` Jean Louis
2023-01-31 11:23   ` Ulrich Deiters
2023-01-31 12:43     ` Jean Louis
2023-02-02 13:52   ` Gottfried
2023-02-02 14:30     ` Eli Zaretskii
2023-02-02 15:40       ` [External] : " Drew Adams
2023-02-02 20:12       ` Jean Louis
2023-02-03  7:30         ` Eli Zaretskii
2023-02-03  9:08           ` Jean Louis
2023-02-03 17:24             ` Emanuel Berg
2023-02-04 15:24               ` Jean Louis
2023-02-04 21:44                 ` Emanuel Berg
2023-02-07 17:25   ` Gottfried
2023-02-07 22:28     ` Jean Louis [this message]
2023-02-08 16:49       ` Gottfried
2023-02-08 19:37         ` Jean Louis
2023-02-08 20:18           ` [External] : " Drew Adams
2023-02-09 14:59           ` Gottfried
2023-02-09 15:27             ` [External] : " Drew Adams
2023-02-09 16:59               ` Gottfried
2023-02-09 17:13                 ` Drew Adams
2023-02-09 18:10                   ` Gottfried
2023-02-09 18:26                     ` Jean Louis
2023-02-09 19:12                       ` Drew Adams
2023-02-10  4:18                         ` Jean Louis
2023-02-09 19:11                     ` Drew Adams
2023-02-11 15:25                       ` Gottfried
2023-02-11 16:10                         ` tomas
2023-02-11 19:17                           ` Jean Louis
2023-02-11 16:56                         ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+LQchSUxJtWN3XG@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=gottfried@posteo.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.