# insert-string(2)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

insert-string - Insert character string into current buffer

## SYNOPSIS

n insert-string "string"

## DESCRIPTION

insert-string inserts a string n times into the current buffer, moving the cursor position.

insert-string allows text to be built in a buffer without reading it from a file. Some special escape characters are interpreted in the string, as follows:

`\n` - Enters a new line
`\t` - A tab character
`\b` - Backspace
`\f` - Form-feed
`\\` - Literal backslash character '`\`'
`\xXX` - Hexadecimal value of character ASCII value

## NOTES

If a negative argument n is given to insert-string the given string is inserted 0-n times into the buffer. The behavior is the same as if a positive argument is given except that if the string contains a new-line character (ascii char 0x0a), rather than splitting the string over multiple lines the character is inserted into a single line of the buffer.

This is highly irregular and can break MicroEmacs (for example undo(2) will fail and could lead to a crash); the feature has been added to support bit `0x100` of the shell-command(2) process spawning group of commands. It's use outside of this context is to be avoided.

## SEE ALSO

insert-file(2), insert-newline(2), insert-space(2), insert-tab(2), newline(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>