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

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

Emacs Schell Scripting


From: Volkan YAZICI
Subject: Emacs Schell Scripting
Date: Wed, 25 Mar 2009 06:26:41 -0700 (PDT)
User-agent: G2/1.0

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 via email to

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