(server-process-filter): Ignore lines that don't start
[bpt/emacs.git] / etc / enriched.doc
CommitLineData
f604450a
BG
1Content-Type: text/enriched
2Text-Width: 70
20ea8f1d 3
f604450a 4<center><x-bg-color><param>blue</param><x-color><param>white</param><bold><fixed>enriched.el:</fixed></bold></x-color></x-bg-color>
20ea8f1d 5
f604450a 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>
591d257e 7
591d257e 8
f604450a 9</center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION
591d257e 10
f604450a 11</x-color></x-bg-color>
591d257e 12
f604450a
BG
13</bold><indent>Emacs now has the ability to edit <italic>enriched text</italic>, which is text
14containing faces, colors, indentation, and other properties.
15This document is a quick introduction to some of the new features,
16and is also an example file in the <italic>text/enriched </italic>format.
591d257e 17
591d257e 18
f604450a 19</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP
591d257e 20
f604450a 21</bold></x-color></x-bg-color>
591d257e 22
f604450a
BG
23<indent>Most of the time, you need not do anything to get these features
24to work. If you visit a file that has been written out in
25<italic>text/enriched</italic> format, it will automatically be decoded, Emacs will
26enter `enriched-mode' while visiting it, and whenever you save it
27it will be saved in the same format it was read in.
28
591d257e 29
f604450a
BG
30If you wish to create a new file, however, you will need to turn
31on enriched-mode yourself:
591d257e
BG
32
33
f604450a 34<fixed><indent>M-x enriched-mode RET</indent></fixed>
591d257e
BG
35
36
f604450a
BG
37Or, if you get a <italic>text/enriched </italic>file that Emacs does not
38automatically recognize and decode, you can tell Emacs to decode
39it (which also turns on enriched-mode automatically):
591d257e
BG
40
41
f604450a 42 <fixed>M-x format-decode-buffer RET text/enriched RET</fixed>
591d257e 43
f604450a 44
591d257e 45
f604450a 46</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold><flushleft>WHAT IS ENCODED
591d257e 47
f604450a 48</flushleft></bold></x-color></x-bg-color><flushleft>
591d257e 49
f604450a
BG
50</flushleft><indent>Here is the current list of text-properties that are saved; they
51are discussed in more detail below.
52Most of these can be added or changed with the "Text Properties"
53menu, available under the "Edit" item in the menu-bar, or on
54C-mouse-2 (Control + the middle mouse button).
591d257e 55
f604450a 56<bold>Faces:</bold> default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, <fixed>fixed</fixed>, etc.
591d257e 57
f604450a 58<bold>Colors:</bold> <x-color><param>red</param><x-bg-color><param>DarkSlateGray</param>any</x-bg-color></x-color><x-bg-color><param>DarkSlateGray</param><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></x-bg-color>
591d257e 59
f604450a
BG
60<bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be
61changed to fit lines into the ma</indent>rgins.
591d257e 62
f604450a 63<bold>Margins:</bold> can be indented on the left or right.
591d257e 64
f604450a
BG
65<bold>Justification </bold><indent>(whether lines should be flush with the left margin,
66the right margin, fully justified, centered, or left alo</indent>ne).
591d257e 67
f604450a 68<bold>Excerpts: "</bold><excerpt>For quoted material."</excerpt>
591d257e 69
f604450a 70<bold>Read-only</bold> regions.
591d257e 71
591d257e 72
f604450a 73</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS
591d257e 74
f604450a 75</bold></x-color></x-bg-color><bold>
591d257e 76
f604450a
BG
77</bold><indent>You can add faces either with the menu or with <fixed>M-g.</fixed> The face is
78applied to the current region. If you are using
79`transient-mark-mode' and the region is not active, then the face
80applies to whatever you type next. Any face can have colors, but
81faces have no other attributes are put on the color submenus of
82the "Text Properties" menu.
591d257e 83
591d257e 84
f604450a 85</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS
591d257e 86
f604450a 87</bold></x-color></x-bg-color><bold>
591d257e 88
f604450a
BG
89</bold><indent><italic>Text/enriched</italic> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines.
90Hard newlines are used to separate paragraphs, or items in a list,
91or anywhere that must be a line break no matter what the margins
92are. Soft newlines are the ones inserted in order to fit text
93between the margins. The fill and auto-fill functions insert soft
94newlines as necessary, but hard newlines are only inserted by
95direct request, such as using the return key or the <fixed>C-o
96(open-line)</fixed> function.
591d257e 97
591d257e 98
f604450a 99</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION
591d257e 100
f604450a 101</bold></x-color></x-bg-color><bold>
591d257e 102
f604450a
BG
103</bold><indent><indentright>The fill functions also understand margins, which can be set
104for any region of a document. In addition to the menu items,
105which increase or decrease the margins, there are two commands
106for setting the margins absolutely: <fixed>C-c l (set-left-margin)</fixed>
107and <fixed>C-c r (set-right-margin)</fixed>.
108<flushleft>
591d257e 109
f604450a
BG
110</flushleft></indentright><flushleft>You <indent>can change indentation at any point in a</indent></flushleft></indent> <indent><indent><flushleft>paragraph, which
111makes it possible to do interesting things like</flushleft>
112<flushleft>hanging-indents: this paragraph was indented by selecting the
113region from the second word to the end of the paragraph, and
114indenting only that part.<indent>
591d257e 115
f604450a 116</indent></flushleft></indent></indent><flushleft>
591d257e 117
f604450a 118<x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION<indent>
591d257e 119
f604450a 120</indent></bold></x-color></x-bg-color><bold><indent>
591d257e 121
f604450a
BG
122</indent></bold></flushleft><indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled.
123</italic>This means that your lines will be left as you write them.
124This paragraph is unfilled.
591d257e 125
f604450a 126The most common (for English) style is <italic>FlushLeft. </italic>This means
591d257e
BG
127lines are aligned at the left margin but left uneven at the
128right.
129
591d257e 130
f604450a 131 </nofill><italic><flushright>FlushRight</flushright></italic><flushright> makes each line flush with the right margin instead.
591d257e 132
f604450a 133
591d257e 134
f604450a
BG
135</flushright><italic><flushboth>FlushBoth </flushboth></italic><flushboth>regions, which are sometimes called "fully justified"
136are aligned evenly on both edges, so that the text on the page has
137a smooth appearance as in a book or newspaper article.
138Unfortunately this does not look as nice with a fixed-width font
139as it does in a proportionally-spaced printed document; the extra
140spaces that are needed on the screen can make it hard to read. <indentright><indentright><indentright><indentright>
591d257e 141
591d257e 142
f604450a 143 </indentright></indentright></indentright></indentright></flushboth><bold><center>Center
591d257e 144
f604450a
BG
145 </center></bold><center>Finally, there is <italic>center </italic>justification.
146 The normal center-paragraph key, M-S, can be used to turn on
147 center justification in enriched-mode.
591d257e 148
f604450a
BG
149 M-j or the "Text Properties" menu also can be used to change
150 justification.
591d257e 151
f604450a 152
591d257e 153
f604450a
BG
154</center><flushboth>Note that justification can only change at hard newlines, because
155that is the unit over which filling gets done.
591d257e 156
591d257e 157
f604450a 158</flushboth></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS
591d257e 159
f604450a 160</bold></x-color></x-bg-color>
591d257e 161
f604450a
BG
162<excerpt><indent>This is an example of an excerpt. You can use them for quoted
163parts of other people's email messages and the like. It is just a
164face, which is the same as the `italic' face by default.
165 </indent></excerpt>
591d257e 166
f604450a 167<x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT<indent>
591d257e 168
f604450a 169</indent></bold></x-color></x-bg-color><indent>
591d257e 170
f604450a
BG
171Enriched-mode docuemnts are saved in an extended version of a
172format called <italic>text/enriched</italic>, which is defined as part of the MIME
173standard. This means that your documents are transportable (even
174through email) to many</indent> <indent>other systems. In the future other file
175formats may be supported as well.
591d257e
BG
176
177
f604450a 178Since Emacs adds some non-standard features to the format (colors
591d257e 179
f604450a
BG
180and read-only regions), not all systems will be able to recreate
181all of the features of your document, but they will get as close
182as possible.
591d257e 183
591d257e 184
f604450a
BG
185The MIME standard is defined in internet RFC 1521; text/enriched
186is defined in RFC 1563. Details on obtaining these documents via
187FTP or email may be obtained by sending an email message to
188<fixed>rfc-info@isi.edu</fixed> with the message body:
591d257e 189
f604450a 190<fixed><indent>help: ways_to_get_rfcs
591d257e 191
591d257e 192
f604450a 193</indent></fixed>See also the newsgroup comp.mail.mime.
591d257e 194
591d257e 195
f604450a 196</indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION
591d257e 197
f604450a 198</bold></x-color></x-bg-color><bold>
591d257e 199
f604450a 200</bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent>
591d257e 201
f604450a
BG
202- <indent>User-preference variables: <fixed>default-justification, enriched-verbose.
203</fixed></indent>- <indent>You can add annotations for your own text properties by making
204additions to <fixed>enriched-annotation-alist</fixed>. Note that the
205standard requires you to name your annotation starting<italic> "x-"
206</italic>(as in <italic>"x-read-only"</italic>). Please send me any such additions that
207you think might be of general interest so that I can include
208them in the distribution.
591d257e 209
591d257e 210
f604450a 211</indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>TO-DO LIST
591d257e 212
f604450a 213</bold></x-color></x-bg-color><bold>
591d257e 214
f604450a 215</bold><indent><italic>[Feel free to work on these and send me the results!]</italic>
591d257e 216
f604450a 217- Be smarter about fixing malformed files.
591d257e
BG
218
219- Make the indentation work more seamlessly and robustly:
220
f604450a
BG
221<indent>+ Create<indent> an aggressive auto-fill function that will keep the
222paragraph properly filled all the time, without slowing
223down editing too much.</indent>
591d257e 224
f604450a 225+ Refill after yank.
591d257e 226
f604450a
BG
227+ <indent>Make deleting a newline also delete the indentation
228following it.</indent>
591d257e 229
f604450a 230+ Never let point enter indentation??
591d257e 231
f604450a 232</indent>- Notice and re-fill when window changes widths (optionally).
591d257e 233
f604450a 234- Deal with the `category' text-property in a smart way.
591d257e 235
f604450a 236- Interface w/ GNUS, VM, RMAIL. Maybe Info too?
591d257e 237
f604450a 238-<indent> Support more formats: RTF, HTML...
591d257e 239
591d257e 240
f604450a 241</indent></indent><x-bg-color><param>blue</param><x-color><param>white</param><bold>Final Notes:
591d257e 242
f604450a 243</bold></x-color></x-bg-color><bold>
591d257e 244
f604450a
BG
245</bold><indent>This code and documentation is under development.
246 </indent>Comments and bug reports are welcome.
591d257e
BG
247
248
f604450a 249<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><x-color><param>blue</param>
591d257e 250
f604450a 251</x-color><x-bg-color><param>blue</param><x-color><param>white</param> April 1995 </x-color></x-bg-color><x-color><param>blue</param>
591d257e
BG
252
253
254
255
256
257
258
259
260
261
262
f604450a 263</x-color>