From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53294 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 17:15:53 -0700 Organization: Still searching... Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1057018561 5012 80.91.224.249 (1 Jul 2003 00:16:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2003 00:16:01 +0000 (UTC) Original-X-From: ding-owner+M1838@lists.math.uh.edu Tue Jul 01 02:15:57 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 19X8oP-0001II-00 for ; Tue, 01 Jul 2003 02:15:57 +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 19X8oZ-0007Ae-00; Mon, 30 Jun 2003 19:16:07 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19X8oR-0007AY-00 for ding@lists.math.uh.edu; Mon, 30 Jun 2003 19:15:59 -0500 Original-Received: (qmail 25648 invoked by alias); 1 Jul 2003 00:15:59 -0000 Original-Received: (qmail 25643 invoked from network); 1 Jul 2003 00:15:59 -0000 Original-Received: from main.gmane.org (80.91.224.249) by sclp3.sclp.com with SMTP; 1 Jul 2003 00:15:59 -0000 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 19X8nw-0001Fn-00 for ; Tue, 01 Jul 2003 02:15:28 +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 19X8nw-0001Fe-00 for ; Tue, 01 Jul 2003 02:15:28 +0200 Original-Lines: 138 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:B6lnLJPsv2K3gxZty96a55JF/bY= Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53294 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53294 --=-=-= Harry Putnam writes: > I want to run batch commands but not read my standard .emacs .gnus > site-start.el. I've learned from the past that things in any init > files that write to standard out like (message) can cause I/O errors. > But I like having some of those in there... so: > > I compile an init file on the fly for gnus (or emacs) to read. But > how can I aim gnus at only that file? Even with the kind help I've gotten on this, I'm still having problems with it. I think the general mechanism is sound but have trouble figuring out why it fails, or partially fails. The init file created is attached as text/plain at the end so you should be able to inline it with a . The full command line: emacs -q -no-site-file -batch \ -eval '(setq gnus-init-file "/tmp/my_gnus_init.el")'\ -f gnus-agent-batch If I run this as is, I get these kind of errors: $ emacs -q -no-site-file -batch -eval '(setq gnus-init-file "/tmp/my_gnus_init.el")' -f gnus-agent-batch Reading /home/reader/.newsrc-enews.newsguy.com.eld... Reading active file from enews.newsguy.com via nntp... Reading active file via nnml... Opening nnml server... nnml: Reading incoming mail from directory... Wrote /home/reader/Mail/bperl/12471 1)**Mail source error ((void-function nnheader-parse-naked-head)). Continue? (yes or no) yes nnml: Reading incoming mail from file... Processing mail from ~/.emacs-mail-crash-box... Creating mail directory /home/reader/Mail/mail/misc/ Wrote /home/reader/Mail/mail/misc/8 2)**Symbol's function definition is void: nnheader-parse-naked-head [Errors marked by `N)**' Two things of note here 1) I never had a mail box named `/home/reader/Mail/mail/misc/' before and there is nothing in the lone init file to suggest it. 2) Even if I delete .emacs-mail-crash-box. It will give the same message. So changing the command line to make sure all gnusy like stuff is loaded by saying -f gnus before -f gnus-agent-batch: emacs -q -no-site-file -batch \ -eval '(setq gnus-init-file "/tmp/my_gnus_init.el")' -f gnus -f gnus-agent-batch And deleting .emacs-mail-crash-box, removing Mail/mail/misc and removing the reference to it in .newsrc.eld. Produces a different kind of error: (Also note that the init file can be evalled with no errors) $ emacs -q -no-site-file -batch \ > -eval '(setq gnus-init-file "/tmp/my_gnus_init.el")' \ > -f gnus -f gnus-agent-batch Reading /home/reader/.newsrc-enews.newsguy.com.eld... Reading active file from enews.newsguy.com via nntp... Generating the cache active file... Generating the cache active file...done No new newsgroups Checking new news... Opening nntp server on nntp.perl.org... Opening nndir server on /anex/mail.bk... Opening nndir server on /home/reader/Mail/prinb... Opening nndraft server... Opening nntp server on news.gmane.org... Opening nntp server on news.easysw.com... Opening nntp server on news.gmane.org... Opening nntp server on news.west.cox.net... Opening nntp server on news.gmane.org... Opening nntp server on news.west.cox.net... Opening nndir server on /tmp/mns... Opening nndir server on /tmp/mns1... Checking new news...done Opening nntp server on enews.newsguy.com... Reading active file from enews.newsguy.com via nntp... Checking new news... Opening nntp server on nntp.perl.org... Opening nndir server on /anex/mail.bk... Opening nndir server on /home/reader/Mail/prinb... Opening nntp server on news.gmane.org... Opening nntp server on news.easysw.com... Opening nntp server on news.gmane.org... Opening nntp server on news.west.cox.net... Opening nntp server on news.gmane.org... Opening nntp server on news.west.cox.net... Opening nndir server on /tmp/mns... Opening nndir server on /tmp/mns1... Checking new news...done Error ((wrong-type-argument number-or-marker-p nil)). Continue? (y or n) y Error ((wrong-type-argument number-or-marker-p nil)). Continue? (y or n) Please answer y or n. Error ((wrong-type-argument number-or-marker-p nil)). Continue? (y or n) y Finished fetching articles into the Gnus agent --=-=-= Content-Disposition: attachment; filename=my_gnus_init.el Content-Description: init file (add-to-list 'load-path "/usr/local/gnus/lisp") (setq mail-user-agent 'gnus-user-agent) (setq max-lisp-eval-depth 2000) (setq message-syntax-checks '((sender . disabled))) (defun message-make-fqdn () "My hacked message-id." "newsguy.com") (setq gnus-expert-user t) (setq gnus-agent-short-article 50) (setq gnus-use-adaptive-scoring nil) (setq mail-sources '((file :path "/var/spool/mail/reader") (directory :path "/home/reader/spool/" :suffix ".in"))) (setq gnus-extra-headers '(To Newsgroups Keywords )) (setq nnmail-extra-headers gnus-extra-headers) (setq gnus-ignored-from-addresses "Harry Putnam") (setq message-user-organization "Still searching...") (setq gnus-select-method '(nntp "enews.newsguy.com")) (setq user-mail-address "reader@newsguy.com") (setq gnus-check-new-newsgroups 'ask-server) (setq gnus-agent-handle-level 3) (setq gnus-activate-foreign-newsgroups 3) (setq mail-source-delete-incoming t) (setq gnus-use-long-file-name t) (setq nnmail-crosspost nil) (setq gnus-secondary-select-methods '((nnml ""))) --=-=-=--