From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Volkan YAZICI Newsgroups: gmane.emacs.help Subject: Emacs Schell Scripting Date: Wed, 25 Mar 2009 06:26:41 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1237988473 7411 80.91.229.12 (25 Mar 2009 13:41:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Mar 2009 13:41:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 25 14:42:30 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LmTMr-0001sh-T2 for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 14:42:06 +0100 Original-Received: from localhost ([127.0.0.1]:34530 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LmTLU-0006B1-VN for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Mar 2009 09:40:41 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!v39g2000yqm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 85.235.85.86 Original-X-Trace: posting.google.com 1237987601 21311 127.0.0.1 (25 Mar 2009 13:26:41 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 25 Mar 2009 13:26:41 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v39g2000yqm.googlegroups.com; posting-host=85.235.85.86; posting-account=xozGQQoAAAD99EQH9srmwM1ajggyokYW User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.0.7) Gecko/2009021906 Firefox/3.0.7,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167976 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63266 Archived-At: 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.