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: Helmut Eller
Subject: Re: elisp - inserting block of text
Date: Wed, 01 Dec 2010 18:15:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

* Stefan Monnier [2010-12-01 16:13] 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.
>
> Line endings in Emacs buffers are always "unix style" (i.e. a single LF
> char).  They get converted on the fly when saving the buffer to a file
> (or when passing the buffer's content to a process), depending on the
> coding-system used which specifies which kind of line-ending is desired.

Can this code 

(with-temp-buffer
  (insert "\r\n")
  (buffer-size))

ever return 1 or does it always return 2?

Helmut


reply via email to

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