From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: File manipulation in elisp? Date: Wed, 20 Jun 2007 21:59:16 -0400 Organization: Symantec Message-ID: References: <1182360903.792302.111830@i13g2000prf.googlegroups.com> <1182370747.377086.236690@a26g2000pre.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1182393640 28806 80.91.229.12 (21 Jun 2007 02:40:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2007 02:40:40 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 21 04:40:39 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I1Cb6-0002Zr-Uo for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jun 2007 04:40:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I1Cb6-0005wQ-CY for geh-help-gnu-emacs@m.gmane.org; Wed, 20 Jun 2007 22:40:36 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.140.MISMATCH!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 20 Jun 2007 20:59:16 -0500 Original-Newsgroups: gnu.emacs.help Mail-Copies-To: nobody User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-Copies-To: never Original-Lines: 33 Original-NNTP-Posting-Host: 24.34.108.171 Original-X-Trace: sv3-1nDoGBGQkvC1kmPWJrHm/YKs/o2nKslk6f40QESvfG9WPmgJ0x+tQ4+hhmiCyGSBJGf4BvvVicy8EJ8!h9ZSbmmxvq+OVsH2iJFiz3U/RyFBQfgE4HCmbxxBumDb2fwhoWZvcL1Q3vGSC3DU5+FwKjTAHY1w!HLvox4plNnBB3KX3DgzdC4uQ7qp7DljZEAJKNrk2ZA== Original-X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.34 Original-Xref: shelby.stanford.edu gnu.emacs.help:149607 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45194 Archived-At: In article <1182370747.377086.236690@a26g2000pre.googlegroups.com>, Trastabuga wrote: > On Jun 20, 3:05 pm, Stefan Monnier 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 ***