unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Heaney <theaney@cablespeed.com>
Subject: Re: Running emacs lisp programs from command line or script
Date: Thu, 11 Dec 2003 01:17:46 -0500	[thread overview]
Message-ID: <87brqfx4hh.fsf@mrbun.watterson> (raw)
In-Reply-To: br8uei$1vjb$1@news.wplus.net

Ryan Newton <newton@ai.mit.edu> writes:
>
> If I want to make a command line invokable script to, say, convert
> emacs enriched text documents to plain ones, how do I do it?  I want
> emacs to start up, open said document, save it in plain text mode.
> Easy to write the emacs lisp code, but how do I call it from the
> command line.  What's the "batch" mode for emacs?

Batch. You can just run something like

  emacs -batch -l elispfile -f function inputfile

from the command line. Or make your Emacs Lisp file executable and try
the sesquicolon

  http://mail.gnu.org/archive/html/bug-gnu-emacs/2002-08/msg00229.html

I hope this helps,

Tim

  parent reply	other threads:[~2003-12-11  6:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-11  1:13 Running emacs lisp programs from command line or script Ryan Newton
2003-12-11  5:44 ` Eli Zaretskii
2003-12-11  6:17 ` Tim Heaney [this message]
2003-12-11 17:52   ` 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=87brqfx4hh.fsf@mrbun.watterson \
    --to=theaney@cablespeed.com \
    /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).