emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Nick Daly <nick.m.daly@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	Marcelo de Moraes Serpa <celoserpa@gmail.com>
Subject: Re: Batch execution and --script
Date: Wed, 29 Aug 2012 14:29:28 -0400	[thread overview]
Message-ID: <3611.1346264968@alphaville> (raw)
In-Reply-To: Message from Nick Daly <nick.m.daly@gmail.com> of "Wed, 29 Aug 2012 11:42:52 CDT." <CAM-YhhDHOOboMwUNS6zzOojOH_t6eNmTJ5pQ01hqb_kDQeum5g@mail.gmail.com>

Nick Daly <nick.m.daly@gmail.com> wrote:

> On Wed, Aug 29, 2012 at 10:47 AM, Marcelo de Moraes Serpa
> <celoserpa@gmail.com> wrote:
> > Hey guys,
> >
> > Regarding this: http://orgmode.org/manual/Batch-execution.html
> >
> > I also had success using --script, as in:
> >
> > #!/Applications/Emacs.app/Contents/MacOS/Emacs --script
> >
> > In the top of a .el file. You can then chmod it to be executable and run it.
> 
> Would you mind sharing a simple .el file you'd use that way?  The
> site's example is a bash script, and I wonder how much cleaner a .el
> file would be.
> 

Marcelo posted a larger example, but maybe a very small example might be
helpful. Put the following in some file (I called it hello.el but the
name does not really matter):

--8<---------------cut here---------------start------------->8---
#! /usr/local/bin/emacs --script

(message "Hello World!")
--8<---------------cut here---------------end--------------->8---

Make it executable:

  chmod +x hello.el

and run it:

  ./hello.el

Nick

  parent reply	other threads:[~2012-08-29 18:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 15:47 Batch execution and --script Marcelo de Moraes Serpa
2012-08-29 16:42 ` Nick Daly
2012-08-29 17:50   ` Marcelo de Moraes Serpa
2012-08-30  5:34     ` Bastien
2012-11-28  2:18       ` Bernt Hansen
2012-12-04 14:25         ` Bastien
2012-08-29 18:29   ` Nick Dokos [this message]
2012-08-29 18:35     ` Marcelo de Moraes Serpa
2012-08-29 18:59       ` Thorsten Jolitz
2012-08-29 19:13       ` Nick Dokos

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3611.1346264968@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nick.m.daly@gmail.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).