rst

Homepage: https://www.gnu.org/software/emacs

Author: David Goodger, Martin Blais, Stefan Merten, Wei-Wei Guo

Summary

Mode for viewing and editing reStructuredText-documents

Commentary

This package provides major mode rst-mode, which supports documents marked
up using the reStructuredText format.  Support includes font locking as well
as a lot of convenience functions for editing.  It does this by defining a
Emacs major mode: rst-mode (ReST).  This mode is derived from text-mode.
This package also contains:

- Functions to automatically adjust and cycle the section underline
  adornments;
- A mode that displays the table of contents and allows you to jump anywhere
  from it;
- Functions to insert and automatically update a TOC in your source
  document;
- Function to insert list, processing item bullets and enumerations
  automatically;
- Font-lock highlighting of most reStructuredText structures;
- Indentation and filling according to reStructuredText syntax;
- Cursor movement according to reStructuredText syntax;
- Some other convenience functions.

See the accompanying document in the docutils documentation about
the contents of this package and how to use it.

For more information about reStructuredText, see
http://docutils.sourceforge.net/rst.html

For full details on how to use the contents of this file, see
http://docutils.sourceforge.net/docs/user/emacs.html

There are a number of convenient key bindings provided by rst-mode.  For the
bindings, try C-c C-h when in rst-mode.  There are also many variables that
can be customized, look for defcustom in this file or look for the "rst"
customization group contained in the "wp" group.

If you use the table-of-contents feature, you may want to add a hook to
update the TOC automatically every time you adjust a section title::

  (add-hook 'rst-adjust-hook 'rst-toc-update)

Syntax highlighting: font-lock is enabled by default.  If you want to turn
off syntax highlighting to rst-mode, you can use the following::

  (setq font-lock-global-modes '(not rst-mode ...))


DOWNLOAD

The latest release of this file lies in the docutils source code repository:
  http://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils/tools/editors/emacs/rst.el

INSTALLATION

Add the following lines to your init file:

  (require 'rst)

If you are using `.txt' as a standard extension for reST files as
http://docutils.sourceforge.net/FAQ.html#what-s-the-standard-filename-extension-for-a-restructuredtext-file
suggests you may use one of the `Local Variables in Files' mechanism Emacs
provides to set the major mode automatically.  For instance you may use::

   .. -*- mode: rst -*-

in the very first line of your file.  The following code is useful if you
want automatically enter rst-mode from any file with compatible extensions:

(setq auto-mode-alist
      (append '(("\\.txt\\'" . rst-mode)
                ("\\.rst\\'" . rst-mode)
                ("\\.rest\\'" . rst-mode)) auto-mode-alist))

Dependencies

Reverse dependencies