From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.help Subject: Re: Using Emacs Lisp for script writing Date: Thu, 17 Dec 2009 14:08:35 -0500 Message-ID: <4B2A81B3.4050302@gnu.org> References: <87hbrrrl3c.fsf@Traian.DecebalComp> <876386g7n7.fsf@iki.fi> <878wd2sd64.fsf@Traian.DecebalComp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1261077003 18931 80.91.229.12 (17 Dec 2009 19:10:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 17 Dec 2009 19:10:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 17 20:09:55 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NLLjQ-0004BM-Ke for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Dec 2009 20:09:48 +0100 Original-Received: from localhost ([127.0.0.1]:52392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLLjQ-0000Gs-J6 for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Dec 2009 14:09:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLLj0-0000Ek-IW for help-gnu-emacs@gnu.org; Thu, 17 Dec 2009 14:09:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLLiw-0000Ao-Kc for help-gnu-emacs@gnu.org; Thu, 17 Dec 2009 14:09:22 -0500 Original-Received: from [199.232.76.173] (port=44771 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLLiw-0000Ak-E9 for help-gnu-emacs@gnu.org; Thu, 17 Dec 2009 14:09:18 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:37733) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NLLiw-0000J1-6h for help-gnu-emacs@gnu.org; Thu, 17 Dec 2009 14:09:18 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1NLLim-0003pb-IS for help-gnu-emacs@gnu.org; Thu, 17 Dec 2009 20:09:08 +0100 Original-Received: from 38.105.200.250 ([38.105.200.250]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Dec 2009 20:09:08 +0100 Original-Received: from sds by 38.105.200.250 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Dec 2009 20:09:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 38.105.200.250 User-Agent: Thunderbird 2.0.0.22 (X11/20090625) In-Reply-To: <878wd2sd64.fsf@Traian.DecebalComp> X-Enigmail-Version: 0.95.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70708 Archived-At: Cecil Westerhof wrote: > Teemu Likonen writes: > >>> I already use 'emacs -batch' for scripting where no user input is >>> used, but I would like to use it also for interactive scripting. Until >>> now I did not find any usable information about this. Anybody using >>> Emacs for interactive scripts? >> I suggest using some Common Lisp implementation instead. They are more >> general-purpose Lisp dialects I like CLISP. >> >> #!/usr/bin/clisp >> (format *query-io* "Type something: ") >> (format t "You wrote: ~A" (read-line *query-io*)) works for me. > I'll try that. I already understood that elisp is 'old' and that clisp > has a lot more possibilities. One thing. Using your script gives: > ./dummy.lisp: line 3: format: command not found > ./dummy.lisp: line 4: syntax error near unexpected token `(' > ./dummy.lisp: line 4: `(format t "You wrote: ~A" (read-line *query-io*))' these are not clisp messages. these look like (ba)sh messages. > Using 'clisp dummy.lisp' works. maybe clisp is not installed as /usr/bin/clisp?