From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/2708 Path: news.gmane.org!not-for-mail From: Harry Putnam Newsgroups: gmane.emacs.gnus.user Subject: How can I accomplish this: Run unplugged and do everthing in batch mode. Date: Wed, 02 Jul 2003 12:18:17 -0700 Organization: Still searching... Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669042 16073 80.91.229.2 (31 Jan 2006 00:57:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 00:57:22 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:31:06 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!uninett.no!newspump.monmouth.com!newspeer.monmouth.com!newsfeed!wn13feed!worldnet.att.net!129.250.169.17!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!enews3 Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: p-596.newsdawg.com User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:/pfVHHEJ1926QYaSPrJcKY6bF/U= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:2848 Original-Lines: 128 X-Gnus-Article-Number: 2848 Tue Jan 17 17:31:06 2006 Xref: news.gmane.org gmane.emacs.gnus.user:2708 Archived-At: I'd like to just run unplugged all the time. Relying on batch fetches to keep things up to date. I guess the problem is how to update the offline gnus from stuff collected by online batch jobs. I have code that lars posted long ago. It may be dated by now but still looks pretty similar to gnus-batch. I've lost track of how much I may have butched it up. And no longer have Lars post. It was several years ago (on ding), I'm running a batch command that loads two things. A my_gnus.el generated by scripting that scans .emacs .gnus .site-start.el for lines with the key symbol ;;;batch following. So as to avoid unecessary stuff. It all happens from a perl script that runs emacs like: emacs -q -no-site-file -batch -l $my_gnus_el -l $my_batch_el \ -f hp-fetch-news $my_gnus_el is loaded in emacs because it redirects gnus to use $my_gnus_el as init file. And points to the right directory for gnus/lisp so I get my cvs version. Then $my_batch_el contains the function hp-fetch-news. After gnus libraries are loaded. (Shown below after $my_gnus_el) The last item in $my_batch_el (shown at the end) `(gnus-group-quit)' is documented as closing out without saving anything. I wondered if it should be `gnus-group-exit'. Also confused about this from $my_batch_el: ;; The let below might load ~/.gnus if "" trying nil ;;(let ((init-file-user "") (let ((init-file-user nil) (gnus-always-read-dribble-file t) Lars original formula used init-file-user "" But I don't want to load .gnus so thought maybe I should set that nil. Finally, in the running unplugged gnus I run a function that is supposed to refresh it. pgnus-unplugged. That is loaded on startup. (defun pgnus-unplugged () (interactive) (setq gnus-plugged nil) (gnus)) (setq gnus-read-active-file t) [aside Sorry about all the data, I tried to organize it so it would come after any discriptions and be a little easier to plow thru.] Pretty sure the above way was what Lars had. So figured it probably needs to be there. `gnus-group-exit' is suppose to save stuff on the way out. I can't really tell for sure if this is working, but I'm starting to see those `undownloaded' marked articles in some of my agentized groups. Theoretically that should happen, if the batch fetches are working.. (I think). I'm confused about how the running `unplugged' gnus can get refreshed from the batch jobs. Currently I run this code I had when it was still pgnus. cat $my_gnus_el (no formatting) just the lines and where they came from ( a couple things appear twice but I don't think it hurts anything): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (add-to-list 'load-path "/usr/local/gnus/lisp" (setq gnus-init-file "/tmp/my_gnus_init.el") (load-library "gnus") (setq mail-user-agent 'gnus-user-agent) ;;;batch:76:/home/reader/.gnus (setq max-lisp-eval-depth 2000) ;;;batch:80:/home/reader/.gnus (setq message-syntax-checks ;;;batch:81:/home/reader/.gnus '((sender . disabled))) ;;;batch:82:/home/reader/.gnus (defun message-make-fqdn () ;;;batch:84:/home/reader/.gnus "My hacked message-id." ;;;batch:85:/home/reader/.gnus "newsguy.com") ;;;batch:86:/home/reader/.gnus (setq gnus-expert-user t) ;;;batch:95:/home/reader/.gnus (setq gnus-agent-short-article 50) ;;;batch:96:/home/reader/.gnus (setq gnus-use-adaptive-scoring nil) ;;;batch:152:/home/reader/.gnus (setq mail-sources ;;;batch:159:/home/reader/.gnus '((file :path "/var/spool/mail/reader") ;;;batch:160:/home/reader/.gnus (directory :path "/home/reader/spool/" :suffix ".in"))) ;;;batch:161:/home/reader/.gnus (setq gnus-extra-headers ;;;batch:164:/home/reader/.gnus '(To Newsgroups Keywords )) ;;;batch:165:/home/reader/.gnus (setq nnmail-extra-headers gnus-extra-headers) ;;;batch:166:/home/reader/.gnus (setq gnus-ignored-from-addresses ;;;batch:167:/home/reader/.gnus "Harry Putnam") ;;;batch:168:/home/reader/.gnus (setq message-user-organization "Still searching...") ;;;batch:171:/home/reader/.gnus (setq gnus-select-method '(nntp "enews.newsguy.com")) ;;;batch:172:/home/reader/.gnus (setq user-mail-address "reader@newsguy.com") ;;;batch:175:/home/reader/.gnus (setq gnus-check-new-newsgroups 'ask-server) ;;;batch:183:/home/reader/.gnus (setq gnus-agent-handle-level 3) ;;;batch:186:/home/reader/.gnus (setq gnus-activate-foreign-newsgroups 3) ;;;batch:187:/home/reader/.gnus (setq mail-source-delete-incoming t) ;;;batch:188:/home/reader/.gnus (setq gnus-use-long-file-name t) ;;;batch:189:/home/reader/.gnus (setq nnmail-crosspost nil) ;;;batch:190:/home/reader/.gnus (setq gnus-secondary-select-methods ;;;batch:194:/home/reader/.gnus '((nnml ""))) ;;;batch:195:/home/reader/.gnus (setq nnmail-split-methods ;;;batch:197:/home/reader/.gnus '(("tests" "^Subject:.*test.*labridge") ;;;batch:198:/home/reader/.gnus ("Edited" "^Subject: \\[ed\\]\\|^Subject: \\[ed\\]") ;;;batch:199:/home/reader/.gnus ("misc" ""))) ;;;batch:200:/home/reader/.gnus (setq user-mail-address "reader@newsguy.com") ;;;batch:124:/home/reader/.emacs (setq message-syntax-checks '((sender . disabled))) ;;;batch:125:/home/reader/.emacs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Then this batching function is loaded: cat $my_batch_el (defun hp-fetch-news () (interactive) ;; The let below might load ~/.gnus if "" trying nil ;;(let ((init-file-user "") (let ((init-file-user nil) (gnus-always-read-dribble-file t)) (gnus)) ;; not sure what this does or if I need it either (let ((gnus-agent-confirmation-function 'gnus-agent-batch-confirmation)) (gnus-group-send-queue) (gnus-agent-fetch-session) (gnus-group-quit)))