From: Pascal Bourguignon <pjb@informatimago.com>
To: help-gnu-emacs@gnu.org
Subject: Re: running emacs in batch mode
Date: Sat, 03 Feb 2007 23:16:23 +0100 [thread overview]
Message-ID: <87ps8qubt4.fsf@thalassa.informatimago.com> (raw)
In-Reply-To: mailman.3966.1170534615.2155.help-gnu-emacs@gnu.org
Helfer Thomas <helferthomas@free.fr> writes:
> I want to use emacs to indent a lot of C++ files.
> I tried to do this :
>
> $ emacs --batch youpie.cxx -f mark-whole-buffer -f indent-region -f
> save-buffer
>
> but didnot work. Can somebody tell me what I shall do ?
I would rather use a script file:
emacs --batch -q -l script.el
with script.el containing whatever you want, in emacs lisp, something
like:
(dolist (file (file-expand-wildcards "/home/ht/src/*.cxx"))
(find-file file)
(mark-whole-buffer)
(indent-region (point-min) (point-max))
(save-buffer 0)
(kill-buffer (current-buffer)))
--
__Pascal Bourguignon__ http://www.informatimago.com/
Pour moi, la grande question n'a jamais été: «Qui suis-je? Où vais-je?»
comme l'a formulé si adroitement notre ami Pascal, mais plutôt:
«Comment vais-je m'en tirer?» -- Jean Yanne
next parent reply other threads:[~2007-02-03 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3966.1170534615.2155.help-gnu-emacs@gnu.org>
2007-02-03 22:16 ` Pascal Bourguignon [this message]
2007-02-14 12:55 ` running emacs in batch mode Peter Tury
2007-02-03 20:30 Helfer Thomas
2007-02-06 7:31 ` Kevin Rodgers
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=87ps8qubt4.fsf@thalassa.informatimago.com \
--to=pjb@informatimago.com \
--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).