Text
This chapter describes the functions that deal with the text in a buffer. Most examine, insert, or delete text in the current buffer, often operating at point or on text adjacent to point. Many are interactive. All the functions that change the text provide for undoing the changes (see Undo).
Many text-related functions operate on a region of text defined by two buffer positions passed in arguments named start and end. These arguments should be either markers (see Markers) or numeric character positions (see Positions). The order of these arguments does not matter; it is all right for start to be the end of the region and end the beginning. For example, (delete-region 1 10) and (delete-region 10 1) are equivalent. An args-out-of-range error is signaled if either start or end is outside the accessible portion of the buffer. In an interactive call, point and the mark are used for these arguments.
Throughout this chapter, “text” refers to the characters in the buffer, together with their properties (when relevant). Keep in mind that point is always between two characters, and the cursor appears on the character after point.
- Examining Text Near Point
- Examining Buffer Contents
- Comparing Text
- Inserting Text
- User-Level Insertion Commands
- Deleting Text
- User-Level Deletion Commands
- The Kill Ring
- Undo
- Maintaining Undo Lists
- Filling
- Margins for Filling
- Adaptive Fill Mode
- Auto Filling
- Sorting Text
- Counting Columns
- Indentation
- Case Changes
- Text Properties
- Substituting for a Character Code
- Registers
- Transposition of Text
- Replacing Buffer Text
- Dealing With Compressed Data
- Base 64 Encoding
- Checksum/Hash
- Suspicious Text
- GnuTLS Cryptography
- Database
- Parsing HTML and XML
- Parsing and generating JSON values
- JSONRPC communication
- Atomic Change Groups
- Change Hooks