Gnus development mailing list
 help / color / mirror / Atom feed
From: Harry Putnam <reader@newsguy.com>
Subject: Re: How to make gnus read something besides .gnus in batch mode
Date: Mon, 30 Jun 2003 17:15:53 -0700	[thread overview]
Message-ID: <m3r85b9k5i.fsf@newsguy.com> (raw)
In-Reply-To: <m3fzlsvltc.fsf@newsguy.com>

[-- Attachment #1: Type: text/plain, Size: 4061 bytes --]

Harry Putnam <reader@newsguy.com> 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 <RET>.

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


[-- Attachment #2: init file --]
[-- Type: text/plain, Size: 1119 bytes --]

(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 "")))

  parent reply	other threads:[~2003-07-01  0:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-29 17:24 Harry Putnam
2003-06-29 20:47 ` Harry Putnam
2003-06-30  4:32   ` John Paul Wallington
2003-06-30  6:25     ` Harry Putnam
2003-06-30  7:01       ` John Paul Wallington
2003-06-30 15:07         ` Harry Putnam
2003-06-30 17:06           ` John Paul Wallington
2003-06-29 21:22 ` lawrence mitchell
2003-07-01  0:15 ` Harry Putnam [this message]
2003-07-01 14:17   ` Harry Putnam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3r85b9k5i.fsf@newsguy.com \
    --to=reader@newsguy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).