all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Volkan YAZICI <volkan.yazici@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Emacs Schell Scripting
Date: Wed, 25 Mar 2009 06:26:41 -0700 (PDT)	[thread overview]
Message-ID: <af4c7b3f-96d6-4bc7-a3e9-f2a0e51b6247@v39g2000yqm.googlegroups.com> (raw)

Hi,

I have written a small wrapper shell script over htmlize.el to output
syntax highlighted forms of buffers into HTML files. (Why bothering
with syntax highligting libraries while there is emacs already?) But
I'm having some troubles with command line arguments in emacs shell
scripts. Consider below output:

  $ cat example.el
  #!/usr/local/bin/emacs --script
  (message "ARGV: %s\n" command-line-args)

  $ ./example.el foo bar baz
  ARGV: (/usr/local/bin/emacs -scriptload ./example.el foo bar baz)

In the initialization of my program, I create a custom args variable:

  (defvar args (cons (first command-line-args) (subseq command-line-
args 3)))

But isn't there a more portable and concise way of doing this? (OTOH,
I don't know if "-scriptload ./example.el" part differs between
different emacs versions.)


Regards.


             reply	other threads:[~2009-03-25 13:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-25 13:26 Volkan YAZICI [this message]
2009-03-26  0:02 ` Emacs Schell Scripting Xah Lee
2009-03-26  6:19   ` Xah Lee
2009-03-27  8:35     ` TomSW
2009-03-26 19:21 ` Johan Bockgård
2009-03-27 20:05   ` Volkan YAZICI

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=af4c7b3f-96d6-4bc7-a3e9-f2a0e51b6247@v39g2000yqm.googlegroups.com \
    --to=volkan.yazici@gmail.com \
    --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.