[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cool and Useful LISP for the .emacs file
From: |
Matthew Kennedy |
Subject: |
Re: Cool and Useful LISP for the .emacs file |
Date: |
Wed, 12 Nov 2003 08:12:20 GMT |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux) |
David Masterson <dsm@rawbw.com> writes:
>>>>>> Artur Hefczyc writes:
>
[...]
>> I like this idea! I would like to use elisp as scripting language
>> also. However I would like to know if it is possible to use it that
>> way. I mean, lets assume I create elisp script to update my Linux box
>> system with new releases of some packages.
>
>> Is it possible to run it from command line like all other scripts,
>> bash, perl etc.?
>
>> I mean file script starting from:
>> #!/usr/bin/emacs
>
>> Or any other elisp interpreter?
>
> Given how big Emacs is, I would think that it would be best to start
> emacs in background (say, from your .login) and then use something
> like gnudoit or emacsclient to send your elisp to the background
> Emacs. Done correctly, I would think that it would execute your
> scripts much faster, no?
How about using:
,----[ C-h f dump-emacs RET ]
| dump-emacs is a built-in function.
| (dump-emacs FILENAME SYMFILE)
|
| Dump current state of Emacs into executable file FILENAME.
| Take symbols from SYMFILE (presumably the file you executed to run Emacs).
| This is used in the file `loadup.el' when building Emacs.
|
| You must run Emacs in batch mode in order to dump it.
`----
This way you can have your scripts compiled and dumped into a
standalone executable. Its very fast[1].
If you don't like that, try placing the following at the top of your
emacs lisp scripts, and then chmod +x the script.
:;exec emacs --batch --no-init-file --no-site-file --load $0 --func main $*
Footnotes:
[1] http://www.emacswiki.org/cgi-bin/wiki/DumpingEmacs
--
Matthew Kennedy
- Re: Cool and Useful LISP for the .emacs file, (continued)
- Message not available
- Re: Cool and Useful LISP for the .emacs file, Jody M. Klymak, 2003/11/07
- Re: Cool and Useful LISP for the .emacs file, Jesper Harder, 2003/11/07
- Re: Cool and Useful LISP for the .emacs file, Kin Cho, 2003/11/07
- Re: Cool and Useful LISP for the .emacs file, Artur Hefczyc, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, Thien-Thi Nguyen, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, David Kastrup, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, Artur Hefczyc, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, Artur Hefczyc, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, Kin Cho, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, David Masterson, 2003/11/12
- Re: Cool and Useful LISP for the .emacs file,
Matthew Kennedy <=
- Re: Cool and Useful LISP for the .emacs file, Pascal Bourguignon, 2003/11/12
- Re: Cool and Useful LISP for the .emacs file, Artur Hefczyc, 2003/11/13
- Re: Cool and Useful LISP for the .emacs file, Tim X, 2003/11/23
- Re: Cool and Useful LISP for the .emacs file, Joe Fineman, 2003/11/08
- Re: Cool and Useful LISP for the .emacs file, Stefan Monnier, 2003/11/10
- Re: Cool and Useful LISP for the .emacs file, Thien-Thi Nguyen, 2003/11/10
- Re: Cool and Useful LISP for the .emacs file, Burton Samograd, 2003/11/10
- Re: Cool and Useful LISP for the .emacs file, Alan Mackenzie, 2003/11/11
- Re: Cool and Useful LISP for the .emacs file, Jesper Harder, 2003/11/11
- Re: Cool and Useful LISP for the .emacs file, Burton Samograd, 2003/11/11