Jan from Oslo wrote and ask wouldn't it be great if emacs can be used as a word processor, i.e. letting users bold text, slant text, etc.
Yeah, i find that to be great. Imagine, i can just use it to write notes, with bold text, highlighted text, etc.
Note that emacs has a “facemenu-*” command. See the menu 〖Edit ▸ Text Properties ▸ Face〗. Here are the hotkeys.
(See also: Emacs's Keybinding Layout Diagram.)
You can also use emacs's highlight commands to highlight text. Example:
Though, the problem is that when you save the file, the font decorations are not saved with it. So, in order to use make emacs to have word processor capabilities, you'll need a file format to go with it. Perhaps some soul has done it using one of the open source format such as HTML or RTF.
Anonymous wrote to say that the answer is
enriched-mode minor mode. Thanks! Ask a emacs question and someone will have the answer!
So, i opened a new file, call
enriched-mode 【Alt+x】, then type “thou shall”, select the word “thou”, then use the menu 〖Edit ▸ Text Properties ▸ Face ▸ Bold〗 to make it bold, then save it, close it. Then reopen it, then indeed, the text is still bold.
Though, i wondered how it worked. So i opened the file in Notepad, and it shows this content:
Content-Type: text/enriched Text-Width: 80 <bold>thou </bold>shall
Ah, so it's a Enriched text format. This is a pretty old format, dating to early 1990s.
The features of the format is pretty minimal. You can bold, slant, underline, color, texts, but that's about it. Emacs's enriched-mode is written originally in 1994.
You can use emacs to show the file's raw content.
Here's a sample saved file: emacs_enriched_text_sample_file.txt.
find-file-literally then give the file path.
Also, if you create a file with the first line being
Content-Type: text/enriched, opening it in emacs automatically turns on the “enriched-mode” and interpret the file by that format for display.