From: lee@nova.npac.syr.edu (Lee C. Brink)
Subject: Help with elisp code & gnus
Organization: Northeast Parallel Architectures Center (NPAC)
Date: Thu, 5 Nov 92 10:22:32 EST


A while ago Toby posted some code on how to change the default save
directory when you save articles in MH mail format.  Unfortunately, it
does not work on my systems here & my systems administrator, as well as
Toby, cannot figure out the problem.  I'm using gnus V3.14.1, NNTP V3.10,
and Emacs V18.58.  Any help will be appreciated.  Enclosed is my entire
.emacs file:

;;; Tells emacs where to find customization scripts
(setq load-path (cons (expand-file-name "~/bin/emacs") load-path))


;;; This is to set printing for mh-e
(setq mh-lpr-command-format "enscript -Ppicasso ")


;;; This is needed to autoload Supercite
(autoload 'sc-cite-original "sc" "Supercite 2.2" t)


;;; This is for supercite and mh-e
(setq mh-yank-hooks 'sc-cite-original)
(setq sc-citation-leader "") ;;; Gets rid of the leading tab


;;; This is for supercite & gnus
(setq mail-yank-hooks '(gnus-hide-yank-original-unhide
			sc-cite-original))
(setq news-yank-hooks '(gnus-hide-yank-original-unhide
			sc-cite-original))
(defun my-sc-overload-hook ()
  (require 'sc-oloads)      
  (sc-overload-functions))
(setq news-reply-mode-hook 'my-sc-overload-hook) 


;;; customize gnus
(autoload 'gnus "gnus" "Read network news." t)
(autoload 'gnus-post-news "gnuspost" "Post a new news." t)
(setq gnus-nntp-server "newstand.syr.edu")
(setq gnus-article-save-directory "~/MHMail")
(setq gnus-local-domain "npac.syr.edu")
(setq gnus-local-organization 
      "Northeast Parallel Architectures Center - Syracuse, NY")
(setq gnus-use-cross-reference "t")
(setq gnus-use-followup-to "t")
(setq gnus-large-newsgroup "200")
(setq gnus-user-full-name "Lee C. Brink")
(setq gnus-save-all-headers "t")
(setq gnus-thread-hide-killed "t")
(setq gnus-mail-forward-method 'gnus-mail-forward-using-mhe)


;;;Saves .newsrc regularly
(setq gnus-newsrc-save-frequency 50)
(setq gnus-read-articles 0)
(setq gnus-Select-group-hook
      '(lambda ()
	 (if (> gnus-read-articles gnus-newsrc-save-frequency)
	     (progn
	       (gnus-save-newsrc-file)
	       (setq gnus-read-articles 0)))))
(setq gnus-Article-prepare-hook
      '(lambda ()
	 (setq gnus-read-articles (1+ gnus-read-articles))))


;;; This is for fetching gif pics
    (autoload 'gnus-grab-gif "gif" "" t)
    (autoload 'uuencode-file "uu" "" t)
    (autoload 'uuencode-buffer "uu" "" t)
    (autoload 'uuencode-region "uu" "" t)
    (autoload 'uudecode-buffer "uu" "" t)
    (autoload 'uudecode-region "uu" "" t)
    (autoload 'uudecode-region-replace "uu" "" t)
    (autoload 'uumerge-buffer "uu" "" t)
    (autoload 'mark-next-uuencode "uu" "" t)
    (setq uumerge-in-unix t)
    (setq uudecode-directory (expand-file-name "~/gif/"))


;;; This is to vary the .signature 
(defvar my_gnus_newsgroup_signature_file nil
  "Temporary variable used for setting newsgroup-specific .signature file.")
(defun gnus-Subject-set-signature ()
  "Set gnus-signature-file to a newsgroup-specific signature if it exists.
Newsgroup-specific signature files are placed in \"~/News\". If a newsgroup-
specific signature file does not exist, use the default \"~/.signature\""
  (if (file-readable-p (setq my_gnus_newsgroup_signature_file 
			     (concat "~/News/" gnus-newsgroup-name 
				     ".sig")))
      (setq gnus-signature-file my_gnus_newsgroup_signature_file)
    (setq gnus-signature-file "~/.signature")))


;;; Unsubscribe new newsgroups & put them in kill file
(setq gnus-subscribe-newsgroup-method
      '(lambda (newsgroup)
       (gnus-subscribe-newsgroup newsgroup)
       (gnus-kill-newsgroup newsgroup)))


;;; Rearrange save directories for gnus - Does NOT work - Why?
(defvar gnus-article-mh-folder-list nil
  "* Association list between newgroups and mh folder.")
(setq gnus-article-mh-folder-list
      '(("alt.aquaria"               . "+fish")
	("rec.aquaria"               . "+fish")
	("sci.aquaria"               . "+fish")
	("comp.sys.amiga.announce"   . "+amiga")
	("comp.sys.amiga.audio"      . "+amiga")
	("comp.sys.amiga.games"      . "+amiga")
	("comp.sys.amiga.hardware"   . "+amiga")
	("comp.sys.amiga.misc"       . "+amiga")
	("comp.sys.amiga.programmer" . "+amiga")
	("alt.fan.ren-and-stimpy"    . "+rs")
	("alt.tv.ren-n-stimpy"       . "+rs")
	("gnu.emacs.gnus"            . "+emacs")
        ("gnu.emacs.sources"         . "+emacs")
	("talk.politics.animals"     . "+politics")
	("talk.politics.drugs"       . "+politics")
	("talk.politics.guns"        . "+politics")
        ("alt.politics.correct"      . "+politics")
	("rec.games.frp.announce"    . "+games")
	("rec.games.frp.archives"    . "+games")
	("rec.gardening"             . "+plants")
	))
(setq gnus-default-article-saver 'gnus-Subject-save-in-folder)
(defun gnus-folder-save-name (newsgroup headers &optional last-name)
  (or (cdr (assoc newsgroup
	gnus-article-mh-folder-list))
    "+news"))


--
+---------------------------+----------------------------------------------+
| Lee C Brink	             Office Support Co-ordinator at NPAC	   |
| lee@nova.npac.syr.edu      Syracuse University, Syracuse, NY 13244-4100  |
|			     315-443-1722				   |
| "Stimpy, move your butt.  It's a higher mammal" - The Ren & Stimpy show  |
+---------------------------+----------------------------------------------+