help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: access command line (arguments) from emacs --script


From: David Kastrup
Subject: Re: access command line (arguments) from emacs --script
Date: Wed, 08 Dec 2010 15:21:06 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Terrence Brannon <metaperl@gmail.com> writes:

> Hello, I am interested in accessing the arguments passed to an emacs
> script.
>
> I am interested in either:
> (a) accessing what would be $1 to a shell program, in other words
>
> ./emacs-script.el 'here is dollar one... how does emacs get it'

(pop argv)

> (b) accessing an argument specified as an argument either in long or
> short format:
>
> ./emacs-script.el --argument 'here is the argument .. how to get with
> emacs'

The interpretation is up to you.  Argument processing is positioned
after emacs-script.el.

If argv is not yet available in your version of Emacs, you might have to
use command-line-args-left instead.

-- 
David Kastrup


reply via email to

[Prev in Thread] Current Thread [Next in Thread]