all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: File manipulation in elisp?
Date: Wed, 20 Jun 2007 21:59:16 -0400	[thread overview]
Message-ID: <barmar-664BAC.21591620062007@comcast.dca.giganews.com> (raw)
In-Reply-To: 1182370747.377086.236690@a26g2000pre.googlegroups.com

In article <1182370747.377086.236690@a26g2000pre.googlegroups.com>,
 Trastabuga <lispercat@gmail.com> wrote:

> On Jun 20, 3:05 pm, Stefan Monnier <monn...@iro.umontreal.ca> 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, barmar@alum.mit.edu
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	other threads:[~2007-06-21  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20 17:35 File manipulation in elisp? Trastabuga
2007-06-20 19:05 ` Stefan Monnier
2007-06-20 20:19   ` Trastabuga
2007-06-21  1:59     ` Barry Margolin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=barmar-664BAC.21591620062007@comcast.dca.giganews.com \
    --to=barmar@alum.mit.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.