[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Emacs Lisp for script writing
From: |
Cecil Westerhof |
Subject: |
Re: Using Emacs Lisp for script writing |
Date: |
Thu, 17 Dec 2009 00:37:55 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) |
Teemu Likonen <tlikonen@iki.fi> 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*))
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*))'
Using 'clisp dummy.lisp' works.
Now I need to learn ELisp and CLisp. ;-]
--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof