*** pub/dgnus//lisp/dgnushack.el	Thu May 25 07:06:10 1995
--- dgnus//lisp/dgnushack.el	Sat May 27 06:49:20 1995
***************
*** 31,35 ****
--- 31,38 ----
  
  (setq load-path (cons "." load-path))
  
+ (defun dgnushack-recompile ()
+   (byte-recompile-directory "."))
+ 
  ;;; dgnushack.el ends here  
  
*** pub/dgnus//lisp/gnus-cache.el	Thu May 25 07:06:11 1995
--- dgnus//lisp/gnus-cache.el	Sat May 27 09:52:53 1995
***************
*** 127,135 ****
  		(beginning-of-line))
  	    (forward-line 1))
  	  ;; [number subject from date id references chars lines xref]
! 	  (insert (format "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n"
  			  (header-number headers)
  			  (header-subject headers)
  			  (header-date headers)
  			  (header-id headers)
  			  (or (header-references headers) "")
--- 127,136 ----
  		(beginning-of-line))
  	    (forward-line 1))
  	  ;; [number subject from date id references chars lines xref]
! 	  (insert (format "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n"
  			  (header-number headers)
  			  (header-subject headers)
+ 			  (header-from headers)
  			  (header-date headers)
  			  (header-id headers)
  			  (or (header-references headers) "")
*** pub/dgnus//lisp/gnus-ems.el	Thu May 25 07:06:11 1995
--- dgnus//lisp/gnus-ems.el	Sat May 27 06:49:21 1995
***************
*** 110,115 ****
--- 110,117 ----
  	(and (not (file-directory-p file))
  	     (not (file-symlink-p file))
  	     (file-exists-p file))))
