From: jadamson@partners.org (Joel J. Adamson)
To: help-gnu-emacs@gnu.org
Subject: Re: need help with editing multiple files in a directory
Date: Thu, 19 Jul 2007 16:55:06 -0400 [thread overview]
Message-ID: <873azki05x.fsf@W0053328.mgh.harvard.edu> (raw)
In-Reply-To: 1184860347.592401.221020@22g2000hsm.googlegroups.com
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
next prev parent reply other threads:[~2007-07-19 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-19 15:52 need help with editing multiple files in a directory bittna
2007-07-19 16:24 ` Pascal Bourguignon
2007-07-19 20:55 ` Joel J. Adamson [this message]
2007-07-19 22:49 ` Colin S. Miller
2007-07-20 5:33 ` Mathias Dahl
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=873azki05x.fsf@W0053328.mgh.harvard.edu \
--to=jadamson@partners.org \
--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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).