From: Matthew Kennedy <mbkennedy@austin.rr.com>
Subject: Re: Cool and Useful LISP for the .emacs file
Date: Wed, 12 Nov 2003 08:12:20 GMT [thread overview]
Message-ID: <87ad72xb34.fsf@killr.ath.cx> (raw)
In-Reply-To: m3islqw4kq.fsf@batcave.m198-149.dsl.rawbw.com
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
next prev parent reply other threads:[~2003-11-12 8:12 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3343.1068146343.21628.help-gnu-emacs@gnu.org>
2003-11-06 23:45 ` Cool and Useful LISP for the .emacs file Kevin Rodgers
2003-11-07 4:10 ` Bruce Ingalls
2003-11-07 9:08 ` roodwriter
2003-11-07 16:58 ` Kevin Rodgers
2003-11-07 18:35 ` roodwriter
2003-11-08 18:01 ` roodwriter
2003-11-11 10:48 ` Oliver Scholz
2003-11-07 11:27 ` Gareth Rees
2003-11-07 14:06 ` Adam Hardy
[not found] ` <mailman.3403.1068214062.21628.help-gnu-emacs@gnu.org>
2003-11-07 14:28 ` David Kastrup
2003-11-07 16:54 ` Dan Anderson
2003-11-07 17:19 ` Rob Thorpe
[not found] ` <mailman.0.1068227823.2005.help-gnu-emacs@gnu.org>
2003-11-07 17:45 ` Jody M. Klymak
2003-11-07 18:20 ` Kevin Rodgers
2003-11-07 19:37 ` Dan Anderson
2003-11-08 1:28 ` Thien-Thi Nguyen
[not found] ` <mailman.11.1068237562.2005.help-gnu-emacs@gnu.org>
2003-11-07 22:17 ` Jody M. Klymak
2003-11-08 1:22 ` Jesper Harder
2003-11-08 3:23 ` Kin Cho
2003-11-08 10:34 ` Artur Hefczyc
2003-11-08 13:20 ` Thien-Thi Nguyen
2003-11-08 20:06 ` David Kastrup
2003-11-08 21:45 ` Artur Hefczyc
2003-11-08 22:02 ` Artur Hefczyc
2003-11-09 3:20 ` Kin Cho
2003-11-12 5:15 ` David Masterson
2003-11-12 8:12 ` Matthew Kennedy [this message]
2003-11-12 18:21 ` Pascal Bourguignon
2003-11-13 19:54 ` Artur Hefczyc
2003-11-23 8:08 ` Tim X
2003-11-08 23:15 ` Joe Fineman
2003-11-10 15:59 ` Stefan Monnier
2003-11-10 20:58 ` Thien-Thi Nguyen
2003-11-10 21:00 ` Burton Samograd
2003-11-11 10:34 ` Alan Mackenzie
2003-11-11 14:32 ` Jesper Harder
2003-11-11 17:00 ` Burton Samograd
2003-11-11 17:00 ` Burton Samograd
2003-11-11 20:04 ` Alan Mackenzie
2003-11-08 10:15 ` Oliver Scholz
2003-11-08 12:03 ` Orm Finnendahl
2003-11-08 14:09 ` Ole Laursen
2003-11-23 8:02 ` Tim X
2003-12-07 15:56 ` Kai Grossjohann
2003-11-07 18:09 ` Reiner Steib
2003-11-07 18:37 ` lawrence mitchell
2003-11-08 17:06 ` Reiner Steib
2003-11-07 23:41 ` Edward Dodge
2003-11-10 16:04 ` Stefan Monnier
2003-11-10 21:17 ` kgold
2003-11-11 10:43 ` Alan Mackenzie
2003-11-11 15:39 ` Eli Zaretskii
2003-11-11 15:52 ` Stefan Monnier
2003-11-11 17:35 ` Thien-Thi Nguyen
2003-11-12 7:25 ` Lars Brinkhoff
[not found] ` <mailman.197.1068625639.2005.help-gnu-emacs@gnu.org>
2003-11-12 10:22 ` Colin Marquardt
2003-11-12 11:15 ` David Kastrup
2003-11-12 13:47 ` Stefan Monnier
[not found] <E1AIRNX-0002YI-H9@monty-python.gnu.org>
2003-11-08 22:01 ` Joe Corneli
[not found] <E1AI57v-00032q-9p@monty-python.gnu.org>
2003-11-07 14:31 ` Joe Corneli
2003-11-06 19:18 Dan Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ad72xb34.fsf@killr.ath.cx \
--to=mbkennedy@austin.rr.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).