From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53290 Path: main.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.general Subject: Re: How to make gnus read something besides .gnus in batch mode Date: Mon, 30 Jun 2003 08:07:23 -0700 Organization: Still searching... Sender: ding-owner@lists.math.uh.edu Message-ID: References: <87smpsuqwk.fsf@indigo.shootybangbang.com> <87of0gujzn.fsf@indigo.shootybangbang.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1056987193 2968 80.91.224.249 (30 Jun 2003 15:33:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 30 Jun 2003 15:33:13 +0000 (UTC) Original-X-From: ding-owner+M1834@lists.math.uh.edu Mon Jun 30 17:33:11 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19X0bq-0000Vn-00 for ; Mon, 30 Jun 2003 17:30:26 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19X0c7-0005mN-00; Mon, 30 Jun 2003 10:30:43 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19X0Hp-0005h9-00 for ding@lists.math.uh.edu; Mon, 30 Jun 2003 10:09:45 -0500 Original-Received: (qmail 8899 invoked by alias); 30 Jun 2003 15:09:45 -0000 Original-Received: (qmail 8894 invoked from network); 30 Jun 2003 15:09:45 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 30 Jun 2003 15:09:45 -0000 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19X0GM-0006Gw-00 for ; Mon, 30 Jun 2003 17:08:14 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: ding@gnus.org Original-Received: from news by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19X0FA-00066j-00 for ; Mon, 30 Jun 2003 17:07:00 +0200 Original-Lines: 59 Original-X-Complaints-To: usenet@main.gmane.org User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:hRzwuHTp3v/LkJto4FrxDn/twvQ= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53290 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53290 John Paul Wallington writes: >>> Many arguments are deleted from `command-line-args' as they are >>> processed. How about checking the `noninteractive' variable ? [...] > I don't think it makes sense to heed `noninteractive' in a form that > is passed to emacs -batch -eval because that would be redundant. > > [Nevertheless, emacs -batch -eval 'noninteractive' is syntactically > correct at least, and to "make it do something" you could say emacs > -batch -eval '(print noninteractive)' or emacs -batch -eval '(if > noninteractive (print "foo"))'.] > > It makes more sense to heed `noninteractive' in your .gnus file. Yes, I was looking for the correct syntax to access it. You've supplied it. Test for boolean value. > emacs -q -no-site-file -batch -l ~/.my_gnus.el -f gnus-agent-batch > > Maybe it helps to frob the variable `gnus-init-file' to avoid loading > ~/.gnus ? For example, you could put (setq gnus-init-file > (expand-file-name "~/.my_gnus.el")) at the start of ~/.my_gnus.el > (untested). L. Mitchell posted something that does that same thing I think: emacs -batch --eval '(setq gnus-init-file "~/.not-dot-gnus")' \ -f gnus-agent-batch After being shown the proper stuff to look at and some experimentation. It looks like one cannot slurp the contents of command-line-args even by sticking it in a variable first thing: $ emacs -eval '(defvar myargs command-line-args)' \ -q -no-site-file -batch -eval '(print myargs)' ("emacs" "-eval" "(defvar myargs command-line-args)" "-eval" "(print myargs)") Still doesn't know about `-q', `-no-stite-file', or `-batch' But noninteractive knows its a -batch command. cat new.el (message "Hello World from new.el") (if noninteractive (print "Running noninteractive")) ========= $ emacs -q -no-site-file -batch -l ./new.el Hello World from new.el "Running noninteractive" I have enough to solve my problme but still wondered if there just is no way to grab all of command-line-args before processing begins? Oh, and where is the extra newline coming from in the above output?