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

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

Re: File manipulation in elisp?


From: Barry Margolin
Subject: Re: File manipulation in elisp?
Date: Wed, 20 Jun 2007 21:59:16 -0400
User-agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X)

In article <address@hidden>,
 Trastabuga <address@hidden> wrote:

> On Jun 20, 3:05 pm, Stefan Monnier <address@hidden> wrote:
> > > Is there an API for file management in elisp without opening files in
> > > buffers?
> >
> > No.
> >
> > > directory. So every time I compile a project, as a post-build step I
> > > want to look for some pre-defined file in the directory, read its
> > > content, evaluate the content into elisp and execute it.
> >
> > How 'bout just using `load'?
> >
> >         Stefan
> 
> Thank you Stefan, that works.
> I wonder is there any reason there is no such API for file
> manipulation? No use for it?

Because it would be an enormous amount of work to replicate all the 
operations you can do on buffers in a file API.  And to implement most 
of these things would require copying the file into memory, just like 
opening the file into a buffer.  For instance, most filesystems don't 
provide any way to insert and delete directly in files, you can only 
overwrite them.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


reply via email to

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