Commit | Line | Data |
---|---|---|
f604450a BG |
1 | Content-Type: text/enriched |
2 | Text-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 | |
5418a92b | 9 | </center><bold><x-bg-color><param>blue</param><x-color><param>white</param>INTRODUCTION</x-color></x-bg-color></bold> |
591d257e | 10 | |
591d257e BG |
11 | |
12 | ||
92f78ea3 GM |
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> | |
591d257e BG |
17 | |
18 | ||
5418a92b RS |
19 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>INSTALLATION and STARTUP</bold></x-color></x-bg-color> |
20 | ||
591d257e | 21 | |
f604450a BG |
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. | |
591d257e | 27 | |
f604450a BG |
28 | If you wish to create a new file, however, you will need to turn |
29 | on enriched-mode yourself: | |
591d257e BG |
30 | |
31 | ||
5418a92b | 32 | <fixed><indent>M-x enriched-mode RET</indent></fixed> |
591d257e BG |
33 | |
34 | ||
f604450a BG |
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): | |
591d257e BG |
38 | |
39 | ||
5418a92b | 40 | <fixed><indent>M-x format-decode-buffer RET text/enriched RET</indent></fixed></indent> |
591d257e | 41 | |
f604450a | 42 | |
591d257e | 43 | |
5418a92b | 44 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>WHAT IS ENCODED</bold></x-color></x-bg-color> |
591d257e BG |
45 | |
46 | ||
5418a92b RS |
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). | |
591d257e | 52 | |
5418a92b | 53 | <bold>Faces:</bold> <indent>default, <bold>bold</bold>, <italic>italic</italic>, <underline>underline</underline>, etc.</indent> |
591d257e | 54 | |
5418a92b | 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> |
591d257e | 56 | |
f604450a | 57 | <bold>Newlines:</bold> <indent>Which ones are real ("hard") newlines, and which can be |
5418a92b | 58 | changed to fit lines into the margins.</indent> |
591d257e | 59 | |
5418a92b | 60 | <bold>Margins:</bold> <indent>can be indented on the left or right.</indent> |
591d257e | 61 | |
5418a92b RS |
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> | |
591d257e | 64 | |
5418a92b | 65 | <bold>Excerpts:</bold><indent> <excerpt>"For quoted material."</excerpt></indent> |
591d257e | 66 | |
f604450a | 67 | <bold>Read-only</bold> regions. |
591d257e | 68 | |
5418a92b | 69 | </indent> |
591d257e | 70 | |
5418a92b | 71 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>FACES and COLORS</bold></x-color></x-bg-color> |
591d257e | 72 | |
591d257e | 73 | |
2e8245ce | 74 | <indent>You can add faces either with the menu or with <fixed>M-o.</fixed> The face is |
f604450a BG |
75 | applied to the current region. If you are using |
76 | `transient-mark-mode' and the region is not active, then the face | |
8585e165 TTN |
77 | applies to whatever you type next. Any face can have colors. If |
78 | this is its lone attribute, the face is put on the color submenus | |
79 | of the "Text Properties" menu.</indent> | |
591d257e | 80 | |
591d257e | 81 | |
5418a92b | 82 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>NEWLINES and PARAGRAPHS</bold></x-color></x-bg-color> |
591d257e | 83 | |
591d257e | 84 | |
5418a92b | 85 | <italic><indent>Text/enriched</indent></italic><indent> format distinguishes between <underline>hard</underline> and <underline>soft</underline> newlines. |
f604450a BG |
86 | Hard newlines are used to separate paragraphs, or items in a list, |
87 | or anywhere that must be a line break no matter what the margins | |
88 | are. Soft newlines are the ones inserted in order to fit text | |
89 | between the margins. The fill and auto-fill functions insert soft | |
90 | newlines as necessary, but hard newlines are only inserted by | |
91 | direct request, such as using the return key or the <fixed>C-o | |
5418a92b RS |
92 | (open-line)</fixed> function.</indent> |
93 | ||
591d257e | 94 | |
5418a92b | 95 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>INDENTATION</bold></x-color></x-bg-color> |
591d257e | 96 | |
591d257e | 97 | |
5418a92b RS |
98 | <indent>The fill functions also understand margins, which can be set for |
99 | any region of a document. In addition to the menu items, which | |
100 | increase or decrease the margins, there are two commands for | |
0c4f5f23 LT |
101 | setting the margins absolutely: <fixed>C-c [ (set-left-margin)</fixed> and <fixed>C-c |
102 | ] (set-right-margin)</fixed>. | |
591d257e | 103 | |
591d257e | 104 | |
5418a92b RS |
105 | You <indent>can change indentation at any point in a paragraph, which |
106 | makes it possible to do interesting things like | |
107 | hanging-indents: this paragraph was indented by selecting the | |
f604450a | 108 | region from the second word to the end of the paragraph, and |
5418a92b | 109 | indenting only that part.</indent></indent> |
591d257e | 110 | |
591d257e | 111 | |
5418a92b | 112 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>JUSTIFICATION</bold></x-color></x-bg-color> |
591d257e BG |
113 | |
114 | ||
5418a92b RS |
115 | |
116 | <indent><nofill>Several styles of justification are possible, the simplest being <italic>unfilled. | |
f604450a | 117 | </italic>This means that your lines will be left as you write them. |
5418a92b RS |
118 | This paragraph is unfilled.</nofill> |
119 | ||
591d257e | 120 | |
5418a92b RS |
121 | <flushleft>The most common (for English) style is <italic>FlushLeft. </italic>This means |
122 | lines are aligned at the left margin but left uneven at the right.</flushleft> | |
591d257e | 123 | |
591d257e | 124 | |
5418a92b RS |
125 | <flushright> <italic>FlushRight</italic> makes each line flush with the right margin instead. |
126 | This paragraph is FlushRight.</flushright> | |
591d257e | 127 | |
f604450a | 128 | |
591d257e | 129 | |
5418a92b | 130 | <flushboth><italic>FlushBoth </italic>regions, which are sometimes called "fully justified" |
f604450a BG |
131 | are aligned evenly on both edges, so that the text on the page has |
132 | a smooth appearance as in a book or newspaper article. | |
133 | Unfortunately this does not look as nice with a fixed-width font | |
134 | as it does in a proportionally-spaced printed document; the extra | |
5418a92b | 135 | spaces that are needed on the screen can make it hard to read. </flushboth> |
591d257e | 136 | |
5418a92b | 137 | <center> |
591d257e | 138 | |
5418a92b | 139 | <bold>Center</bold> |
591d257e | 140 | |
5418a92b RS |
141 | Finally, there is <italic>center </italic>justification. The normal |
142 | center-paragraph key, M-S, can be used to turn on center | |
143 | justification in enriched-mode. | |
591d257e | 144 | |
5418a92b | 145 | M-j or the "Text Properties" menu also can be used to change |
f604450a | 146 | justification. |
591d257e | 147 | |
f604450a | 148 | |
591d257e | 149 | |
f604450a | 150 | </center><flushboth>Note that justification can only change at hard newlines, because |
5418a92b | 151 | that is the unit over which filling gets done. </flushboth></indent> |
591d257e | 152 | |
591d257e | 153 | |
5418a92b | 154 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>EXCERPTS</bold></x-color></x-bg-color> |
591d257e | 155 | |
591d257e | 156 | |
f604450a BG |
157 | <excerpt><indent>This is an example of an excerpt. You can use them for quoted |
158 | parts of other people's email messages and the like. It is just a | |
5418a92b | 159 | face, which is the same as the `italic' face by default.</indent></excerpt> |
591d257e | 160 | |
591d257e | 161 | |
5418a92b | 162 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>THE FILE FORMAT</bold></x-color></x-bg-color> |
591d257e | 163 | |
5418a92b RS |
164 | |
165 | <indent>Enriched-mode documents are saved in an extended version of a | |
f604450a BG |
166 | format called <italic>text/enriched</italic>, which is defined as part of the MIME |
167 | standard. This means that your documents are transportable (even | |
5418a92b | 168 | through email) to many other systems. In the future other file |
f604450a | 169 | formats may be supported as well. |
591d257e BG |
170 | |
171 | ||
f604450a | 172 | Since Emacs adds some non-standard features to the format (colors |
f604450a BG |
173 | and read-only regions), not all systems will be able to recreate |
174 | all of the features of your document, but they will get as close | |
5418a92b | 175 | as possible. |
591d257e | 176 | |
591d257e | 177 | |
92f78ea3 GM |
178 | The text/enriched standard is defined in </indent>Internet<indent> RFC 1896 |
179 | (<<http://www.ietf.org/rfc/rfc1896.txt>).</indent></indent> | |
591d257e | 180 | |
591d257e | 181 | |
5418a92b | 182 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>CUSTOMIZATION</bold></x-color></x-bg-color><bold> |
591d257e | 183 | |
591d257e | 184 | |
f604450a | 185 | </bold><indent>-<indent> The <fixed>fixed </fixed>and <excerpt>excerpt </excerpt>faces should be set to your liking.</indent> |
591d257e | 186 | |
5418a92b RS |
187 | -<indent> User-preference variables: <fixed>default-justification, |
188 | enriched-verbose. | |
189 | ||
190 | </fixed></indent>-<indent> You can add annotations for your own text properties by making | |
3326c1b5 LT |
191 | additions to <fixed>enriched-translations</fixed>. Note that the standard |
192 | requires you to name your annotation starting<italic> "x-" </italic>(as in | |
92f78ea3 GM |
193 | <italic>"x-read-only"</italic>). Please report any such additions that you |
194 | think might be of general interest using <fixed>M-x report-emacs-bug</fixed>.</indent> | |
5418a92b RS |
195 | |
196 | </indent> | |
591d257e | 197 | |
92f78ea3 | 198 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>TODO LIST</bold></x-color></x-bg-color> |
591d257e BG |
199 | |
200 | ||
92f78ea3 | 201 | <italic><indent>[Feel free to work on these and send us the results!]</indent></italic><indent> |
591d257e | 202 | |
5418a92b | 203 | + Conform to updated text/enriched spec in RFC 1896. |
591d257e | 204 | |
5418a92b | 205 | + Be smarter about fixing malformed files. |
591d257e | 206 | |
5418a92b | 207 | + Make the indentation work more seamlessly and robustly: |
591d257e | 208 | |
5418a92b RS |
209 | + Create<indent> an aggressive auto-fill function that will keep the |
210 | paragraph properly filled all the time, without slowing down | |
7871d11e | 211 | editing too much. Refill mode is a start at this, but needs |
591d257e | 212 | |
da0bbbc4 | 213 | </indent></indent> <indent>improvement. |
7871d11e DL |
214 | |
215 | + Refill after yank. [Refill mode does that.] | |
591d257e | 216 | |
5418a92b RS |
217 | +<indent> Make deleting a newline also delete the indentation following |
218 | it.</indent> | |
591d257e | 219 | |
f604450a | 220 | + Never let point enter indentation?? |
591d257e | 221 | |
5418a92b | 222 | + Notice and re-fill when window changes widths (optionally). |
591d257e | 223 | |
5418a92b | 224 | + Deal with the `category' text-property in a smart way. |
591d257e | 225 | |
7871d11e DL |
226 | + Interface w/ Gnus, VM, RMAIL. Maybe Info too? </indent>(Gnus 5.9 copes |
227 | ||
228 | with text/enriched incoming mail.)<indent> | |
591d257e | 229 | |
5418a92b | 230 | + Support more formats: RTF, HTML... |
591d257e | 231 | |
92f78ea3 | 232 | + Use modern Emacs display features. |
7871d11e | 233 | |
5418a92b | 234 | </indent> |
591d257e | 235 | |
92f78ea3 | 236 | <x-bg-color><param>blue</param><x-color><param>white</param><bold>Original Author:</bold></x-color></x-bg-color> |
591d257e BG |
237 | |
238 | ||
f604450a | 239 | <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 | 240 | |
b727702b EZ |
241 | |
242 | \f | |
ab422c4d | 243 | Copyright (C) 1995, 1997, 2001-2013 Free Software Foundation, Inc. |
b727702b EZ |
244 | |
245 | COPYING PERMISSIONS: | |
246 | ||
ab73e885 | 247 | This document is free software: you can redistribute it and/or modify |
b727702b | 248 | it under the terms of the GNU General Public License as published by |
ab73e885 GM |
249 | the Free Software Foundation, either version 3 of the License, or |
250 | (at your option) any later version. | |
b727702b EZ |
251 | |
252 | This program is distributed in the hope that it will be useful, | |
253 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
254 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
255 | GNU General Public License for more details. | |
256 | ||
257 | You should have received a copy of the GNU General Public License | |
da0bbbc4 | 258 | along with this program. If not, see <<http://www.gnu.org/licenses/>. |