Книга: Learning GNU Emacs, 3rd Edition

10.3.5.1 Saving enriched text

10.3.5.1 Saving enriched text

When you save enriched text, Emacs marks up the document with XML-like tags. Emacs will happily read the document back in, although not many other applications will know what to do with the tags. Still, as you can see below, the tags are straightforward and would allow custom applications such as CGI scripts for the Web to parse them quickly.

Content-Type: text/enriched
Text-Width: 70
<x-color><param>blue</param>Testing</x-color>
This is a quick test of the
<x-color><param>red</param>enriched</x-color> mode in Emacs.
<bold>Not sure what's gonna happen.</bold>
Looks good from here.

But, you can't rely too much on enriched mode yet. For example note the Testing title line. It doesn't appear to contain any information about the size of the font—which is definitely larger if you look at Figure 10-11. Sure enough, killing the buffer and reloading the file loses the size value. The text is still blue and the content is available, but some of the formatting has been lost.

The moral is a classic one: be careful. If you have serious enriched text needs, Emacs is probably not the tool to use (at least not yet). Many of the various word processors out there will do a much better job. But if you just need some basic enhancements to documents that only you or other Emacs users will view, enriched mode is just the ticket.

Оглавление книги

Оглавление статьи/книги

Генерация: 1.704. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз