diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/Makefile dgnus/Makefile *** pub/dgnus/Makefile Wed Apr 19 07:17:13 1995 --- dgnus/Makefile Thu Apr 20 01:59:09 1995 *************** *** 3,9 **** all: elc info elc: ! cd lisp; make DEMACS=$(EMACS) elc info: cd texi; makeinfo gnus.texi --- 3,9 ---- all: elc info elc: ! cd lisp; make EMACS=$(EMACS) elc info: cd texi; makeinfo gnus.texi diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/ChangeLog dgnus/lisp/ChangeLog *** pub/dgnus/lisp/ChangeLog Wed Apr 19 07:17:13 1995 --- dgnus/lisp/ChangeLog Thu Apr 20 03:46:31 1995 *************** *** 1,3 **** --- 1,31 ---- + Thu Apr 20 01:56:59 1995 Lars Magne Ingebrigtsen + + * gnus-uu.el (gnus-uu-part-number): New function. + + * gnus.el (gnus-post-news): Don't require a group name to be legal + to allow composing the article. + (gnus-set-mode-line): Would bug out on a non-numerical + non-string-length. + (gnus-mail-reply-using-mail): Would go to the summary buffer + instead of the mail buffer with non-standard window configs. + (gnus-summary-next-page): Go to the summary buffer. + (gnus-mail-reply-using-mail): Yank before hook. + (gnus-group-mode-map): Reinstituted to old keystrokes. + Installed Eric Selberg's mh and split-window patches. + + * nntp.el (nntp-open-server-function): New variable. + (nntp-rlogin-parameters): New variable. + (nntp-rlogin-user-name): New variable. + (nntp-open-rlogin-stream): New function. + (nntp-open-network-stream): New function. + (nntp-retrieve-groups): New function. + (nntp-open-server): Don't break on a defs list containing just + "nntp" or a port number. + + Wed Apr 19 07:19:31 1995 Lars Magne Ingebrigtsen + + * gnus.el: 0.52 is released. + Wed Apr 19 05:51:27 1995 Lars Magne Ingebrigtsen * nntp.el (nntp-request-group): Error in regexp when using LIST diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-mh.el dgnus/lisp/gnus-mh.el *** pub/dgnus/lisp/gnus-mh.el Wed Apr 19 07:17:09 1995 --- dgnus/lisp/gnus-mh.el Thu Apr 20 03:14:34 1995 *************** *** 70,78 **** The command \\[mh-yank-cur-msg] yank the original message into current buffer." ;; First of all, prepare mhe mail buffer. ;; Bug fix by Timo METZEMAKERS . ! (pop-to-buffer gnus-article-buffer) ! (let (from cc subject date to reply-to (buffer (current-buffer))) (save-restriction (gnus-article-show-all-headers) ;I don't think this is really needed. (setq from (gnus-fetch-field "from") subject (let ((subject (or (gnus-fetch-field "subject") --- 70,91 ---- The command \\[mh-yank-cur-msg] yank the original message into current buffer." ;; First of all, prepare mhe mail buffer. ;; Bug fix by Timo METZEMAKERS . ! (let (from cc subject date to reply-to to-userid orig-to ! (config (current-window-configuration)) ! (buffer)) ! (pop-to-buffer gnus-article-buffer) ! (setq buffer (current-buffer)) (save-restriction + (or gnus-user-login-name ;; here cuz we need it here. + (setq gnus-user-login-name (or (getenv "USER") + (getenv "LOGNAME")))) + ;; junk which mh-send did, but now we do. also better, cuz doesn't + ;; call delete-other-windows when we don't want it to. + (if gnus-split-window + (progn + (split-window-vertically) + )) + (gnus-article-show-all-headers) ;I don't think this is really needed. (setq from (gnus-fetch-field "from") subject (let ((subject (or (gnus-fetch-field "subject") *************** *** 82,92 **** (concat "Re: " subject) subject)) reply-to (gnus-fetch-field "reply-to") cc (gnus-fetch-field "cc") date (gnus-fetch-field "date")) - (setq mh-show-buffer buffer) (setq to (or reply-to from)) (mh-find-path) ! (mh-send to (or cc "") subject) (save-excursion (mh-insert-fields "In-reply-to:" --- 95,117 ---- (concat "Re: " subject) subject)) reply-to (gnus-fetch-field "reply-to") cc (gnus-fetch-field "cc") + orig-to (or (gnus-fetch-field "to") "") date (gnus-fetch-field "date")) (setq to (or reply-to from)) + (setq to-userid (mail-strip-quoted-names orig-to)) + (if (or (string-match "," orig-to) + (not (string-match (substring to-userid 0 (string-match "@" to-userid)) + gnus-user-login-name))) + (setq cc (concat (if cc (concat cc ", ") "") orig-to)) + ) + ; (setq mh-show-buffer buffer) + (mh-find-path) ! (mh-goto-header-end 0) ! (if gnus-split-window ! (mh-send-sub to (or cc "") (or subject "(None)") config) ;; Erik Selberg 1/23/94 ! (mh-send to (or cc "") subject) ;; shouldn't use according to mhe ! ) (save-excursion (mh-insert-fields "In-reply-to:" *************** *** 95,102 **** "'s message of " date))) (setq mh-sent-from-folder buffer) (setq mh-sent-from-msg 1) )) ! ;; Then, yank original article if requested. (if yank (let ((last (point))) (mh-yank-cur-msg) --- 120,129 ---- "'s message of " date))) (setq mh-sent-from-folder buffer) (setq mh-sent-from-msg 1) + (setq mh-previous-window-config config) )) ! ! ;; Then, yank original article if requested. (if yank (let ((last (point))) (mh-yank-cur-msg) *************** *** 112,141 **** (let ((to (read-string "To: ")) (cc (read-string "Cc: ")) (buffer (current-buffer)) ! subject beg) ;;(gnus-article-show-all-headers) (setq subject (concat "[" gnus-newsgroup-name "] " ;;(mail-strip-quoted-names (gnus-fetch-field "From")) ": " (or (gnus-fetch-field "subject") ""))) (setq mh-show-buffer buffer) (mh-find-path) ! (mh-send to (or cc "") subject) (save-excursion (goto-char (point-max)) - (setq beg (point)) (insert "\n------- Forwarded Message\n\n") (insert-buffer buffer) (goto-char (point-max)) (insert "\n------- End of Forwarded Message\n") - (goto-char beg) - (while (setq beg (next-single-property-change (point) 'invisible)) - (goto-char beg) - (delete-region beg (or (next-single-property-change - (point) 'invisible) - (point-max)))) (setq mh-sent-from-folder buffer) ! (setq mh-sent-from-msg 1)))) (defun gnus-mail-other-window-using-mhe () "Compose mail other window using mh-e." --- 139,173 ---- (let ((to (read-string "To: ")) (cc (read-string "Cc: ")) (buffer (current-buffer)) ! subject ! (config (current-window-configuration))) ;; need to add this - erik ;;(gnus-article-show-all-headers) + (if gnus-split-window + (progn + (pop-to-buffer gnus-article-buffer) + (split-window-vertically) + (setq buffer (current-buffer)) + )) (setq subject (concat "[" gnus-newsgroup-name "] " ;;(mail-strip-quoted-names (gnus-fetch-field "From")) ": " (or (gnus-fetch-field "subject") ""))) (setq mh-show-buffer buffer) (mh-find-path) ! (if gnus-split-window ! (mh-send-sub to (or cc "") subject config) ! (mh-send to (or cc "") subject) ! ) (save-excursion (goto-char (point-max)) (insert "\n------- Forwarded Message\n\n") (insert-buffer buffer) (goto-char (point-max)) (insert "\n------- End of Forwarded Message\n") (setq mh-sent-from-folder buffer) ! (setq mh-sent-from-msg 1) ! (setq mh-previous-window-config config) ! ))) (defun gnus-mail-other-window-using-mhe () "Compose mail other window using mh-e." diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-uu.el dgnus/lisp/gnus-uu.el *** pub/dgnus/lisp/gnus-uu.el Wed Apr 19 07:17:09 1995 --- dgnus/lisp/gnus-uu.el Thu Apr 20 03:55:52 1995 *************** *** 511,517 **** (concat dir (file-name-nondirectory file)) dir)) (and (or (not (file-exists-p to-file)) ! (gnus-y-or-n-p (format "%s exists; overwrite? "))) (copy-file file to-file 1 t)))) (setq files (cdr files))) (message "Saved %d file%s" len (if (> len 1) "s" "")))) --- 511,517 ---- (concat dir (file-name-nondirectory file)) dir)) (and (or (not (file-exists-p to-file)) ! (gnus-y-or-n-p (format "%s exists; overwrite? " to-file))) (copy-file file to-file 1 t)))) (setq files (cdr files))) (message "Saved %d file%s" len (if (> len 1) "s" "")))) *************** *** 947,953 **** (setq state 'first-and-last) (setq state 'last))) ! (message "Getting article %d" article) (if (not (= (or gnus-current-article 0) article)) (progn --- 947,953 ---- (setq state 'first-and-last) (setq state 'last))) ! (message "Getting article %d, %s" article (gnus-uu-part-number article)) (if (not (= (or gnus-current-article 0) article)) (progn *************** *** 1040,1045 **** --- 1040,1052 ---- (setq result-files nil)) (gnus-uu-unmark-list-of-grabbed))))) result-files)) + + (defun gnus-uu-part-number (article) + (let ((subject (header-subject (gnus-get-header-by-number article)))) + (if (string-match "([0-9]+ */[0-9]+)\\|([0-9]+ * of *[0-9]+)" + subject) + (substring subject (match-beginning 0) (match-end 0)) + ""))) (defun gnus-uu-uudecode-sentinel (process event) (delete-process (get-process process))) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus.el dgnus/lisp/gnus.el *** pub/dgnus/lisp/gnus.el Wed Apr 19 07:17:11 1995 --- dgnus/lisp/gnus.el Thu Apr 20 03:46:46 1995 *************** *** 47,54 **** (if (and gnus-default-nntp-server (not (string= gnus-default-nntp-server ""))) gnus-default-nntp-server) ! (system-name)) ! "nntp") "*Default method for selecting a newsgroup. This variable should be a list, where the first element is how the news is to be fetched, the second is the address. An optional third --- 47,53 ---- (if (and gnus-default-nntp-server (not (string= gnus-default-nntp-server ""))) gnus-default-nntp-server) ! (system-name))) "*Default method for selecting a newsgroup. This variable should be a list, where the first element is how the news is to be fetched, the second is the address. An optional third *************** *** 653,658 **** --- 652,661 ---- (defvar gnus-use-full-window t "*If non-nil, use the entire Emacs screen.") + ; for split windows. maybe a better way? + (defvar gnus-split-window nil + "*If non-nil, put the article buffer in left-hand side of the window .") + (defvar gnus-window-configuration '((summary (0 1 0)) (newsgroups (1 0 0)) *************** *** 826,831 **** --- 829,835 ---- %F Contents of the From: header (string) %x Contents of the Xref: header (string) %D Date of the article (string) + %d Date of the article (string) in DD-MMM format %M Message-id of the article (string) %r References of the article (string) %c Number of characters in the article (integer) *************** *** 1251,1256 **** --- 1255,1261 ---- (list ?F 'from ?s) (list ?x (macroexpand '(header-xref header)) ?s) (list ?D (macroexpand '(header-date header)) ?s) + (list ?d '(gnus-dd-mmm (header-date header)) ?s) (list ?M (macroexpand '(header-id header)) ?s) (list ?r (macroexpand '(header-references header)) ?s) (list ?c (macroexpand '(header-chars header)) ?d) *************** *** 1298,1304 **** (defconst gnus-maintainer "Lars Magne Ingebrigtsen " "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.52" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1303,1309 ---- (defconst gnus-maintainer "Lars Magne Ingebrigtsen " "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.53" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 2188,2194 **** (grpheight 0) (subheight 0) (artheight 0) - ;; Make split-window-vertically leave focus in upper window. (split-window-keep-point t)) (if (and (symbolp windows) (fboundp windows)) --- 2193,2198 ---- *************** *** 2229,2243 **** (setq subheight (max window-min-height (/ (* height (nth 1 windows)) winsum)))) (if (not (zerop (nth 2 windows))) ! (setq artheight (max window-min-height ! (/ (* height (nth 2 windows)) winsum)))) (setq height (+ grpheight subheight artheight)) (enlarge-window (max 0 (- height (window-height (selected-window))))) ;; Then split the window. ! (and (not (zerop artheight)) ! (or (not (zerop grpheight)) ! (not (zerop subheight))) ! (split-window-vertically (+ grpheight subheight))) (and (not (zerop grpheight)) (not (zerop subheight)) (split-window-vertically grpheight)) --- 2233,2251 ---- (setq subheight (max window-min-height (/ (* height (nth 1 windows)) winsum)))) (if (not (zerop (nth 2 windows))) ! (if gnus-split-window ;hack by erik ! (setq artheight height) ! (setq artheight (max window-min-height ! (/ (* height (nth 2 windows)) winsum))))) (setq height (+ grpheight subheight artheight)) (enlarge-window (max 0 (- height (window-height (selected-window))))) ;; Then split the window. ! (if (and (not (zerop artheight)) ! (or (not (zerop grpheight)) ! (not (zerop subheight)))) ! (if gnus-split-window ! (split-window-horizontally) ! (split-window-vertically (+ grpheight subheight)))) (and (not (zerop grpheight)) (not (zerop subheight)) (split-window-vertically grpheight)) *************** *** 2443,2448 **** --- 2451,2469 ---- ;; return nil. (not (memq symbol gnus-use-long-file-name))))) + ;; I suspect there's a better way, but I haven't taken the time to do + ;; it yet. -erik selberg@cs.washington.edu + (defun gnus-dd-mmm (messy-date) + "Return a string like DD-MMM from a big messy string" + (let ((datevec (timezone-parse-date messy-date))) + (format "%2s-%s" + (or (aref datevec 2) "??") + (capitalize + (or (car + (nth (1- (string-to-number (aref datevec 1))) + timezone-months-assoc)) + "???"))))) + ;; List and range functions (defun gnus-last-element (list) *************** *** 2788,2793 **** --- 2809,2816 ---- (define-key gnus-group-mode-map "^" 'gnus-group-enter-server-mode) (define-key gnus-group-mode-map (if gnus-xemacs [button2] [mouse-2]) 'gnus-mouse-pick-group) + (define-key gnus-group-mode-map "<" 'beginning-of-buffer) + (define-key gnus-group-mode-map ">" 'end-of-buffer) (define-prefix-command 'gnus-group-make-map) (define-key gnus-group-mode-map "M" 'gnus-group-make-map) *************** *** 5837,5843 **** (subject (if gnus-current-headers (header-subject gnus-current-headers) "")) ! (max-len (- (frame-width) gnus-mode-non-string-length)) header) ;; passed as argument to any user-format-funcs (setq mode-string (eval mformat)) (and (numberp max-len) --- 5860,5867 ---- (subject (if gnus-current-headers (header-subject gnus-current-headers) "")) ! (max-len (and gnus-mode-non-string-length ! (- (frame-width) gnus-mode-non-string-length))) header) ;; passed as argument to any user-format-funcs (setq mode-string (eval mformat)) (and (numberp max-len) *************** *** 6984,6989 **** --- 7008,7014 ---- current article." (interactive "P") (setq gnus-summary-buffer (current-buffer)) + (gnus-set-global-variables) (let ((article (gnus-summary-article-number)) (endp nil)) (if (or (null gnus-current-article) *************** *** 6993,7009 **** ;; Selected subject is different from current article's. (gnus-summary-display-article article) (gnus-configure-windows 'article) - (pop-to-buffer gnus-summary-buffer) (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 (message "End of message")) ((null lines) ! (gnus-summary-next-unread-article)))))) (gnus-summary-position-cursor)) (defun gnus-summary-prev-page (lines) --- 7018,7035 ---- ;; Selected subject is different from current article's. (gnus-summary-display-article article) (gnus-configure-windows 'article) (gnus-eval-in-buffer-window gnus-article-buffer (setq endp (gnus-article-next-page lines))) + (pop-to-buffer gnus-summary-buffer) (if endp (cond (circular (gnus-summary-beginning-of-article)) (lines (message "End of message")) ((null lines) ! (gnus-summary-next-unread-article)))) ! (pop-to-buffer gnus-summary-buffer))) (gnus-summary-position-cursor)) (defun gnus-summary-prev-page (lines) *************** *** 7418,7428 **** (format "(%s default) " gnus-current-move-group) "")) gnus-active-hashtb nil nil prefix))) ! (if (or (string= to-newsgroup "") (string= to-newsgroup prefix)) ! (setq to-newsgroup (or gnus-current-move-group ""))) ! (or (gnus-gethash to-newsgroup gnus-active-hashtb) ! (error "No such group: %s" to-newsgroup)) ! (setq gnus-current-move-group to-newsgroup) (or (gnus-check-backend-function 'request-accept-article (or select-method to-newsgroup)) (error "%s does not support article moving" to-newsgroup)) --- 7444,7456 ---- (format "(%s default) " gnus-current-move-group) "")) gnus-active-hashtb nil nil prefix))) ! (if to-newsgroup ! (progn ! (if (or (string= to-newsgroup "") (string= to-newsgroup prefix)) ! (setq to-newsgroup (or gnus-current-move-group ""))) ! (or (gnus-gethash to-newsgroup gnus-active-hashtb) ! (error "No such group: %s" to-newsgroup)) ! (setq gnus-current-move-group to-newsgroup))) (or (gnus-check-backend-function 'request-accept-article (or select-method to-newsgroup)) (error "%s does not support article moving" to-newsgroup)) *************** *** 7507,7514 **** (if (assoc (symbol-name (car (gnus-find-method-for-group gnus-newsgroup-name))) respool-methods) ! (gnus-summary-copy-article n nil (intern respool-method))) ! (gnus-summary-move-article n nil (intern respool-method)))) ;; Suggested by gregj@unidata.com (Gregory J. Grubbs). (defun gnus-summary-copy-article (n &optional to-newsgroup select-method) --- 7535,7542 ---- (if (assoc (symbol-name (car (gnus-find-method-for-group gnus-newsgroup-name))) respool-methods) ! (gnus-summary-move-article n nil (intern respool-method))) ! (gnus-summary-copy-article n nil (intern respool-method)))) ;; Suggested by gregj@unidata.com (Gregory J. Grubbs). (defun gnus-summary-copy-article (n &optional to-newsgroup select-method) *************** *** 7541,7551 **** (format "(%s default) " gnus-current-move-group) "")) gnus-active-hashtb nil nil prefix))) ! (if (or (string= to-newsgroup "") (string= to-newsgroup prefix)) ! (setq to-newsgroup (or gnus-current-move-group ""))) ! (or (gnus-gethash to-newsgroup gnus-active-hashtb) ! (error "No such group: %s" to-newsgroup)) ! (setq gnus-current-move-group to-newsgroup) (or (gnus-check-backend-function 'request-accept-article (or select-method to-newsgroup)) (error "%s does not support article copying" to-newsgroup)) --- 7569,7581 ---- (format "(%s default) " gnus-current-move-group) "")) gnus-active-hashtb nil nil prefix))) ! (if to-newsgroup ! (progn ! (if (or (string= to-newsgroup "") (string= to-newsgroup prefix)) ! (setq to-newsgroup (or gnus-current-move-group ""))) ! (or (gnus-gethash to-newsgroup gnus-active-hashtb) ! (error "No such group: %s" to-newsgroup)) ! (setq gnus-current-move-group to-newsgroup))) (or (gnus-check-backend-function 'request-accept-article (or select-method to-newsgroup)) (error "%s does not support article copying" to-newsgroup)) *************** *** 11021,11027 **** (setq gnus-winconf-post-news (current-window-configuration)) (let ((gnus-newsgroup-name nil)) (unwind-protect ! (gnus-post-news 'post) (or (and (eq (current-buffer) (get-buffer gnus-post-news-buffer)) (not (zerop (buffer-size)))) ;; Restore last window configuration. --- 11051,11068 ---- (setq gnus-winconf-post-news (current-window-configuration)) (let ((gnus-newsgroup-name nil)) (unwind-protect ! (if gnus-split-window ! (progn ! (pop-to-buffer gnus-article-buffer) ! (widen) ! (split-window-vertically) ! (gnus-post-news 'post)) ! (progn ! (pop-to-buffer gnus-article-buffer) ! (widen) ! (delete-other-windows) ! (gnus-post-news 'post)) ! ) (or (and (eq (current-buffer) (get-buffer gnus-post-news-buffer)) (not (zerop (buffer-size)))) ;; Restore last window configuration. *************** *** 11172,11178 **** post (not group) (progn (setq group ! (completing-read "Group: " gnus-active-hashtb nil t)) (setq subject (read-string "Subject: ")))) (setq mail-reply-buffer article-buffer) --- 11213,11219 ---- post (not group) (progn (setq group ! (completing-read "Group: " gnus-active-hashtb)) (setq subject (read-string "Subject: ")))) (setq mail-reply-buffer article-buffer) *************** *** 11958,11965 **** ;; Bug fix by jbw@bigbird.bu.edu (Joe Wells) ;; Stripping headers should be specified with mail-yank-ignored-headers. (gnus-set-global-variables) - (gnus-summary-select-article t) (setq gnus-winconf-post-news (current-window-configuration)) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (bury-buffer gnus-article-buffer) (funcall gnus-mail-reply-method yank)) --- 11999,12006 ---- ;; Bug fix by jbw@bigbird.bu.edu (Joe Wells) ;; Stripping headers should be specified with mail-yank-ignored-headers. (gnus-set-global-variables) (setq gnus-winconf-post-news (current-window-configuration)) + (gnus-summary-select-article t) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (bury-buffer gnus-article-buffer) (funcall gnus-mail-reply-method yank)) *************** *** 11977,11983 **** (interactive) (gnus-summary-select-article t) (setq gnus-winconf-post-news (current-window-configuration)) ! (set-buffer gnus-article-buffer) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (funcall gnus-mail-forward-method)) (gnus-article-hide-headers-if-wanted)) --- 12018,12028 ---- (interactive) (gnus-summary-select-article t) (setq gnus-winconf-post-news (current-window-configuration)) ! (or gnus-split-window ! (switch-to-buffer gnus-article-buffer)) ! (widen) ! (or gnus-split-window (delete-other-windows)) ! (or gnus-split-window (bury-buffer gnus-article-buffer)) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (funcall gnus-mail-forward-method)) (gnus-article-hide-headers-if-wanted)) *************** *** 12071,12090 **** (forward-line 1) (if yank (let ((last (point))) (run-hooks 'news-reply-header-hook) - (mail-yank-original nil) (goto-char last)))) ! (if (not yank) ! (let ((mail (current-buffer))) ! (gnus-configure-windows '(0 0 1)) ! (switch-to-buffer-other-window mail)) ! (gnus-configure-windows '(0 1 0)) ! (switch-to-buffer (current-buffer)))))) (defun gnus-mail-yank-original () (interactive) ! (run-hooks 'news-reply-header-hook) ! (mail-yank-original nil)) (defun gnus-mail-send-and-exit () (interactive) --- 12116,12138 ---- (forward-line 1) (if yank (let ((last (point))) + (save-excursion + (mail-yank-original nil)) (run-hooks 'news-reply-header-hook) (goto-char last)))) ! (let ((mail (current-buffer))) ! (if yank ! (progn ! (gnus-configure-windows '(0 1 0)) ! (switch-to-buffer mail)) ! (gnus-configure-windows '(0 0 1)) ! (switch-to-buffer-other-window mail)))))) (defun gnus-mail-yank-original () (interactive) ! (save-excursion ! (mail-yank-original nil)) ! (run-hooks 'news-reply-header-hook)) (defun gnus-mail-send-and-exit () (interactive) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/nntp.el dgnus/lisp/nntp.el *** pub/dgnus/lisp/nntp.el Wed Apr 19 07:17:11 1995 --- dgnus/lisp/nntp.el Thu Apr 20 02:19:15 1995 *************** *** 35,41 **** (autoload 'cancel-timer "timer")) (defvar nntp-server-hook nil ! "Hooks for the NNTP server. If the kanji code of the NNTP server is different from the local kanji code, the correct kanji code of the buffer associated with the NNTP server must be specified as follows: --- 35,41 ---- (autoload 'cancel-timer "timer")) (defvar nntp-server-hook nil ! "*Hooks for the NNTP server. If the kanji code of the NNTP server is different from the local kanji code, the correct kanji code of the buffer associated with the NNTP server must be specified as follows: *************** *** 51,106 **** hook, use the variable `nntp-address'.") (defvar nntp-server-opened-hook nil ! "Hook used for sending commands to the server at startup. The ! default value is `nntp-send-mode-reader', whick makes an innd server ! spawn an nnrpd server. Another useful function to put in this hook ! might be `nntp-send-authinfo', which will prompt for a password to ! allow posting from the server. Note that this is only necessary to do ! on servers that use strict access control.") ! (add-hook 'nntp-server-opened-hook 'nntp-send-mode-reader) (defvar nntp-address nil ! "The name of the NNTP server.") (defvar nntp-port-number "nntp" ! "Port number to connect to.") (defvar nntp-large-newsgroup 50 ! "The number of the articles which indicates a large newsgroup. If the number of the articles is greater than the value, verbose messages will be shown to indicate the current status.") (defvar nntp-buggy-select (memq system-type '(fujitsu-uts)) ! "t if your select routine is buggy. If the select routine signals error or fall into infinite loop while waiting for the server response, the variable must be set to t. In case of Fujitsu UTS, it is set to T since `accept-process-output' doesn't work properly.") (defvar nntp-maximum-request 400 ! "The maximum number of the requests sent to the NNTP server at one time. If Emacs hangs up while retrieving headers, set the variable to a lower value.") (defvar nntp-debug-read 10000 ! "Display '...' every 10Kbytes of a message being received if it is non-nil. If it is a number, dots are displayed per the number.") (defvar nntp-nov-is-evil nil ! "If non-nil, nntp will never attempt to use XOVER when talking to the server.") (defvar nntp-xover-commands '("XOVER" "XOVERVIEW") ! "List of strings that are used as commands to fetch NOV lines from a server. The strings are tried in turn until a positive response is gotten. If none of the commands are successful, nntp will just grab headers one by one.") (defvar nntp-connection-timeout nil ! "Number of seconds to wait before an nntp connection times out. If this variable is nil, which is the default, no timers are set.") (defvar nntp-news-default-headers nil ! "If non-nil, override `mail-default-headers' when posting news.") --- 51,132 ---- hook, use the variable `nntp-address'.") (defvar nntp-server-opened-hook nil ! "*Hook used for sending commands to the server at startup. ! The default value is `nntp-send-mode-reader', whick makes an innd ! server spawn an nnrpd server. Another useful function to put in this ! hook might be `nntp-send-authinfo', which will prompt for a password ! to allow posting from the server. Note that this is only necessary to ! do on servers that use strict access control.") (add-hook ! 'nntp-server-opened-hook 'nntp-send-mode-reader) ! ! (defvar nntp-open-server-function 'nntp-open-network-stream ! "*Function used for connecting to a remote system. ! It will be called with the address of the remote system. ! ! Two pre-made functions are `nntp-open-network-stream', which is the ! default, and simply connects to some port or other on the remote ! system (see nntp-port-number). The other is `nntp-open-rlogin', which ! does an rlogin on the remote system, and then does a telnet to the ! NNTP server available there (see nntp-rlogin-parameters).") ! ! (defvar nntp-rlogin-parameters '("telnet" "${NNTPSERVER:=localhost}" "nntp") ! "*Parameters to `nntp-open-login'. ! That function may be used as `nntp-open-server-function'. In that ! case, this list will be used as the parameter list given to rsh.") ! ! (defvar nntp-rlogin-user-name nil ! "*User name on remote system when using the rlogin connect method.") (defvar nntp-address nil ! "*The name of the NNTP server.") (defvar nntp-port-number "nntp" ! "*Port number to connect to.") (defvar nntp-large-newsgroup 50 ! "*The number of the articles which indicates a large newsgroup. If the number of the articles is greater than the value, verbose messages will be shown to indicate the current status.") (defvar nntp-buggy-select (memq system-type '(fujitsu-uts)) ! "*t if your select routine is buggy. If the select routine signals error or fall into infinite loop while waiting for the server response, the variable must be set to t. In case of Fujitsu UTS, it is set to T since `accept-process-output' doesn't work properly.") (defvar nntp-maximum-request 400 ! "*The maximum number of the requests sent to the NNTP server at one time. If Emacs hangs up while retrieving headers, set the variable to a lower value.") (defvar nntp-debug-read 10000 ! "*Display '...' every 10Kbytes of a message being received if it is non-nil. If it is a number, dots are displayed per the number.") (defvar nntp-nov-is-evil nil ! "*If non-nil, nntp will never attempt to use XOVER when talking to the server.") (defvar nntp-xover-commands '("XOVER" "XOVERVIEW") ! "*List of strings that are used as commands to fetch NOV lines from a server. The strings are tried in turn until a positive response is gotten. If none of the commands are successful, nntp will just grab headers one by one.") (defvar nntp-connection-timeout nil ! "*Number of seconds to wait before an nntp connection times out. If this variable is nil, which is the default, no timers are set.") (defvar nntp-news-default-headers nil ! "*If non-nil, override `mail-default-headers' when posting news.") ! ! (defvar nntp-prepare-server-hook nil ! "*Hook run before a server is opened. ! If can be used to set up a server remotely, for instance. Say you ! have an account at the machine \"other.machine\". This machine has ! access to an NNTP server that you can't access locally. You could ! then use this hook to rsh to the remote machine and start a proxy NNTP ! server there that you can connect to.") *************** *** 121,127 **** instead call function `nntp-status-message' to get status message.") (defvar nntp-server-xover t) ! (defvar nntp-server-list-active-group t) (defvar nntp-current-group "") --- 147,153 ---- instead call function `nntp-status-message' to get status message.") (defvar nntp-server-xover t) ! (defvar nntp-server-list-active-group 'try) (defvar nntp-current-group "") *************** *** 141,150 **** (list 'nntp-xover-commands nntp-xover-commands) (list 'nntp-connection-timeout nntp-connection-timeout) (list 'nntp-news-default-headers nntp-news-default-headers) '(nntp-server-process nil) '(nntp-status-string nil) '(nntp-server-xover t) ! '(nntp-server-list-active-group t) '(nntp-current-group ""))) --- 167,177 ---- (list 'nntp-xover-commands nntp-xover-commands) (list 'nntp-connection-timeout nntp-connection-timeout) (list 'nntp-news-default-headers nntp-news-default-headers) + (list 'nntp-prepare-server-hook nntp-prepare-server-hook) '(nntp-server-process nil) '(nntp-status-string nil) '(nntp-server-xover t) ! '(nntp-server-list-active-group 'try) '(nntp-current-group ""))) *************** *** 207,223 **** ;; First, fold continuation lines. (goto-char (point-min)) (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) ! (replace-match " " t t)) ;; Remove all "\r"'s (goto-char (point-min)) ! (while (re-search-forward "\r" nil t) ! (replace-match "" t t)) 'headers)))) (defun nntp-open-server (server &optional defs) (nnheader-init-server-buffer) (if (nntp-server-opened server) t (or (assq 'nntp-address defs) (setq defs (append defs (list (list 'nntp-address server))))) (if (and nntp-current-server --- 234,309 ---- ;; First, fold continuation lines. (goto-char (point-min)) (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t) ! (replace-match " ")) ;; Remove all "\r"'s (goto-char (point-min)) ! (while (search-forward "\r" nil t) ! (replace-match "")) 'headers)))) + + (defun nntp-retrieve-groups (groups &optional server) + (nntp-possibly-change-server nil server) + (save-excursion + (set-buffer nntp-server-buffer) + (and (eq nntp-server-list-active-group 'try) + (nntp-try-list-active (car groups))) + (erase-buffer) + (let ((count 0) + (received 0) + (last-point (point-min)) + (command (if nntp-server-list-active-group + "LIST ACTIVE" "GROUP"))) + (while groups + (nntp-send-strings-to-server "HEAD" (car groups)) + (setq groups (cdr groups)) + (setq count (1+ count)) + ;; Every 400 requests we have to read the stream in + ;; order to avoid deadlocks. + (if (or (null groups) ;All requests have been sent. + (zerop (% count nntp-maximum-request))) + (progn + (accept-process-output) + (while (progn + (goto-char last-point) + ;; Count replies. + (while (re-search-forward "^[0-9]" nil t) + (setq received (1+ received))) + (setq last-point (point)) + (< received count)) + (nntp-accept-response))))) + ;; Wait for the reply from the final command. + (goto-char (point-max)) + (re-search-backward "^[0-9]" nil t) + (if (looking-at "^[23]") + (while (progn + (goto-char (- (point-max) 3)) + (not (looking-at "^\\.\r$"))) + (nntp-accept-response))) + + ;; Now all replies are received. We remove CRs. + (goto-char (point-min)) + (while (search-forward "\r" nil t) + (replace-match "")) + + (if nntp-server-list-active-group + (progn + ;; We have read active entries, so we just delete the + ;; superfluos gunk. + (goto-char (point-min)) + (while (re-search-forward "^[\\.234]" nil t) + (delete-region (match-beginning 0) + (progn (forward-line 1) (point)))) + 'active) + 'group)))) + (defun nntp-open-server (server &optional defs) (nnheader-init-server-buffer) (if (nntp-server-opened server) t + (if (or (stringp (car defs)) + (numberp (car defs))) + (setq defs (cons (list 'nntp-server-port (car defs)) (cdr defs)))) (or (assq 'nntp-address defs) (setq defs (append defs (list (list 'nntp-address server))))) (if (and nntp-current-server *************** *** 233,238 **** --- 319,325 ---- (setq nntp-server-alist (delq state nntp-server-alist))) (nnheader-set-init-variables nntp-server-variables defs))) (setq nntp-current-server server) + (run-hooks 'nntp-prepare-server-hook) (nntp-open-server-semi-internal nntp-address))) (defun nntp-close-server (&optional server) *************** *** 320,356 **** "Select GROUP." (if dont-check (nntp-send-command "^.*\r$" "GROUP" group) (if nntp-server-list-active-group (save-excursion - (nntp-list-active-group group server) (set-buffer nntp-server-buffer) (goto-char (point-min)) ! ;; We look at the output from `nntp-list-active-group' to ! ;; see whether the server supports this command. If it ! ;; does, we transform the output. ! (cond ((looking-at "2[0-9]+") ! (forward-line 1) ! (if (looking-at "[^ ]+[ \t]+\\([0-9]\\)[ \t]+\\([0-9]\\)") ! (let ((end (progn (goto-char (match-beginning 1)) ! (read (current-buffer)))) ! (beg (read (current-buffer)))) ! (and (> beg end) ! (setq end 0 ! beg 0)) ! (erase-buffer) ! (insert (format "211 %s %d %d %d\n" ! group (max (- (1+ end) beg) 0) ! beg end))))) ! ;; The server does not support the command. ! ((looking-at "5[0-9]+") ! (setq nntp-server-list-active-group nil) ! (nntp-send-command "^.*\r$" "GROUP" group)) ! ;; The server supports it, but the group doesn't ! ;; exist. ! ((looking-at "4[0-9]+") ! (erase-buffer) ! nil))) ! (nntp-send-command "^.*\r$" "GROUP" group)))) (defun nntp-list-active-group (group &optional server) (nntp-send-command "^.*\r$" "LIST ACTIVE" group)) --- 407,439 ---- "Select GROUP." (if dont-check (nntp-send-command "^.*\r$" "GROUP" group) + (cond ((eq nntp-server-list-active-group 'try) + (or (nntp-try-list-active group) + (nntp-send-command "^.*\r$" "GROUP" group))) + (nntp-server-list-active-group + (nntp-list-active-group group)) + (t + (nntp-send-command "^.*\r$" "GROUP" group))) (if nntp-server-list-active-group (save-excursion (set-buffer nntp-server-buffer) (goto-char (point-min)) ! (forward-line 1) ! (if (looking-at "[^ ]+[ \t]+\\([0-9]\\)[ \t]+\\([0-9]\\)") ! (let ((end (progn (goto-char (match-beginning 1)) ! (read (current-buffer)))) ! (beg (read (current-buffer)))) ! (and (> beg end) ! (setq end 0 ! beg 0)) ! (erase-buffer) ! (insert (format "211 %s %d %d %d\n" ! group (max (- (1+ end) beg) 0) ! beg end)))))) ! (save-excursion ! (set-buffer nntp-server-buffer) ! (goto-char (point-min)) ! (looking-at "[23]")))) (defun nntp-list-active-group (group &optional server) (nntp-send-command "^.*\r$" "LIST ACTIVE" group)) *************** *** 794,801 **** (set-buffer nntp-server-buffer) (if (setq proc (condition-case nil ! (open-network-stream ! "nntpd" (current-buffer) server nntp-port-number) (error nil))) (progn (setq nntp-server-process proc) --- 877,883 ---- (set-buffer nntp-server-buffer) (if (setq proc (condition-case nil ! (funcall nntp-open-server-function server) (error nil))) (progn (setq nntp-server-process proc) *************** *** 808,813 **** --- 890,903 ---- (run-hooks 'nntp-server-hook) nntp-server-process))))) + (defun nntp-open-network-stream (server) + (open-network-stream "nntpd" nntp-server-buffer server nntp-port-number)) + + (defun nntp-open-rlogin-stream (server) + (apply 'start-process "nntpd" nntp-server-buffer "rsh" + "-l" (or nntp-rlogin-user-name (user-login-name)) + server nntp-rlogin-parameters)) + (defun nntp-close-server-internal (&optional server) "Close connection to news server." (nntp-possibly-change-server nil server) *************** *** 859,864 **** --- 949,964 ---- (setq result (nntp-request-group newsgroup server)) (setq nntp-current-group newsgroup))) result)) + + (defun nntp-try-list-active (group) + (nntp-list-active-group group) + (save-excursion + (set-buffer nntp-server-buffer) + (goto-char (point-min)) + (cond ((looking-at "5[0-9]+") + (setq nntp-server-list-active-group nil)) + (t + (setq nntp-server-list-active-group t))))) (provide 'nntp) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/texi/gnus.texi dgnus/texi/gnus.texi *** pub/dgnus/texi/gnus.texi Wed Apr 19 07:17:14 1995 --- dgnus/texi/gnus.texi Thu Apr 20 02:34:28 1995 *************** *** 396,402 **** The top part of an article, where administration information (etc.) is put. @item body ! @cindex The rest of an article. Everything that is not in the head is in the body. @item header --- 396,402 ---- The top part of an article, where administration information (etc.) is put. @item body ! @cindex body The rest of an article. Everything that is not in the head is in the body. @item header