From: David Kastrup <dak@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: access command line (arguments) from emacs --script
Date: Mon, 26 Jul 2010 22:11:54 +0200 [thread overview]
Message-ID: <87tynmj94l.fsf@lola.goethe.zz> (raw)
In-Reply-To: b6486c70-509e-4912-b16b-b89038d3c35d@j8g2000yqd.googlegroups.com
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
prev parent reply other threads:[~2010-07-26 20:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 13:39 access command line (arguments) from emacs --script Terrence Brannon
2010-07-26 20:11 ` David Kastrup [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tynmj94l.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.