[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suppressing load messages
From: |
David Combs |
Subject: |
Re: Suppressing load messages |
Date: |
Mon, 31 Mar 2008 02:34:37 +0000 (UTC) |
In article <87zlt39tnn.fsf@kobe.laptop>,
Giorgos Keramidas <keramida@ceid.upatras.gr> wrote:
>On Wed, 12 Mar 2008 16:32:36 -0700, Glenn Morris <rgm+news@stanford.edu> wrote:
>> Brendan Halpin wrote:
>>
>>> The -Q, -batch and -no-site-file arguments aren't accepted on the
>>> "#! /usr/bin/emacs --script" line.
>>
>> That's an execve issue - you can only have a single argument after the
>> interpreter on any #! line.
>
>Exactly!
>
>> You could always do something like:
>>
>> #!/bin/sh
>>
>> /usr/bin/emacs -Q --script <<EOF
>> ...stuff...
>> EOF
>
>This lets the shell interpret the Emacs script source.
>
>The following prints nothing here for me:
>
> #!/bin/sh
>
> emacs -Q -batch -l /dev/stdin <<EOF
> (let ((var-list (list 'foo$HOME 'bar$LOGNAME)))
> (dolist (var var-list)
> (message "Hello %s" var)))
> EOF
>
>I ended up writing a short shell wrapper, called `emacs-script', like
>the following:
>
> #!/bin/sh
> exec emacs -Q -batch -l "$@"
>
>This lets me write scripts in Elisp by using:
>
> #!/usr/bin/env emacs-script
>
> (let ((var-list (list 'foo$HOME 'bar$LOGNAME)))
> (dolist (var var-list)
> (message "Hello %s" var)))
>
>which correctly prints:
>
> $ ./hw.el
> Hello foo$HOME
> Hello bar$LOGNAME
> $
>
>HTH,
>Giorgos
>
Looks clever, but I don't really understand it (yet).
Maybe you give a few more details about what you gain (apparantely
a lot) via the shell-wrapper? Thanks!
Also, if a general technique is what it is, where else might you use
such a thing?
Thanks!
David
- Re: Suppressing load messages, (continued)
- Re: Suppressing load messages, Lennart Borgman (gmail), 2008/03/12
- Re: Suppressing load messages, Glenn Morris, 2008/03/12
- Re: Suppressing load messages, Glenn Morris, 2008/03/12
- Re: Suppressing load messages, Glenn Morris, 2008/03/12
- Re: Suppressing load messages, Lennart Borgman (gmail), 2008/03/12
- Re: Suppressing load messages, Giorgos Keramidas, 2008/03/13
- Re: Suppressing load messages,
David Combs <=
- Message not available
- Re: Suppressing load messages, Brendan Halpin, 2008/03/13