emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcelo de Moraes Serpa <celoserpa@gmail.com>
To: nicholas.dokos@hp.com
Cc: Org Mode <emacs-orgmode@gnu.org>, Nick Daly <nick.m.daly@gmail.com>
Subject: Re: Batch execution and --script
Date: Wed, 29 Aug 2012 13:35:45 -0500	[thread overview]
Message-ID: <CACHMzOGCPE0rtozs+oxXRdfvibrc-Sw4M9cigEq9PcL17iJnuA@mail.gmail.com> (raw)
In-Reply-To: <3611.1346264968@alphaville>

[-- Attachment #1: Type: text/plain, Size: 1516 bytes --]

Hi Nick,

Thanks for turning it into a concise example :)

Is that somewhere in the manual or Worg? Perhaps it should be added. I
never contributed to Worg, I will look into how tonight.

This is a subject that should be explored more. I see a lot of potential in
having CLI .el scripts (i.e taking the emacs GUI out of the equation).

- Marcelo.


On Wed, Aug 29, 2012 at 1:29 PM, Nick Dokos <nicholas.dokos@hp.com> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2393 bytes --]

  reply	other threads:[~2012-08-29 18:35 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
2012-08-29 18:35     ` Marcelo de Moraes Serpa [this message]
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=CACHMzOGCPE0rtozs+oxXRdfvibrc-Sw4M9cigEq9PcL17iJnuA@mail.gmail.com \
    --to=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --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).