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

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

Re: how to read file's content using elisp?


From: Eli Zaretskii
Subject: Re: how to read file's content using elisp?
Date: Thu, 16 Sep 2004 13:43:58 +0300

> From: Rokia <Rokiadd@yahoo.com.cn.discuss>
> Date: Thu, 16 Sep 2004 00:03:09 +0800
> 
> 
> what I want to do is reading a file's content into a string
> variable.

That is actually not a very good idea in Emacs Lisp.  In Emacs Lisp,
it is much easier to manipulate text in a buffer than to manipulate
text in a string.  For starters, buffers are managed memory-wise much
more efficiently (so the code that uses a buffer is generally faster),
and there are many functions that only work on buffers.

So I suggest to redesign the solution to whatever problem you are
trying to deal with, such that you use a buffer (perhaps a temporary
one) instead of a string.

What problem was that, anyway?



reply via email to

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