[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using Emacs Lisp for script writing
From: |
Pascal J. Bourguignon |
Subject: |
Re: Using Emacs Lisp for script writing |
Date: |
Tue, 22 Dec 2009 16:42:49 +0100 |
User-agent: |
Gnus/5.101 (Gnus v5.10.10) Emacs/22.3 (gnu/linux) |
Tim X <timx@nospam.dev.null> writes:
> Cecil Westerhof <Cecil@decebal.nl> writes:
>
>>
>> It is not a big deal, but when the script is put on another system and
>> on this system clisp is in another location, the script has to be
>> modified (or a link has to be created). But halving the execution time
>> is important enough.
>
> There is a trick used by other scripting languages to get around the
> issue of the script interpreter being in a different location and for
> those systems which only handle 30 characters in the #! line
>
> #!/bin/sh
> # the next line restarts using the interpreter foobar \
> exec foobar "$0" "$@"
>
> I wonder if something like this could work.
Sure.
[pjb@hubble :0.0 ~]$ cat ./s
#!/bin/sh
#| Both a lisp and sh comment.
exec clisp "$0" "$@"
|#
(princ "Hi") (terpri)
[pjb@hubble :0.0 ~]$ ./s
Hi
[pjb@hubble :0.0 ~]$
--
__Pascal Bourguignon__ http://www.informatimago.com/
WARNING: This product attracts every other piece of matter in the
universe, including the products of other manufacturers, with a
force proportional to the product of the masses and inversely
proportional to the distance between them.
- Re: Using Emacs Lisp for script writing, (continued)
- Re: Using Emacs Lisp for script writing, Tim X, 2009/12/21
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/21
- Re: Using Emacs Lisp for script writing, Tim X, 2009/12/22
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/22
- Re: Using Emacs Lisp for script writing, Pascal J. Bourguignon, 2009/12/22
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/22
- Re: Using Emacs Lisp for script writing, Tim X, 2009/12/22
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/23
- Message not available
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/21
- Re: Using Emacs Lisp for script writing, Tim X, 2009/12/22
- Re: Using Emacs Lisp for script writing,
Pascal J. Bourguignon <=
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/22
- Re: Using Emacs Lisp for script writing, Pascal J. Bourguignon, 2009/12/22
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/22
- Re: Using Emacs Lisp for script writing, Tim X, 2009/12/22
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/23
- Message not available
- Re: Using Emacs Lisp for script writing, Cecil Westerhof, 2009/12/21
Message not available