[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: need help with editing multiple files in a directory
From: |
Joel J. Adamson |
Subject: |
Re: need help with editing multiple files in a directory |
Date: |
Thu, 19 Jul 2007 16:55:06 -0400 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
I know you asked this as a lisp question, but sed may be better at
accomplishing this, as long as you're on a Unix-like system. On
Windows, sed would be terrible at this, since it doesn't exist ;)
Joel
bittna@gmail.com writes:
> Hello,
> I have multiple files in a directory that need a line added at a
> certain point in the file. I wrote a lisp expression to do it, but I
> have to load the file, then run the command on the buffer, the save
> the file and I lose my place. I used dired to do a find and replace
> on all of the files I needed, but how do I run my lisp expression on
> all of the files?
>
> Also how do I loop through all the buffers using lisp and switch into
> each buffer and do something, then move to the next buffer?
>
> Thanks!!!
>
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
http://www.gnu.org/philosophy/why-free.html