* lisp/comint.el: Clean up namespace
[emacs.git] / etc / enriched.txt
blobbf3e91a8376c4cfdb7c86feb5202ad0e8b74fb19
1 Content-Type: text/enriched
2 Text-Width: 70
4 <center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></bold></x-color></x-bg-color>
6 <x-bg-color><param>blue</param><x-color><param>white</param><bold>WYSIWYG rich text editing for GNU Emacs</bold></x-color></x-bg-color>
9 </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION</x-color></x-bg-color></bold>
13 <indent>Emacs has the ability to edit <italic>enriched text</italic>, which is text
14 containing faces, colors, indentation, and other properties.
15 This document is a quick introduction to some of the features,
16 and is also an example file in the <italic>text/enriched </italic>format.</indent>
19 <x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP</bold></x-color></x-bg-color>
22 <indent>Most of the time, you need not do anything to get these features
23 to work.  If you visit a file that has been written out in
24 <italic>text/enriched</italic> format, it will automatically be decoded, Emacs will
25 enter 'enriched-mode' while visiting it, and whenever you save it
26 it will be saved in the same format it was read in.
28 If you wish to create a new file, however, you will need to turn
29 on enriched-mode yourself:
32 <fixed><indent>M-x enriched-mode RET</indent></fixed>
35 Or, if you get a <italic>text/enriched </italic>file that Emacs does not
36 automatically recognize and decode, you can tell Emacs to decode
37 it (which also turns on enriched-mode automatically):
40 <fixed><indent>M-x format-decode-buffer RET text/enriched RET</indent></fixed></indent>
44 <x-bg-color><param>blue</param><x-color><param>white</param><bold>WHAT IS ENCODED</bold></x-color></x-bg-color>
47 <indent>Here is the current list of text-properties that are saved; they
48 are discussed in more detail below.  Most of these can be added or
49 changed with the "Text Properties" menu, available under the
50 "Edit" item in the menu-bar, or on C-mouse-2 (Control + the middle
51 mouse button).
53 <bold>Faces:</bold> <indent>default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, etc.</indent>
55 <bold>Colors:</bold> <x-color><param>red</param><x-bg-color><param>DarkSlateGray</param><indent>any</indent></x-bg-color></x-color><x-bg-color><param>DarkSlateGray</param><indent><x-color><param>orange</param>thing</x-color> <x-color><param>yellow</param>your</x-color><x-color><param>green</param> screen</x-color><x-color><param>blue</param> </x-color><x-color><param>light blue</param>can</x-color><x-color><param>violet</param> display...</x-color></indent></x-bg-color>
57 <bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be
58 changed to fit lines into the margins.</indent>
60 <bold>Margins:</bold> <indent>can be indented on the left or right.</indent>
62 <bold>Justification</bold> <indent>(whether lines should be flush with the left margin,
63 the right margin, fully justified, centered, or left alone).</indent>
65 <bold>Excerpts:</bold><indent> <excerpt>"For quoted material."</excerpt></indent>
67 <bold>Read-only, Invisible, and Intangible</bold> regions.
69 <bold>Charset</bold> properties.
71 <bold>Display</bold> properties.
73 </indent>
75 <x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS</bold></x-color></x-bg-color>
78 <indent>You can add faces either with the menu or with <fixed>M-o.</fixed>  The face is
79 applied to the current region.  If you are using
80 'transient-mark-mode' and the region is not active, then the face
81 applies to whatever you type next.  Any face can have colors.  If
82 this is its lone attribute, the face is put on the color submenus
83 of the "Text Properties" menu.</indent>
86 <x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS</bold></x-color></x-bg-color>
89 <italic><indent>Text/enriched</indent></italic><indent> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines.
90 Hard newlines are used to separate paragraphs, or items in a list,
91 or anywhere that must be a line break no matter what the margins
92 are.  Soft newlines are the ones inserted in order to fit text
93 between the margins.  The fill and auto-fill functions insert soft
94 newlines as necessary, but hard newlines are only inserted by
95 direct request, such as using the return key or the <fixed>C-o
96 (open-line)</fixed> function.</indent>
99 <x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION</bold></x-color></x-bg-color>
102 <indent>The fill functions also understand margins, which can be set for
103 any region of a document.  In addition to the menu items, which
104 increase or decrease the margins, there are two commands for
105 setting the margins absolutely: <fixed>C-c [ (set-left-margin)</fixed> and <fixed>C-c
106 ] (set-right-margin)</fixed>.
109 You <indent>can change indentation at any point in a paragraph, which
110 makes it possible to do interesting things like
111 hanging-indents: this paragraph was indented by selecting the
112 region from the second word to the end of the paragraph, and
113 indenting only that part.</indent></indent>
116 <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION</bold></x-color></x-bg-color>
120 <indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled.
121 </italic>This means that your lines will be left as you write them.
122 This paragraph is unfilled.</nofill>
125 <flushleft>The most common (for English) style is <italic>FlushLeft.  </italic>This means
126 lines are aligned at the left margin but left uneven at the right.</flushleft>
129 <flushright>    <italic>FlushRight</italic> makes each line flush with the right margin instead.
130     This paragraph is FlushRight.</flushright>
133 <flushboth><italic>FlushBoth </italic>regions, which are sometimes called "fully justified"
134 are aligned evenly on both edges, so that the text on the page has
135 a smooth appearance as in a book or newspaper article.
136 Unfortunately this does not look as nice with a fixed-width font
137 as it does in a proportionally-spaced printed document; the extra
138 spaces that are needed on the screen can make it hard to read.</flushboth>
140 <center>
142     <bold>Center</bold>
144     Finally, there is <italic>center </italic>justification.  The normal
145     center-paragraph key, M-S, can be used to turn on center
146     justification in enriched-mode.
148     M-j or the "Text Properties" menu also can be used to change
149     justification.
153 </center><flushboth>Note that justification can only change at hard newlines, because
154 that is the unit over which filling gets done.</flushboth></indent>
157 <x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS</bold></x-color></x-bg-color>
160 <excerpt><indent>This is an example of an excerpt.  You can use them for quoted
161 parts of other people's email messages and the like.  It is just a
162 face, which is the same as the 'italic' face by default.</indent></excerpt>
165 <x-bg-color><param>blue</param><x-color><param>white</param><bold>CHARSET</bold></x-color></x-bg-color>
168 <indent>You can add character set information to stretches of text; this
169 is important for selecting the font that will display that text.
170 Users of various charsets, especially in East Asian cultures,
171 prefer the same characters to be rendered differently depending on
172 the language/charset context.</indent>
175 <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT</bold></x-color></x-bg-color>
178 <indent>Enriched-mode documents are saved in an extended version of a
179 format called <italic>text/enriched</italic>, which is defined as part of the MIME
180 standard.  This means that your documents are transportable (even
181 through email) to many other systems.  In the future other file
182 formats may be supported as well.
185 Since Emacs adds some non-standard features to the format (colors
186 and read-only regions), not all systems will be able to recreate
187 all of the features of your document, but they will get as close
188 as possible.
191 The text/enriched standard is defined in </indent>Internet<indent> RFC 1896
192 (<<http://www.ietf.org/rfc/rfc1896.txt>).</indent>
195 <x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION</bold></x-color></x-bg-color><bold>
198 </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent>
200 -<indent> User-preference variables: <fixed>default-justification,
201 enriched-verbose.
203 </fixed></indent>-<indent> You can add annotations for your own text properties by making
204 additions to <fixed>enriched-translations</fixed>.  Note that the standard
205 requires you to name your annotation starting<italic> "x-" </italic>(as in
206 <italic>"x-read-only"</italic>).  Please report any such additions that you
207 think might be of general interest using <fixed>M-x report-emacs-bug</fixed>.</indent>
209 </indent><bold>
211 <x-bg-color><param>blue</param><x-color><param>white</param>TODO LIST</x-color></x-bg-color></bold>
214 <italic><indent>[Feel free to work on these and send us the results!]</indent></italic><indent>
216 + Conform to updated text/enriched spec in RFC 1896.
218 + Be smarter about fixing malformed files.
220 + Make the indentation work more seamlessly and robustly:
222 + Create<indent> an aggressive auto-fill function that will keep the
223 paragraph properly filled all the time, without slowing down
224 editing too much.  Refill mode is a start at this, but needs
226 </indent></indent>      <indent>improvement.
228 + Refill after yank.  [Refill mode does that.]
230 +<indent> Make deleting a newline also delete the indentation following
231 it.</indent>
233 + Never let point enter indentation??
235 + Notice and re-fill when window changes widths (optionally).
237 + Deal with the 'category' text-property in a smart way.
239 + Interface w/ Gnus, VM, RMAIL.  Maybe Info too?  </indent>(Gnus 5.9 copes
241       with text/enriched incoming mail.)<indent>
243 + Support more formats: RTF, HTML...
245 + Use modern Emacs display features.
247 </indent>
249 <x-bg-color><param>blue</param><x-color><param>white</param><bold>Original Author:</bold></x-color></x-bg-color>
252 <bold><x-color><param>white</param><x-bg-color><param>blue</param>Boris Goldowsky</x-bg-color></x-color><x-color><param>light blue</param> </x-color></bold><x-color><param>light blue</param><fixed><<boris@gnu.ai.mit.edu></fixed></x-color>
256 Copyright (C) 1995, 1997, 2001-2018 Free Software Foundation, Inc.
258 COPYING PERMISSIONS:
260     This document is free software: you can redistribute it and/or modify
261     it under the terms of the GNU General Public License as published by
262     the Free Software Foundation, either version 3 of the License, or
263     (at your option) any later version.
265     This program is distributed in the hope that it will be useful,
266     but WITHOUT ANY WARRANTY; without even the implied warranty of
267     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
268     GNU General Public License for more details.
270     You should have received a copy of the GNU General Public License
271     along with this program.  If not, see <<https://www.gnu.org/licenses/>.