From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tim Heaney <theaney@cablespeed.com> Newsgroups: gmane.emacs.help Subject: Re: Running emacs lisp programs from command line or script Date: Thu, 11 Dec 2003 01:17:46 -0500 Organization: Posted via Supernews, http://www.supernews.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87brqfx4hh.fsf@mrbun.watterson> References: <br8uei$1vjb$1@news.wplus.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1071124426 31668 80.91.224.253 (11 Dec 2003 06:33:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2003 06:33:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 11 07:33:39 2003 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUKOI-0003gf-02 for <geh-help-gnu-emacs@m.gmane.org>; Thu, 11 Dec 2003 07:33:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AULHZ-0003sh-JO for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Dec 2003 02:30:45 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!pd7cy2so!shaw.ca!sn-xit-03!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help X-Attribution: Tim X-URL: <http://w3.mivlmd.cablespeed.com/~theaney/> X-Face: 1d:<$[diLo"J3; Pu?&s98HAEv|@!_`rn#ymrsx]YVUA^?MOofFnmkmI{r!Z_V=6AmO_Yf7H LAv@J@y4f-!P-{<Gd@7f0vxg18IJclArv-@=PMsfR`4Fh9(GA5*_[ User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Rational FORTRAN, linux) Cancel-Lock: sha1:9P6OS76RkjUfn/nuQA4jU9abCe4= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 20 Original-Xref: shelby.stanford.edu gnu.emacs.help:119211 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org> List-Unsubscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://mail.gnu.org/pipermail/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <http://mail.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15150 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15150 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