+   (or (fboundp 'face-list)
+       (defun face-list (&rest args)))
    )
  
  (defun gnus-ems-redefine ()
*** pub/dgnus//lisp/gnus-kill.el	Thu May 25 07:06:11 1995
--- dgnus//lisp/gnus-kill.el	Sat May 27 06:49:21 1995
***************
*** 157,167 ****
        (cond ((get-buffer-window buffer)
  	     (pop-to-buffer buffer))
  	    ((eq major-mode 'gnus-group-mode)
! 	     (gnus-configure-windows '(1 0 0)) ;Take all windows.
! 	     (pop-to-buffer gnus-group-buffer)
! 	     ;; Fix by sachs@SLINKY.CS.NYU.EDU (Jay Sachs).
! 	     (let ((gnus-summary-buffer buffer))
! 	       (gnus-configure-windows '(1 1 0))) ;Split into two.
  	     (pop-to-buffer buffer))
  	    ((eq major-mode 'gnus-summary-mode)
  	     (gnus-configure-windows 'article)
--- 157,163 ----
        (cond ((get-buffer-window buffer)
  	     (pop-to-buffer buffer))
  	    ((eq major-mode 'gnus-group-mode)
! 	     (gnus-configure-windows 'group) ;Take all windows.
  	     (pop-to-buffer buffer))
  	    ((eq major-mode 'gnus-summary-mode)
  	     (gnus-configure-windows 'article)
*** pub/dgnus//lisp/gnus-msg.el	Thu May 25 07:06:11 1995
--- dgnus//lisp/gnus-msg.el	Sat May 27 09:39:37 1995
***************
*** 210,215 ****
--- 210,216 ----
  (defvar gnus-post-news-buffer "*post-news*")
  (defvar gnus-summary-send-map nil)
  (defvar gnus-article-copy nil)
+ (defvar gnus-reply-subject nil)
  
  
  ;;;
***************
*** 436,441 ****
--- 437,444 ----
  	  (gnus-overload-functions)
  	  (make-local-variable 'gnus-article-reply)
  	  (make-local-variable 'gnus-article-check-size)
+ 	  (make-local-variable 'gnus-reply-subject)
+ 	  (setq gnus-reply-subject (and header (header-subject header)))
  	  (setq gnus-article-reply sumart)
  	  ;; Handle `gnus-auto-mail-to-author'.
  	  ;; Suggested by Daniel Quinlan <quinlan@best.com>.
***************
*** 966,987 ****
      (if (and (mail-fetch-field "references")
  	     (get-buffer gnus-article-buffer))
  	(let ((psubject (gnus-simplify-subject-re
! 			 (mail-fetch-field "subject")))
! 	      subject)
! 	  (save-excursion
! 	    (set-buffer gnus-article-buffer)
! 	    (save-restriction
! 	      (gnus-narrow-to-headers)
! 	      (if (setq subject (mail-fetch-field "subject"))
! 		  (progn
! 		    (and gnus-summary-gather-subject-limit
! 			 (numberp gnus-summary-gather-subject-limit)
! 			 (> (length subject) gnus-summary-gather-subject-limit)
! 			 (setq subject
! 			       (substring subject 0
! 					  gnus-summary-gather-subject-limit)))
! 		    (setq subject (gnus-simplify-subject-re subject))))))
! 	  (or (and psubject subject (string= subject psubject))
  	      (progn
  		(string-match "@" Message-ID)
  		(setq Message-ID
--- 969,978 ----
      (if (and (mail-fetch-field "references")
  	     (get-buffer gnus-article-buffer))
  	(let ((psubject (gnus-simplify-subject-re
! 			 (mail-fetch-field "subject"))))
! 	  (or (and psubject gnus-reply-subject 
! 		   (string= (gnus-simplify-subject-re gnus-reply-subject)
! 			    psubject))
  	      (progn
  		(string-match "@" Message-ID)
  		(setq Message-ID
***************
*** 1370,1376 ****
  	    (setq cc (mail-fetch-field "cc"))
  	    (setq reply-to (mail-fetch-field "reply-to"))
  	    (setq references (mail-fetch-field "references"))
! 	    (setq message-id (mail-fetch-field "message-id")))
  	  (setq news-reply-yank-from (or from "(nobody)")))
  	(setq news-reply-yank-message-id
  	      (or message-id "(unknown Message-ID)"))
--- 1361,1368 ----
  	    (setq cc (mail-fetch-field "cc"))
  	    (setq reply-to (mail-fetch-field "reply-to"))
  	    (setq references (mail-fetch-field "references"))
! 	    (setq message-id (mail-fetch-field "message-id"))
! 	    (widen))
  	  (setq news-reply-yank-from (or from "(nobody)")))
  	(setq news-reply-yank-message-id
  	      (or message-id "(unknown Message-ID)"))
*** pub/dgnus//lisp/gnus-vis.el	Thu May 25 07:06:11 1995
--- dgnus//lisp/gnus-vis.el	Sat May 27 06:49:22 1995
***************
*** 177,182 ****
--- 177,183 ----
        ["Add a directory group" gnus-group-make-directory-group t]
        ["Add the help group" gnus-group-make-help-group t]
        ["Add the archive group" gnus-group-make-archive-group t]
+       ["Make a doc group" gnus-group-make-doc-group t]
        ["Make a kiboze group" gnus-group-make-kiboze-group t]
        ["Make a virtual group" gnus-group-make-empty-virtual t]
        ["Add a group to a virtual" gnus-group-add-to-virtual t])
*** pub/dgnus//lisp/gnus.el	Thu May 25 07:06:12 1995
--- dgnus//lisp/gnus.el	Sat May 27 11:12:19 1995
***************
*** 1272,1278 ****
  (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
    "The mail address of the Gnus maintainer.")
  
! (defconst gnus-version "(ding) Gnus v0.77"
    "Version number for this version of Gnus.")
  
  (defvar gnus-info-nodes
--- 1272,1278 ----
  (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)"
    "The mail address of the Gnus maintainer.")
  
! (defconst gnus-version "(ding) Gnus v0.78"
    "Version number for this version of Gnus.")
  
  (defvar gnus-info-nodes
***************
*** 2637,2642 ****
--- 2637,2650 ----
      ;; from `message'.
      (apply 'format args)))
  
+ ;; Generate a unique new group name.
+ (defun gnus-generate-new-group-name (leaf)
+   (let ((name leaf)
+ 	(num 0))
+     (while (gnus-gethash name gnus-newsrc-hashtb)
+       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
+     name))
+ 
  ;;; List and range functions
  
  (defun gnus-last-element (list)
***************
*** 2959,2964 ****
--- 2967,2973 ----
    (define-key gnus-group-group-map "v" 'gnus-group-add-to-virtual)
    (define-key gnus-group-group-map "V" 'gnus-group-make-empty-virtual)
    (define-key gnus-group-group-map "D" 'gnus-group-enter-directory)
+   (define-key gnus-group-group-map "f" 'gnus-group-make-doc-group)
  
    (define-prefix-command 'gnus-group-list-map)
    (define-key gnus-group-mode-map "A" 'gnus-group-list-map)
***************
*** 3646,3652 ****
  					(cons (current-buffer) 'summary)))))))
       gnus-newsrc-hashtb)
      (set-buffer gnus-group-buffer)
!     (if activate (gnus-request-group group (nth 1 method)))
      (condition-case ()
  	(gnus-group-read-group t t group)
        (error nil)
--- 3655,3664 ----
  					(cons (current-buffer) 'summary)))))))
       gnus-newsrc-hashtb)
      (set-buffer gnus-group-buffer)
!     (or (gnus-server-opened method)
! 	(gnus-open-server method)
! 	(error "Unable to contact server: %s" (gnus-status-message method)))
!     (if activate (gnus-request-group group))
      (condition-case ()
  	(gnus-group-read-group t t group)
        (error nil)
***************
*** 3780,3786 ****
    (gnus-configure-windows 'server)
    (gnus-server-prepare))
  
! (defun gnus-group-make-group (name method address)
    "Add a new newsgroup.
  The user will be prompted for a NAME, for a select METHOD, and an
  ADDRESS."
--- 3792,3798 ----
    (gnus-configure-windows 'server)
    (gnus-server-prepare))
  
! (defun gnus-group-make-group (name method &optional address)
    "Add a new newsgroup.
  The user will be prompted for a NAME, for a select METHOD, and an
  ADDRESS."
***************
*** 3913,3918 ****
--- 3925,3954 ----
       (concat (file-name-as-directory (car path)) "doc.txt"))
      (gnus-group-position-cursor)))
  
+ (defun gnus-group-make-doc-group (file type)
+   "Create a group that uses a single file as the source."
+   (interactive 
+    (list (read-file-name "File name: ") 
+ 	 (let ((err "")
+ 	       found char)
+ 	   (while (not found)
+ 	     (message "%sFile type (mbox, babyl, digest) [mbd]: " err)
+ 	     (setq found (cond ((= (setq char (read-char)) ?m) 'mbox)
+ 			       ((= char ?b) 'babyl)
+ 			       ((= char ?d) 'digest)
+ 			       (t (setq mess "%c unknown. " char)
+ 				  nil))))
+ 	   found)))
+   (let* ((file (expand-file-name file))
+ 	 (name (gnus-generate-new-group-name
+ 		(gnus-group-prefixed-name
+ 		 (file-name-nondirectory file) '(nndoc "")))))
+     (gnus-group-make-group 
+      (gnus-group-real-name name)
+      (list 'nndoc name
+ 	   (list 'nndoc-address file)
+ 	   (list 'nndoc-article-type type)))))
+ 
  (defun gnus-group-make-archive-group ()
    "Create the (ding) Gnus archive group."
    (interactive)
***************
*** 4006,4015 ****
  	 (leaf (gnus-group-prefixed-name
  		(file-name-nondirectory (directory-file-name dir))
  		method))
! 	 (name leaf)
  	 (num 0))
-     (while (gnus-gethash name gnus-newsrc-hashtb)
-       (setq name (concat leaf "<" (int-to-string (setq num (1+ num))) ">")))
      (let ((nneething-read-only t))
        (or (gnus-group-read-ephemeral-group 
  	   name method t
--- 4042,4049 ----
  	 (leaf (gnus-group-prefixed-name
  		(file-name-nondirectory (directory-file-name dir))
  		method))
! 	 (name (gnus-generate-new-group-name leaf))
  	 (num 0))
      (let ((nneething-read-only t))
        (or (gnus-group-read-ephemeral-group 
  	   name method t
***************
*** 4736,4742 ****
      (gnus-group-position-cursor)))
  
  (defun gnus-browse-mode ()
!   "Major mode for browsing a foreign server."
    (interactive)
    (kill-all-local-variables)
    (if gnus-visual (gnus-browse-make-menu-bar))
--- 4770,4789 ----
      (gnus-group-position-cursor)))
  
  (defun gnus-browse-mode ()
!   "Major mode for browsing a foreign server.
! 
! All normal editing commands are switched off.
! 
! \\<gnus-browse-mode-map>
! The only things you can do in this buffer is
! 
! 1) `\\[gnus-browse-unsubscribe-current-group]' to subscribe to a group.
! The group will be inserted into the group buffer upon exit from this
! buffer.  
! 
! 2) `\\[gnus-browse-read-group]' to read a group ephemerally.
! 
! 3) `\\[gnus-browse-exit]' to return to the group buffer."
    (interactive)
    (kill-all-local-variables)
    (if gnus-visual (gnus-browse-make-menu-bar))
***************
*** 4765,4770 ****
--- 4812,4818 ----
  
  (defun gnus-browse-select-group ()
    "Select the current group."
+   (interactive)
    (gnus-browse-read-group 'no))
  
  (defun gnus-browse-next-group (n)
***************
*** 4797,4802 ****
--- 4845,4851 ----
  
  (defun gnus-browse-group-name ()
    (save-excursion
+     (beginning-of-line)
      (if (not (re-search-forward ": \\(.*\\)$" (gnus-point-at-eol) t))
  	()
        (gnus-group-prefixed-name 
***************
*** 5107,5112 ****
--- 5156,5162 ----
    (define-key gnus-summary-backend-map "w" 'gnus-summary-edit-article)
    (define-key gnus-summary-backend-map "c" 'gnus-summary-copy-article)
    (define-key gnus-summary-backend-map "q" 'gnus-summary-fancy-query)
+   (define-key gnus-summary-backend-map "i" 'gnus-summary-import-article)
  
  
    (define-prefix-command 'gnus-summary-save-map)
***************
*** 6642,6648 ****
  		   nil
  		 (gnus-nov-field))	; misc
  	       ))
!       (quit (progn 
  	       (setq header nil)
  	       (goto-char eol))))
  
--- 6692,6700 ----
  		   nil
  		 (gnus-nov-field))	; misc
  	       ))
!       (error (progn 
! 	       (ding)
! 	       (message "Strange nov line.")
  	       (setq header nil)
  	       (goto-char eol))))
  
***************
*** 6918,6925 ****
  ;; Function written by Stainless Steel Rat <ratinox@ccs.neu.edu>.
  (defun gnus-short-group-name (group &optional levels)
    "Collapse GROUP name LEVELS."
!   (let ((name "") (foreign "")
! 	(levels (or levels 2)))
      (if (string-match ":" group)
  	(setq foreign (substring group 0 (match-end 0))
  	      group (substring group (match-end 0))))
--- 6970,6982 ----
  ;; Function written by Stainless Steel Rat <ratinox@ccs.neu.edu>.
  (defun gnus-short-group-name (group &optional levels)
    "Collapse GROUP name LEVELS."
!   (let* ((name "") (foreign "") (depth -1) (skip 1)
! 	 (levels (or levels
! 		     (progn
! 		       (while (string-match "\\." group skip)
! 			 (setq skip (match-end 0)
! 			       depth (+ depth 1)))
! 		       depth))))
      (if (string-match ":" group)
  	(setq foreign (substring group 0 (match-end 0))
  	      group (substring group (match-end 0))))
***************
*** 7082,7088 ****
        ;; Do adaptive scoring, and possibly save score files.
        (and gnus-newsgroup-adaptive
  	   (gnus-score-adaptive))
!       (and (fboundp 'gnus-score-save)
  	   (funcall 'gnus-score-save))
        ;; Do not switch windows but change the buffer to work.
        (set-buffer gnus-group-buffer)
--- 7139,7146 ----
        ;; Do adaptive scoring, and possibly save score files.
        (and gnus-newsgroup-adaptive
  	   (gnus-score-adaptive))
!       (and gnus-use-scoring 
! 	   (fboundp 'gnus-score-save)
  	   (funcall 'gnus-score-save))
        ;; Do not switch windows but change the buffer to work.
        (set-buffer gnus-group-buffer)
***************
*** 7519,7532 ****
        (gnus-eval-in-buffer-window
         gnus-article-buffer
         (setq endp (gnus-article-next-page lines)))
-       (gnus-summary-recenter)
        (if endp
   	  (cond (circular
   		 (gnus-summary-beginning-of-article))
   		(lines
   		 (gnus-message 3 "End of message"))
   		((null lines)
!  		 (gnus-summary-next-unread-article)))))))
  
  (defun gnus-summary-prev-page (lines)
    "Show previous page of selected article.
--- 7577,7593 ----
        (gnus-eval-in-buffer-window
         gnus-article-buffer
         (setq endp (gnus-article-next-page lines)))
        (if endp
   	  (cond (circular
   		 (gnus-summary-beginning-of-article))
   		(lines
   		 (gnus-message 3 "End of message"))
   		((null lines)
!  		 (gnus-summary-next-unread-article)))))
!     (gnus-configure-windows 'article)
!     (gnus-summary-recenter)
!     (gnus-summary-position-cursor)))
! 
  
  (defun gnus-summary-prev-page (lines)
    "Show previous page of selected article.
***************
*** 7543,7548 ****
--- 7604,7610 ----
        (gnus-summary-recenter)
        (gnus-eval-in-buffer-window gnus-article-buffer
  	(gnus-article-prev-page lines))))
+   (gnus-configure-windows 'article)
    (gnus-summary-position-cursor))
  
  (defun gnus-summary-scroll-up (lines)
***************
*** 7727,7737 ****
    (gnus-summary-stop-page-breaking)
    (let ((name (format "%s-%d" 
  		      (gnus-group-prefixed-name 
! 		       gnus-newsgroup-name (list 'nndigest "")) 
  		      gnus-current-article))
  	(buf (current-buffer)))
      (if (gnus-group-read-ephemeral-group 
! 	 name (list 'nndigest gnus-article-buffer))
  	()
        (switch-to-buffer buf)
        (gnus-set-global-variables)
--- 7789,7802 ----
    (gnus-summary-stop-page-breaking)
    (let ((name (format "%s-%d" 
  		      (gnus-group-prefixed-name 
! 		       gnus-newsgroup-name (list 'nndoc "")) 
  		      gnus-current-article))
  	(buf (current-buffer)))
      (if (gnus-group-read-ephemeral-group 
! 	 name (list 'nndoc name
! 		    (list 'nndoc-address (get-buffer gnus-article-buffer))
! 		    '(nndoc-article-type digest))
! 	 t)
  	()
        (switch-to-buffer buf)
        (gnus-set-global-variables)
***************
*** 7743,7750 ****
    (interactive)
    (gnus-set-global-variables)
    (gnus-summary-select-article)
!   (gnus-eval-in-buffer-window gnus-article-buffer
! 			      (isearch-forward)))
  
  (defun gnus-summary-search-article-forward (regexp)
    "Search for an article containing REGEXP forward.
--- 7808,7815 ----
    (interactive)
    (gnus-set-global-variables)
    (gnus-summary-select-article)
!   (gnus-eval-in-buffer-window 
!    gnus-article-buffer (isearch-forward)))
  
  (defun gnus-summary-search-article-forward (regexp)
    "Search for an article containing REGEXP forward.
***************
*** 8163,8168 ****
--- 8228,8253 ----
        (setq articles (cdr articles)))
      (kill-buffer copy-buf)))
  
+ (defun gnus-summary-import-article (file)
+   "Import a random file into a mail newsgroup."
+   (interactive "fImport file: ")
+   (let ((group gnus-newsgroup-name)
+ 	attrib)
+     (or (gnus-check-backend-function 'request-accept-article group)
+ 	(error "%s does not support article importing" group))
+     (or (file-readable-p file)
+ 	(not (file-regular-p file))
+ 	(error "Can't read %s" file))
+     (save-excursion
+       (set-buffer (get-buffer-create " *import file*"))
+       (buffer-disable-undo (current-buffer))
+       (erase-buffer)
+       (insert-file-contents file)
+       (goto-char (point-min))
+       (setq attrib (file-attributes file))
+       (insert "From: " (read-string "From: ")))))
+ 
+ 
  (defun gnus-summary-expire-articles ()
    "Expire all articles that are marked as expirable in the current group."
    (interactive)
***************
*** 11789,11802 ****
  	;; loop...   
  	(let* ((mod-hashtb (make-vector 7 0))
  	       (m (intern "m" mod-hashtb))
! 	       group max mod)
  	  (while (not (eobp))
  	    (condition-case nil
  		(progn
  		  (narrow-to-region (point) (gnus-point-at-eol))
  		  (setq group (let ((obarray hashtb)) (read cur)))
! 		  (setq max (read cur))
! 		  (set group (cons (read cur) max))
  		  ;; Enter moderated groups into a list.
  		  (if (eq (let ((obarray mod-hashtb)) (read cur)) m)
  		      (setq gnus-moderated-list 
--- 11874,11888 ----
  	;; loop...   
  	(let* ((mod-hashtb (make-vector 7 0))
  	       (m (intern "m" mod-hashtb))
! 	       group max mod min)
  	  (while (not (eobp))
  	    (condition-case nil
  		(progn
  		  (narrow-to-region (point) (gnus-point-at-eol))
  		  (setq group (let ((obarray hashtb)) (read cur)))
! 		  (and (numberp (setq max (read cur)))
! 		       (numberp (setq min (read cur)))
! 		       (set group (cons min max)))
  		  ;; Enter moderated groups into a list.
  		  (if (eq (let ((obarray mod-hashtb)) (read cur)) m)
  		      (setq gnus-moderated-list 
***************
*** 11806,11812 ****
  	    (forward-line 1)))
        ;; And if we do not care about moderation, we use this loop,
        ;; which is faster.
!       (let (group max)
  	(while (not (eobp))
  	  (condition-case ()
  	      (progn
--- 11892,11898 ----
  	    (forward-line 1)))
        ;; And if we do not care about moderation, we use this loop,
        ;; which is faster.
!       (let (group max min)
  	(while (not (eobp))
  	  (condition-case ()
  	      (progn
***************
*** 11815,11824 ****
  		;; (what a hack!!)
  		(setq group (let ((obarray hashtb)) (read cur)))
  		(and (numberp (setq max (read cur)))
! 		     (set group (cons (read cur) max))))
  	    (error 
  	     (progn (ding) 
! 		    (gnus-message 3 "Illegal active: %s"
  				  (buffer-substring 
  				   (gnus-point-at-bol) (gnus-point-at-eol)))
  		    nil)))
--- 11901,11911 ----
  		;; (what a hack!!)
  		(setq group (let ((obarray hashtb)) (read cur)))
  		(and (numberp (setq max (read cur)))
! 		     (numberp (setq min (read cur)))
! 		     (set group (cons min max))))
  	    (error 
  	     (progn (ding) 
! 		    (gnus-message 3 "Warning - illegal active: %s"
  				  (buffer-substring 
  				   (gnus-point-at-bol) (gnus-point-at-eol)))
  		    nil)))
*** pub/dgnus//lisp/nnbabyl.el	Thu May 25 07:06:12 1995
--- dgnus//lisp/nnbabyl.el	Sat May 27 09:39:35 1995
***************
*** 73,79 ****
  
  ;;; Interface functions
  
! (defun nnbabyl-retrieqve-headers (sequence &optional newsgroup server)
    (save-excursion
      (set-buffer nntp-server-buffer)
      (erase-buffer)
--- 73,79 ----
  
  ;;; Interface functions
  
! (defun nnbabyl-retrieve-headers (sequence &optional newsgroup server)
    (save-excursion
      (set-buffer nntp-server-buffer)
      (erase-buffer)
*** pub/dgnus//lisp/nndigest.el	Thu May 25 07:06:12 1995
--- dgnus//lisp/nndigest.el	Sat May 27 06:49:26 1995
***************
*** 1,207 ****
- ;;; nndigest.el --- digest access for Gnus
- ;; Copyright (C) 1995 Free Software Foundation, Inc.
- 
- ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
- ;; Keywords: news
- 
- ;; This file is part of GNU Emacs.
- 
- ;; GNU Emacs is free software; you can redistribute it and/or modify
- ;; it under the terms of the GNU General Public License as published by
- ;; the Free Software Foundation; either version 2, or (at your option)
- ;; any later version.
- 
- ;; GNU Emacs is distributed in the hope that it will be useful,
- ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
- ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- ;; GNU General Public License for more details.
- 
- ;; You should have received a copy of the GNU General Public License
- ;; along with GNU Emacs; see the file COPYING.  If not, write to
- ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- 
- ;;; Commentary:
- 
- ;;; Code:
- 
- (require 'nnheader)
- 
- (eval-and-compile
-   (autoload 'mail-send-and-exit "sendmail"))
- 
- 
- 
- (defconst nndigest-version "nndigest 0.0"
-   "nndigest version.")
- 
- (defvar nndigest-current-buffer nil
-   "Current digest "group" buffer.")
- 
- (defvar nndigest-status-string "")
- 
- (defvar nndigest-group-alist nil)
- 
- (defvar nndigest-separator 
-   "^------------------------------[\n \t]*\n[^ ]+: ")
- 
- (defvar nndigest-first-article-separator 
-   "^------------------------------*[\n \t]*\n[^ ]+: ")
- 
- 
- 
- ;;; Interface functions.
- 
- (defun nndigest-retrieve-headers (sequence &optional newsgroup server)
-   (save-excursion
-     (set-buffer nntp-server-buffer)
-     (erase-buffer)
-     (let ((file nil)
- 	  (number (length sequence))
- 	  (count 0)
- 	  range
- 	  beg article)
-       (nndigest-possibly-change-buffer newsgroup)
-       (if (stringp (car sequence))
- 	  'headers
- 	(while sequence
- 	  (setq article (car sequence))
- 	  (if (setq range (nndigest-narrow-to-article article))
- 	      (progn
- 		(insert (format "221 %d Article retrieved.\n" article))
- 		(setq beg (point))
- 		(insert-buffer-substring nndigest-current-buffer 
- 					 (car range) (cdr range))
- 		(goto-char beg)
- 		(if (search-forward "\n\n" nil t)
- 		    (forward-char -1)
- 		  (goto-char (point-max))
- 		  (insert "\n\n"))
- 		(insert (format "Lines: %d\n" (count-lines (point) (point-max))))
- 		(insert ".\n")
- 		(delete-region (point) (point-max))))
- 	  (setq sequence (cdr sequence)))
- 
- 	;; Fold continuation lines.
- 	(goto-char (point-min))
- 	(while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)
- 	  (replace-match " " t t))
- 	'headers))))
- 
- (defun nndigest-open-server (host &optional service)
-   (setq nndigest-status-string "")
-   (nnheader-init-server-buffer))
- 
- (defun nndigest-close-server (&optional server)
-   t)
- 
- (defun nndigest-server-opened (&optional server)
-   (and nntp-server-buffer
-        (get-buffer nntp-server-buffer)))
- 
- (defun nndigest-status-message ()
-   nndigest-status-string)
- 
- (defun nndigest-request-article (id &optional newsgroup server buffer)
-   (nndigest-possibly-change-buffer newsgroup)
-   (let ((range (nndigest-narrow-to-article id)))
-     (and range
- 	 (save-excursion
- 	   (set-buffer (or buffer nntp-server-buffer))
- 	   (erase-buffer)
- 	   (insert-buffer-substring 
- 	    nndigest-current-buffer (car range) (cdr range))
- 	   t))))
- 
- (defun nndigest-request-group (group &optional server dont-check)
-   (let ((entry (assoc group nndigest-group-alist)))
-     (and entry (setq nndigest-group-alist (delq entry nndigest-group-alist))))
-   (let ((buffer (get-buffer-create (concat " *nndigest " group "*"))))
-     (setq nndigest-group-alist 
- 	  (cons (cons group buffer) nndigest-group-alist))
-     (save-excursion
-       (set-buffer buffer)
-       (erase-buffer)
-       (insert-buffer-substring server)))
-   (nndigest-possibly-change-buffer group)
-   (let ((num 0))
-     (save-excursion
-       (set-buffer nndigest-current-buffer)
-       (widen)
-       (goto-char (point-min))
-       (if (re-search-forward nndigest-first-article-separator nil t)
- 	  (setq num 1))
-       (while (re-search-forward nndigest-separator nil t)
- 	(setq num (1+ num)))
-       (set-buffer nntp-server-buffer)
-       (erase-buffer)
-       (insert (format "211 %d %d %d %s\n" num 1 num group))
-       t)))
- 
- (defun nndigest-close-group (group &optional server)
-   (nndigest-possibly-change-buffer group)
-   (kill-buffer nndigest-current-buffer)
-   (setq nndigest-group-alist (delq (assoc group nndigest-group-alist)
- 				   nndigest-group-alist))
-   (setq nndigest-current-buffer nil)
-   t)
- 
- (defun nndigest-request-list (&optional server)
-   (save-excursion
-     (set-buffer nntp-server-buffer)
-     (erase-buffer)
-     t))
- 
- (defun nndigest-request-newgroups (date &optional server)
-   (save-excursion
-     (set-buffer nntp-server-buffer)
-     (erase-buffer)
-     t))
- 
- (defun nndigest-request-list-newsgroups (&optional server)
-   (save-excursion
-     (set-buffer nntp-server-buffer)
-     (erase-buffer)
-     t))
- 
- (defun nndigest-request-post (&optional server)
-   (mail-send-and-exit nil))
- 
- (defalias 'nndigest-request-post-buffer 'nnmail-request-post-buffer)
- 
- 
- 
- ;;; Internal functions
- 
- (defun nndigest-possibly-change-buffer (group)
-   (and group
-        (not (equal (cdr (assoc group nndigest-group-alist)) 
- 		   nndigest-current-buffer))
-        (setq nndigest-current-buffer 
- 	     (cdr (assoc group nndigest-group-alist)))))
- 
- (defun nndigest-narrow-to-article (article) 
-   (save-excursion
-     (set-buffer nndigest-current-buffer)
-     (widen)
-     (goto-char (point-min))
-     (re-search-forward nndigest-first-article-separator nil t)
-     (while (and (not (zerop (setq article (1- article))))
- 		(re-search-forward nndigest-separator nil t)))
-     (if (zerop article)
- 	(progn
- 	  (goto-char (match-end 0))
- 	  (beginning-of-line)
- 	  (narrow-to-region 
- 	   (point)
- 	   (or (and (re-search-forward nndigest-separator nil t)
- 		    (match-beginning 0))
- 	       (and (re-search-forward "^------------------------------" nil t)
- 		    (match-beginning 0))
- 	       (point-max)))
- 	  (cons (point-min) (point-max)))
-       nil)))
-       
- 
- (provide 'nndigest)
- 
- ;;; nndigest.el ends here
--- 0 ----
*** pub/dgnus//lisp/nndoc.el	Thu May 25 07:06:12 1995
--- dgnus//lisp/nndoc.el	Sat May 27 06:49:26 1995
***************
*** 29,42 ****
--- 29,82 ----
  (require 'rmail)
  (require 'nnmail)
  
+ (defvar nndoc-article-type 'mbox
+   "*Type of the file - one of `mbox', `babyl' or `digest'.")
+ 
+ (defconst nndoc-type-to-regexp
+   (list (list 'mbox 
+ 	      (concat "^" rmail-unix-mail-delimiter)
+ 	      (concat "^" rmail-unix-mail-delimiter)
+ 	      nil "^$" nil)
+ 	(list 'babyl "\^_\^L *\n" "\^_" nil "^$" nil)
+ 	(list 'digest
+ 	      "^------------------------------[\n \t]+"
+ 	      "^------------------------------[\n \t]+"
+ 	      nil "^$"   
+ 	      "^------------------------------*[\n \t]*\n[^ ]+: "))
+   "Regular expressions for articles of the various types.")
+ 
  
  
+ (defvar nndoc-article-begin nil)
+ (defvar nndoc-article-end nil)
+ (defvar nndoc-head-begin nil)
+ (defvar nndoc-head-end nil)
+ (defvar nndoc-first-article nil)
+ 
+ (defvar nndoc-current-server nil)
+ (defvar nndoc-server-alist nil)
+ (defvar nndoc-server-variables
+   (list
+    (list 'nndoc-article-type nndoc-article-type)
+    '(nndoc-article-begin nil)
+    '(nndoc-article-end nil)
+    '(nndoc-head-begin nil)
+    '(nndoc-head-end nil)
+    '(nndoc-first-article nil)
+    '(nndoc-current-buffer nil)
+    '(nndoc-group-alist nil)
+    '(nndoc-address nil)))
+ 
  (defconst nndoc-version "nndoc 0.1"
    "nndoc version.")
  
  (defvar nndoc-current-buffer nil
    "Current nndoc news buffer.")
  
+ (defvar nndoc-address nil)
+ 
+ 
+ 
  (defvar nndoc-status-string "")
  
  (defvar nndoc-group-alist nil)
***************
*** 44,89 ****
  ;;; Interface functions
  
  (defun nndoc-retrieve-headers (sequence &optional newsgroup server)
-   "Retrieve the headers for the articles in SEQUENCE.
- Newsgroup must be selected before calling this function."
    (save-excursion
      (set-buffer nntp-server-buffer)
      (erase-buffer)
!     (let ((file nil)
! 	  (number (length sequence))
! 	  (count 0)
! 	  beg article art-string start stop lines)
        (nndoc-possibly-change-buffer newsgroup server)
        (if (stringp (car sequence))
  	  'headers
  	(while sequence
  	  (setq article (car sequence))
  	  (set-buffer nndoc-current-buffer)
! 	  (if (nndoc-search-for-article article)
! 	      (progn
! 		(setq start 
! 		      (save-excursion
! 			(or 
! 			 (re-search-backward 
! 			  (concat "^" rmail-unix-mail-delimiter) nil t)
! 			 (point-min))))
! 		(search-forward "\n\n" nil t)
! 		(setq lines (count-lines 
! 			     (point)
! 			     (or
! 			      (save-excursion
! 				(re-search-forward 
! 				 (concat "^" rmail-unix-mail-delimiter) nil t))
! 			      (point-max))))
! 		(setq stop (1- (point)))
! 		(set-buffer nntp-server-buffer)
! 		(insert (format "221 %d Article retrieved.\n" article))
! 		(setq beg (point))
! 		(insert-buffer-substring nndoc-current-buffer start stop)
! 		(goto-char (point-max))
! 		(insert (format "Lines: %d\n" lines))
! 		(insert ".\n")))
! 	  (setq sequence (cdr sequence)))
  
  	;; Fold continuation lines.
  	(goto-char (point-min))
--- 84,129 ----
  ;;; Interface functions
  
  (defun nndoc-retrieve-headers (sequence &optional newsgroup server)
    (save-excursion
      (set-buffer nntp-server-buffer)
      (erase-buffer)
!     (let ((prev 1)
! 	  article p beg end lines)
        (nndoc-possibly-change-buffer newsgroup server)
        (if (stringp (car sequence))
  	  'headers
+ 	(set-buffer nndoc-current-buffer)
+ 	(goto-char (point-min))
+ 	(re-search-forward nndoc-article-begin nil t)
+ 	(or (not nndoc-head-begin)
+ 	    (re-search-forward nndoc-head-begin nil t))
+ 	(re-search-forward nndoc-head-end nil t)
  	(while sequence
  	  (setq article (car sequence))
  	  (set-buffer nndoc-current-buffer)
! 	  (if (not (nndoc-forward-article (- article prev)))
! 	      ()
! 	    (setq p (point))
! 	    (setq beg (or (re-search-backward nndoc-article-begin nil t)
! 			  (point-min)))
! 	    (goto-char p)
! 	    (setq lines (count-lines 
! 			 (point)
! 			 (or
! 			  (and (re-search-forward nndoc-article-end nil t)
! 			       (goto-char (match-beginning 0)))
! 			  (goto-char (point-max)))))
! 	    (setq end (point))
! 
! 	    (set-buffer nntp-server-buffer)
! 	    (insert (format "221 %d Article retrieved.\n" article))
! 	    (insert-buffer-substring nndoc-current-buffer beg end)
! 	    (goto-char (point-max))
! 	    (insert (format "Lines: %d\n" lines))
! 	    (insert ".\n"))
! 
! 	  (setq prev article
! 		sequence (cdr sequence)))
  
  	;; Fold continuation lines.
  	(goto-char (point-min))
***************
*** 91,144 ****
  	  (replace-match " " t t))
  	'headers))))
  
! (defun nndoc-open-server (host &optional service)
!   "Open mbox backend."
!   (setq nndoc-status-string "")
!   (setq nndoc-group-alist nil)
!   (nnheader-init-server-buffer))
  
  (defun nndoc-close-server (&optional server)
-   "Close news server."
    t)
  
  (defun nndoc-server-opened (&optional server)
!   "Return server process status."
!   (and nntp-server-buffer
!        (get-buffer nntp-server-buffer)))
  
  (defun nndoc-status-message (&optional server)
-   "Return server status response as string."
    nndoc-status-string)
  
  (defun nndoc-request-article (article &optional newsgroup server buffer)
-   "Select ARTICLE by number."
    (nndoc-possibly-change-buffer newsgroup server)
!   (if (stringp article)
!       nil
!     (save-excursion
!       (set-buffer nndoc-current-buffer)
!       (if (nndoc-search-for-article article)
! 	  (let (start stop)
! 	    (re-search-backward (concat "^" rmail-unix-mail-delimiter) nil t)
! 	    (forward-line 1)
! 	    (setq start (point))
! 	    (or (and (re-search-forward 
! 		      (concat "^" rmail-unix-mail-delimiter) nil t)
! 		     (forward-line -1))
! 		(goto-char (point-max)))
! 	    (setq stop (point))
! 	    (let ((nntp-server-buffer (or buffer nntp-server-buffer)))
! 	      (set-buffer nntp-server-buffer)
! 	      (erase-buffer)
! 	      (insert-buffer-substring nndoc-current-buffer start stop)
! 	      t))))))
  
  (defun nndoc-request-group (group &optional server dont-check)
    "Select news GROUP."
    (save-excursion
      (if (not (nndoc-possibly-change-buffer group server))
  	(progn
! 	  (setq nndoc-status-string "No such file")
  	  nil)
        (if dont-check
  	  t
--- 131,189 ----
  	  (replace-match " " t t))
  	'headers))))
  
! (defun nndoc-open-server (server &optional defs)
!   (nnheader-init-server-buffer)
!   (if (equal server nndoc-current-server)
!       t
!     (if nndoc-current-server
! 	(setq nndoc-server-alist 
! 	      (cons (list nndoc-current-server
! 			  (nnheader-save-variables nndoc-server-variables))
! 		    nndoc-server-alist)))
!     (let ((state (assoc server nndoc-server-alist)))
!       (if state 
! 	  (progn
! 	    (nnheader-restore-variables (nth 1 state))
! 	    (setq nndoc-server-alist (delq state nndoc-server-alist)))
! 	(nnheader-set-init-variables nndoc-server-variables defs)))
!     (setq nndoc-current-server server)
!     (let ((defs (cdr (assq nndoc-article-type nndoc-type-to-regexp))))
!       (setq nndoc-article-begin (nth 0 defs))
!       (setq nndoc-article-end (nth 1 defs))
!       (setq nndoc-head-begin (nth 2 defs))
!       (setq nndoc-head-end (nth 3 defs))
!       (setq nndoc-first-article (nth 4 defs)))
!     t))
  
  (defun nndoc-close-server (&optional server)
    t)
  
  (defun nndoc-server-opened (&optional server)
!   (and (equal server nndoc-current-server)
!        nntp-server-buffer
!        (buffer-name nntp-server-buffer)))
  
  (defun nndoc-status-message (&optional server)
    nndoc-status-string)
  
  (defun nndoc-request-article (article &optional newsgroup server buffer)
    (nndoc-possibly-change-buffer newsgroup server)
!   (save-excursion
!     (let ((buffer (or buffer nntp-server-buffer)))
!       (set-buffer buffer)
!       (erase-buffer)
!       (if (stringp article)
! 	  nil
! 	(nndoc-narrow-to-article article)
! 	(insert-buffer-substring nndoc-current-buffer)
! 	t))))
  
  (defun nndoc-request-group (group &optional server dont-check)
    "Select news GROUP."
    (save-excursion
      (if (not (nndoc-possibly-change-buffer group server))
  	(progn
! 	  (setq nndoc-status-string "No such file or buffer")
  	  nil)
        (if dont-check
  	  t
***************
*** 150,157 ****
  		(progn
  		  (nndoc-close-group group)
  		  nil)
! 	      (insert (format "211 %d %d %d %s\n" 
! 			      number 1 number group))
  	      t)))))))
  
  (defun nndoc-close-group (group &optional server)
--- 195,201 ----
  		(progn
  		  (nndoc-close-group group)
  		  nil)
! 	      (insert (format "211 %d %d %d %s\n" number 1 number group))
  	      t)))))))
  
  (defun nndoc-close-group (group &optional server)
***************
*** 171,229 ****
  (defun nndoc-request-list-newsgroups (&optional server)
    nil)
  
! (defun nndoc-request-post (&optional server)
!   (mail-send-and-exit nil))
! 
  (defalias 'nndoc-request-post-buffer 'nnmail-request-post-buffer)
  
  
  ;;; Internal functions.
  
! (defun nndoc-possibly-change-buffer (group file)
    (let (buf)
!     (or (and nndoc-current-buffer
! 	     (eq nndoc-current-buffer 
! 		 (setq buf (cdr (assoc group nndoc-group-alist)))))
! 	(if buf 
! 	    (setq nndoc-current-buffer buf)
! 	  (if (or (not (file-exists-p file))
! 		  (file-directory-p file))
! 	      ()
! 	    (setq nndoc-group-alist 
! 		  (cons (cons group (setq nndoc-current-buffer 
! 					  (get-buffer-create 
! 					   (concat " *nndoc " group "*"))))
! 			nndoc-group-alist))
! 	    (save-excursion
! 	      (set-buffer nndoc-current-buffer)
! 	      (buffer-disable-undo (current-buffer))
! 	      (erase-buffer)
! 	      (insert-file-contents file)
! 	      t))))))
  
  (defun nndoc-number-of-articles ()
    (save-excursion
      (set-buffer nndoc-current-buffer)
      (goto-char (point-min))
!     (let ((num 0)
! 	  (delim (concat "^" rmail-unix-mail-delimiter)))
!       (while (re-search-forward delim nil t)
  	(setq num (1+ num)))
        num)))
  
! (defun nndoc-search-for-article (article)
!   (let ((obuf (current-buffer)))
      (set-buffer nndoc-current-buffer)
      (goto-char (point-min))
!     (let ((delim (concat "^" rmail-unix-mail-delimiter)))
!       (while (and (re-search-forward delim nil t)
! 		  (not (zerop (setq article (1- article))))))
!       (set-buffer obuf)
!       (if (zerop article)
! 	  (progn
! 	    (forward-line 1)
! 	    t)
! 	nil))))
  
  (provide 'nndoc)
  
--- 215,297 ----
  (defun nndoc-request-list-newsgroups (&optional server)
    nil)
  
! (defalias 'nndoc-request-post 'nnmail-request-post)
  (defalias 'nndoc-request-post-buffer 'nnmail-request-post-buffer)
  
  
  ;;; Internal functions.
  
! (defun nndoc-possibly-change-buffer (group source)
    (let (buf)
!     (cond 
!      ;; The current buffer is this group's buffer.
!      ((and nndoc-current-buffer
! 	   (eq nndoc-current-buffer 
! 	       (setq buf (cdr (assoc group nndoc-group-alist))))))
!      ;; We change buffers by taking an old from the group alist.
!      ;; `source' is either a string (a file name) or a buffer object. 
!      (buf
!       (setq nndoc-current-buffer buf))
!      ;; It's a totally new group. 
!      ((or (and (bufferp nndoc-address)
! 	       (buffer-name nndoc-address))
! 	  (and (stringp nndoc-address)
! 	       (file-exists-p nndoc-address)
! 	       (not (file-directory-p nndoc-address))))
!       (setq nndoc-group-alist 
! 	    (cons (cons group (setq nndoc-current-buffer 
! 				    (get-buffer-create 
! 				     (concat " *nndoc " group "*"))))
! 		  nndoc-group-alist))
!       (save-excursion
! 	(set-buffer nndoc-current-buffer)
! 	(buffer-disable-undo (current-buffer))
! 	(erase-buffer)
! 	(if (stringp nndoc-address)
! 	    (insert-file-contents nndoc-address)
! 	  (save-excursion
! 	    (set-buffer nndoc-address)
! 	    (widen))
! 	  (insert-buffer-substring nndoc-address))
! 	t)))))
! 
! (defun nndoc-forward-article (n)
!   (while (and (> n 0)
! 	      (re-search-forward nndoc-article-begin nil t)
! 	      (or (not nndoc-head-begin)
! 		  (re-search-forward nndoc-head-begin nil t))
! 	      (re-search-forward nndoc-head-end nil t))
!     (setq n (1- n)))
!   (zerop n))
  
  (defun nndoc-number-of-articles ()
    (save-excursion
      (set-buffer nndoc-current-buffer)
+     (widen)
      (goto-char (point-min))
!     (let ((num 0))
!       (while (and (re-search-forward nndoc-article-begin nil t)
! 		  (or (not nndoc-head-begin)
! 		      (re-search-forward nndoc-head-begin nil t))
! 		  (re-search-forward nndoc-head-end nil t))
  	(setq num (1+ num)))
        num)))
  
! (defun nndoc-narrow-to-article (article)
!   (save-excursion
      (set-buffer nndoc-current-buffer)
+     (widen)
      (goto-char (point-min))
!     (while (and (re-search-forward nndoc-article-begin nil t)
! 		(not (zerop (setq article (1- article))))))
!     (if (not (zerop article))
! 	()
!       (narrow-to-region 
!        (match-end 0)
!        (or (and (re-search-forward nndoc-article-end nil t)
! 		(match-beginning 0))
! 	   (point-max)))
!       t)))
  
  (provide 'nndoc)
  
*** pub/dgnus//lisp/nnheader.el	Thu May 25 07:06:12 1995
--- dgnus//lisp/nnheader.el	Sat May 27 06:49:26 1995
***************
*** 164,170 ****
      ;; not set in the first sweep.
      (while defs
        (if (not (assq (car (car defs)) server))
! 	  (set (car (car defs)) (eval (nth 1 (car defs)))))
        (setq defs (cdr defs)))))
  
  (defun nnheader-save-variables (server)
--- 164,174 ----
      ;; not set in the first sweep.
      (while defs
        (if (not (assq (car (car defs)) server))
! 	  (set (car (car defs)) 
! 	       (if (and (symbolp (nth 1 (car defs)))
! 			(not (boundp (nth 1 (car defs)))))
! 		   (nth 1 (car defs))
! 		 (eval (nth 1 (car defs))))))
        (setq defs (cdr defs)))))
  
  (defun nnheader-save-variables (server)
*** pub/dgnus//lisp/nnmail.el	Thu May 25 07:06:13 1995
--- dgnus//lisp/nnmail.el	Sat May 27 10:42:12 1995
***************
*** 188,193 ****
--- 188,196 ----
  
  
  
+ (defun nnmail-request-post (&optional server)
+   (mail-send-and-exit nil))
+ 
  (defun nnmail-request-post-buffer (post group subject header article-buffer
  					info follow-to respect-poster)
    (let ((method-address (cdr (assq 'to-address (nth 5 info))))
***************
*** 475,481 ****
  			    (progn (insert "X-") t))))
  		(setq do-search t)
  	      (if (save-excursion
! 		    (forward-char content-length)
  		    (looking-at delim))
  		  (progn
  		    (forward-char content-length)
--- 478,486 ----
  			    (progn (insert "X-") t))))
  		(setq do-search t)
  	      (if (save-excursion
! 		    (condition-case nil
! 			(forward-char content-length)
! 		      (end-of-buffer nil))
  		    (looking-at delim))
  		  (progn
  		    (forward-char content-length)
*** pub/dgnus//lisp/nnmh.el	Thu May 25 07:06:13 1995
--- dgnus//lisp/nnmh.el	Sat May 27 06:49:27 1995
***************
*** 192,198 ****
  	  t))))
  
  (defun nnmh-request-list (&optional server dir)
-   (and server nnmh-get-new-mail (nnmh-get-new-mail))
    (or dir
        (save-excursion
  	(set-buffer nntp-server-buffer)
--- 192,197 ----
***************
*** 204,214 ****
  		   (> (nth 1 (file-attributes (file-chase-links dir))) 2)
  		   (directory-files dir t nil t))))
      (while dirs 
!       (if (and (not (string-match "/\\.\\.$" (car dirs)))
! 	       (not (string-match "/\\.$" (car dirs)))
  	       (file-directory-p (car dirs))
  	       (file-readable-p (car dirs)))
! 	  (nnmh-request-list server (car dirs)))
        (setq dirs (cdr dirs))))
    ;; For each directory, generate an active file line.
    (if (not (string= (expand-file-name nnmh-directory) dir))
--- 203,212 ----
  		   (> (nth 1 (file-attributes (file-chase-links dir))) 2)
  		   (directory-files dir t nil t))))
      (while dirs 
!       (if (and (not (string-match "/\\.\\.?$" (car dirs)))
  	       (file-directory-p (car dirs))
  	       (file-readable-p (car dirs)))
! 	  (nnmh-request-list nil (car dirs)))
        (setq dirs (cdr dirs))))
    ;; For each directory, generate an active file line.
    (if (not (string= (expand-file-name nnmh-directory) dir))
***************
*** 228,233 ****
--- 226,233 ----
  		 (substring dir (match-end 0)) ?/ ?.))
  	      (apply (function max) files) 
  	      (apply (function min) files)))))))
+   (setq nnmh-group-alist (nnmail-get-active))
+   (and server nnmh-get-new-mail (nnmh-get-new-mail))
    t)
  
  (defun nnmh-request-newgroups (date &optional server)
***************
*** 392,401 ****
      (if (or (not nnmh-get-new-mail) (not nnmail-spool-file))
  	()
        ;; We first activate all the groups.
!       (if (or (not group) (not nnmh-group-alist))
! 	  (progn
! 	    (nnmh-request-list)
! 	    (setq nnmh-group-alist (nnmail-get-active))))
        ;; The we go through all the existing spool files and split the
        ;; mail from each.
        (while spools
--- 392,399 ----
      (if (or (not nnmh-get-new-mail) (not nnmail-spool-file))
  	()
        ;; We first activate all the groups.
!       (or nnmh-group-alist
! 	  (nnmh-request-list))
        ;; The we go through all the existing spool files and split the
        ;; mail from each.
        (while spools
*** pub/dgnus//lisp/nnspool.el	Thu May 25 07:06:13 1995
--- dgnus//lisp/nnspool.el	Sat May 27 06:49:28 1995
***************
*** 32,38 ****
  (defvar nnspool-inews-program news-inews-program
    "Program to post news.")
  
! (defvar nnspool-inews-switches '("-S" "-h")
    "Switches for nnspool-request-post to pass to `inews' for posting news.")
  
  (defvar nnspool-spool-directory news-path
--- 32,38 ----
  (defvar nnspool-inews-program news-inews-program
    "Program to post news.")
  
! (defvar nnspool-inews-switches '("-h")
    "Switches for nnspool-request-post to pass to `inews' for posting news.")
  
  (defvar nnspool-spool-directory news-path
***************
*** 316,322 ****
  (defun nnspool-request-post (&optional server)
    "Post a new news in current buffer."
    (save-excursion
!     (let* ((inews-buffer (generate-new-buffer " *nnspool post*"))
  	   (proc (apply 'start-process "*nnspool inews*" inews-buffer
  			nnspool-inews-program nnspool-inews-switches)))
        (set-process-sentinel proc 'nnspool-inews-sentinel)
--- 316,323 ----
  (defun nnspool-request-post (&optional server)
    "Post a new news in current buffer."
    (save-excursion
!     (let* ((process-connection-type nil) ; t bugs out on Solaris
! 	   (inews-buffer (generate-new-buffer " *nnspool post*"))
  	   (proc (apply 'start-process "*nnspool inews*" inews-buffer
  			nnspool-inews-program nnspool-inews-switches)))
        (set-process-sentinel proc 'nnspool-inews-sentinel)
*** pub/dgnus//lisp/ChangeLog	Thu May 25 07:06:15 1995
--- dgnus//lisp/ChangeLog	Sat May 27 10:46:12 1995
***************
*** 1,5 ****
--- 1,46 ----
+ Sat May 27 09:25:52 1995  Lars Magne Ingebrigtsen  <larsi@bera.ifi.uio.no>
+ 
+ 	* nnmail.el (nnmail-split-incoming): Would bug out on long
+ 	content-lengths.
+ 
+ 	* gnus.el (gnus-active-to-gnus-format): Do more checking. 
+ 	(gnus-summary-prev-page): Would not configure windows. 
+ 
+ 	* gnus-cache.el (gnus-cache-possibly-enter-article): Did not
+ 	insert From headers in nov files.
+ 
+ 	* nnbabyl.el (nnbabyl-retrieve-headers): Misspelled func name.
+ 
+ 	* gnus.el (gnus-browse-group-name): Did not work.
+ 	(gnus-browse-select-group): No interactive spec.
+ 
+ 	* gnus-msg.el (gnus-mail-reply-using-mail): `C-c C-y' woyld yank
+ 	only headers. 
+ 
+ Fri May 26 06:34:55 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+ 
+ 	* gnus.el (gnus-group-make-doc-group): New command and keystroke. 
+ 
+ 	* nndoc.el (nndoc-open-server): New implementation. Now does
+ 	babyl, mbox and digest.
+ 
+ 	* nnspool.el (nnspool-request-post): Use a pipe instead of a pty. 
+ 
+ 	* gnus-msg.el (gnus-inews-insert-headers): Do the _-_ a bit more
+ 	intelligently. 
+ 
+ Thu May 25 13:05:05 1995  Lars Ingebrigtsen  <lars@eyesore.no>
+ 
+ 	* gnus.el (gnus-summary-enter-digest-group): Did not work.
+ 
+ 	* nndigest.el (nndigest-current-buffer): Doc fix.
+ 
+ 	* nnmh.el (nnmh-request-list): Would recurse needlessly. 
+ 
  Thu May 25 05:34:16 1995  Lars Magne Ingebrigtsen  <larsi@bera.ifi.uio.no>
  
+ 	* gnus.el: 0.77 is released.
+ 	
  	* gnus.el (gnus-article-date-ut): Ignore missing dates. 
  	(gnus-group-enter-directory): New command and keystroke.
  
*** pub/dgnus//lisp/Makefile	Thu May 25 07:06:15 1995
--- dgnus//lisp/Makefile	Sat May 27 06:57:52 1995
***************
*** 1,103 ****
! include ../Makefile.conf
  
! .SUFFIXES:	.el .elc
! .el.elc:;	 $(ELC) $<
  
! # virtual	adds stuff for virtual groups
! # nnmbox	adds back end for mbox mail groups
! # nnml		adds back end for nnml mail groups
! # nnmh		adds back end for nnmh mail groups
! # nnspool	adds back ends for local news spool
! # mh		adds functions for using MH interface for mail and mail output
  
- SUBSETS		=gnus nntp virtual nnmbox nnml nnmh nnspool mh
  
- DGNUS.el	=gnus-cache.el gnus-cite.el gnus-ems.el \
- 		gnus-kill.el gnus-mh.el gnus-msg.el gnus-score.el gnus-uu.el \
- 		gnus-vis.el gnus-vm.el gnus.el nnbabyl.el nndigest.el \
- 		nndir.el nndoc.el nnfolder.el nnheader.el nnkiboze.el \
- 		nnmail.el nnmbox.el nnmh.el nnml.el nnspool.el nntp.el \
- 		nnvirtual.el nneething.el
- 
- DGNUS.elc	=$(DGNUS.el:.el=.elc)
- 
- .PHONY:		syntax all elc $(SUBSETS)
- 
- syntax:
- 	@echo "make one or more of: all elc $(SUBSETS)"
- 	@exit 1
- 
- all:		$(DGNUS.elc)
- 
- elc:		$(DGNUS.el)
- 	 $(ELC) $(DGNUS.el)
- 
- install::	$(DGNUS.elc) $(DESTELC)
- 	$(INSTALL) $(INSTDFLAGS) $(DGNUS.elc) $(DESTELC)
- 
- install::	$(DGNUS.el) $(DESTEL)
- 	case "$(DESTEL)" in \
- 	?*) $(INSTALL) $(INSTDFLAGS) $(DGNUS.el) $(DESTEL);; \
- 	esac
- 
- $(DESTEL):;	$(MKDIRS) $? && chmod $(MODEDIR) $?
- $(DESTELC):;	$(MKDIRS) $? && chmod $(MODEDIR) $?
- 
- gnus:		nnheader.elc gnus.elc gnus-vis.elc gnus-uu.elc
- mh:		gnus gnus-mh.elc
- nnmbox:		gnus nnmail.elc  nnmbox.elc
- nnmh:		gnus nnmail.elc nnmh.elc
- nnml:		gnus nnmail.elc nnml.elc
- nntp:		gnus nntp.elc 
- nnspool:	nntp nnspool.elc
- virtual:	nntp nnvirtual.elc
- 
- gnus-cache.elc:	gnus.el
- gnus-cite.elc:	gnus-msg.el
- gnus-cite.elc:	gnus.el
- gnus-kill.elc:	gnus.el
- gnus-mh.elc:	gnus-msg.el
- gnus-mh.elc:	gnus.el
- gnus-msg.elc:	gnus.el
- gnus-score.elc:	gnus.el
- gnus-uu.elc:	gnus-msg.el
- gnus-uu.elc:	gnus.el
- gnus-vis.elc:	gnus.el
- gnus-vm.elc:	gnus-msg.el
- gnus-vm.elc:	gnus.el
- gnus.elc:	gnus-ems.el
- gnus.elc:	nnheader.el
- gnus.elc:	nnmh.el
- gnus.elc:	nnspool.el
- gnus.elc:	nntp.el
- nnbabyl.elc:	nnheader.el
- nnbabyl.elc:	nnmail.el
- nndigest.elc:	nnheader.el
- nndir.elc:	nnheader.el
- nndir.elc:	nnmh.el
- nndir.elc:	nnml.el
- nneething.elc:  nnheader.el
- nneething.elc:  nnmail.el
- nndoc.elc:	nnheader.el
- nndoc.elc:	nnmail.el
- nnfolder.elc:	gnus.el
- nnfolder.elc:	nnheader.el
- nnfolder.elc:	nnmail.el
- nnkiboze.elc:	gnus-score.el
- nnkiboze.elc:	gnus.el
- nnkiboze.elc:	nnheader.el
- nnkiboze.elc:	nntp.el
- nnmail.elc:	nnheader.el
- nnmbox.elc:	nnheader.el
- nnmbox.elc:	nnmail.el
- nnmh.elc:	gnus.el
- nnmh.elc:	nnheader.el
- nnmh.elc:	nnmail.el
- nnml.elc:	nnheader.el
- nnml.elc:	nnmail.el
- nnspool.elc:	nnheader.el
- nnspool.elc:	nntp.el
- nntp.elc:	nnheader.el
- nnvirtual.elc:	gnus.el
- nnvirtual.elc:	nnheader.el
- nnvirtual.elc:	nntp.el
--- 1,10 ----
! EMACS=emacs
! FLAGS=-batch -l ./dgnushack.el
  
! all:
! 	$(EMACS) $(FLAGS) -f batch-byte-compile *.el
  
! some:
! 	$(EMACS) $(FLAGS) -f dgnushack-recompile
  
  
*** pub/dgnus//Makefile	Thu May 25 07:06:16 1995
--- dgnus//Makefile	Sat May 27 08:35:54 1995
***************
*** 1,16 ****
! .PHONY: lisp texi elc info
  
! all: elc texi
  
! lisp:
! 	cd lisp; $(MAKE) all
! 
! texi:
! 	cd texi; $(MAKE) all
  
! 
! elc:
! 	cd lisp; $(MAKE) elc
  
  info:
! 	cd lisp; $(MAKE) info
--- 1,12 ----
! EMACS=emacs
  
! all: lick info
  
! lick:
! 	cd lisp; $(MAKE) EMACS=$(EMACS) all
  
! some:
! 	cd lisp; $(MAKE) EMACS=$(EMACS) some
  
  info:
! 	cd texi; $(MAKE) all
*** pub/dgnus//texi/Makefile	Thu May 25 07:06:16 1995
--- dgnus//texi/Makefile	Sat May 27 06:49:31 1995
***************
*** 1,33 ****
! include ../Makefile.conf
  
! COMPILE		=-f batch-texinfo-format
  
! .SUFFIXES:	.texi .info .info.gz
  
! .texi.info:;	$(EMAKEINFO) $<
! 
! .info.info.gz:;	gzip -c $< > $<.gz
! 
! DGNUS.texi	=gnus.texi
! DGNUS.info	=gnus gnus-1 gnus-2 gnus-3 \
! 		gnus-4 gnus-5 gnus-6 gnus-7
! 
! .PHONY:		syntax all info
! 
! syntax:
! 	@echo "make one or more of: all info"
! 	@exit 1
! 
! all:		$(DGNUS.info)
! 	$(EMAKEINFO) $(DGNUS.texi)
! 
! info:		$(DGNUS.texi)
! 	$(EMAKEINFO) $(DGNUS.texi)
! 
! #DGNUS.info.gz	=$(DGNUS.info:.info=.info.gz)
! 
! #install:	$(DGNUS.info.gz) $(DESTINFO)
! #	$(INSTALL) $(INSTDFLAGS) $(DGNUS.info.gz) $(DESTINFO)
! 
! 
! #$(DESTINFO):;	$(MKDIRS) $? && chmod $(MODEDIR) $?
--- 1,10 ----
! MAKEINFO=makeinfo
! TEXI2DVI=texi2dvi
  
! all: gnus
  
! gnus: gnus.texi
! 	$(MAKEINFO) -o gnus gnus.texi
  
! dvi: gnus.texi
! 	$(TEXI2DVI) gnus.texi
*** pub/dgnus//texi/gnus.texi	Thu May 25 07:06:16 1995
--- dgnus//texi/gnus.texi	Sat May 27 06:49:33 1995
***************
*** 1291,1296 ****
--- 1291,1304 ----
  Read a random directory as if with were a newsgroup with the
  @code{nneething} backend (@code{gnus-group-enter-directory}).
  
+ @item G f
+ @kindex G f (Group)
+ @findex gnus-group-make-doc-group
+ Make a group based on some file or other
+ (@code{gnus-group-make-doc-group}).  You will be prompted for a file
+ name and a file type.  Currently supported types are @code{babyl},
+ @code{mbox} and @code{digest}.
+ 
  @item G V
  @kindex G V (Group)
  @findex gnus-group-make-empty-virtual
***************
*** 1314,1320 ****
  * nndir::            You can read a directory as if it was a newsgroup.
  * nneething::          Dired? Who needs dired?
  * nndoc::            Single files can be the basis of a group.
- * nndigest::         Digests can be undigested and treated as a group.
  * Reading Mail::     Reading your personal mail with Gnus.
  @end menu
  
--- 1322,1327 ----
***************
*** 1711,1739 ****
  @cindex help group
  
  nndoc is a cute little thing that will let you read a single file as a
! newsgroup.  The file has to be divided into articles by the use of Unix
! mbox @samp{From } lines.  nndoc will not try to change the file or
! insert any extra headers into it - it will simply, like, let you use the
! file as the basis for a group.  And that's it.
! 
! @node nndigest
! @subsection nndigest
! @cindex nndigest
! @cindex digest groups
! 
! nndigest is a bit odd.  It will use a buffer containing a valid digest
! as the basis for a group.
! 
! These nndigest groups are rather ephemeral.  They will never store
! information on what articles you have read, and you can't really use
! them as foreign groups at all.  The only way to reach an nndigest group
! is to type @kbd{V D} on a digest in the summary buffer.
! 
! When you have finished reading the digest and press @kbd{q}, you will be
! returned to the group from whence you came instead of going to the group
! buffer.
  
! Odd all over, as you can see, but somewhat useful.
  
  @node Reading Mail
  @subsection Reading Mail
--- 1718,1737 ----
  @cindex help group
  
  nndoc is a cute little thing that will let you read a single file as a
! newsgroup.  Currently supported file types are @code{babyl}, @code{mbox}
! and @code{digest}. 
! 
! nndoc will not try to change the file or insert any extra headers into
! it - it will simply, like, let you use the file as the basis for a
! group.  And that's it.
  
! Virtual server variables:
! 
! @table @code
! @item nndoc-article-type
! @vindex nndoc-article-type
! This should be one of @code{mbox}, @code{babyl} or @code{digest}. 
! @end table
  
  @node Reading Mail
  @subsection Reading Mail
***************
*** 5719,5725 ****
  @findex gnus-summary-enter-digest-group
  If the current article is a digest, you might use this command to enter
  you into a group based on the current digest to ease reading
! (@code{gnus-summary-enter-digest-group}).  @xref{nndigest}.
  @item V T
  @kindex V T (Summary)
  @findex gnus-summary-toggle-truncation
--- 5717,5723 ----
  @findex gnus-summary-enter-digest-group
  If the current article is a digest, you might use this command to enter
  you into a group based on the current digest to ease reading
! (@code{gnus-summary-enter-digest-group}).
  @item V T
  @kindex V T (Summary)
  @findex gnus-summary-toggle-truncation
