help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: elisp - inserting block of text


From: Tassilo Horn
Subject: Re: elisp - inserting block of text
Date: Wed, 01 Dec 2010 17:22:01 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Gary <help-gnu-emacs@garydjones.name> writes:

> What function(s) do I need to use in order to insert some text,
> please?
>
> I know about 'insert', but am wondering how I would go about inserting
> line breaks, for example, when the buffer might contain a file with
> *n*x or DOS line endings, or even a mix of the two.

(insert "foo\nbar\n") inserts foo and bar, and after each one the right
newline, carriage-return, or both, depending on the buffer's coding
system.

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]