all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs Schell Scripting
@ 2009-03-25 13:26 Volkan YAZICI
  2009-03-26  0:02 ` Xah Lee
  2009-03-26 19:21 ` Johan Bockgård
  0 siblings, 2 replies; 6+ messages in thread
From: Volkan YAZICI @ 2009-03-25 13:26 UTC (permalink / raw)
  To: help-gnu-emacs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-27 20:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-25 13:26 Emacs Schell Scripting Volkan YAZICI
2009-03-26  0:02 ` 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

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.