diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/ChangeLog dgnus/lisp/ChangeLog *** pub/dgnus/lisp/ChangeLog Sat May 6 06:05:21 1995 --- dgnus/lisp/ChangeLog Sun May 7 04:01:22 1995 *************** *** 1,3 **** --- 1,27 ---- + Sun May 7 01:12:04 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-get-unread-articles): Would not activate some + native groups. + + * nndigest.el (nndigest-first-article-separator): New variable. + (nndigest-narrow-to-article): Use it. + (nndigest-request-group): Would be one off in counting messages. + + * gnus.el (gnus-summary-setup-buffer): Don't create the buffer if + it already exists. + (gnus-summary-read-group): If the summary buffer exists, just + switch to it. + (gnus-summary-subject-string): Would bug out on pseudo-articles. + + * gnus-vm.el: New file. + + * gnus-msg.el (gnus-mail-reply-using-mail): In-reply-to was + possibly not correct. + + * gnus-uu.el: Undefined keymaps. + + * gnus.el (gnus-article-date-ut): `lapsed' was some hours off. + Sat May 6 01:48:06 1995 Lars Magne Ingebrigtsen * gnus.el (gnus-article-de-quoted-unreadable): Did not set *************** *** 22,27 **** --- 46,53 ---- (gnus-summary-goto-subject): Skip dummy articles. (gnus-group-first-unread-group): Went to the first group, not the first unread group. + + * gnus.el: 0.64 is released. Mon May 1 01:51:25 1995 Lars Ingebrigtsen diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-hilit.el dgnus/lisp/gnus-hilit.el *** pub/dgnus/lisp/gnus-hilit.el Sat May 6 06:05:20 1995 --- dgnus/lisp/gnus-hilit.el Mon May 8 03:44:16 1995 *************** *** 3,9 **** ;; Author: Per Abrahamsen ;; Keywords: news, mail ! ;; Version: 0.4 ;;; Commentary: --- 3,9 ---- ;; Author: Per Abrahamsen ;; Keywords: news, mail ! ;; Version: 0.6 ;;; Commentary: *************** *** 23,28 **** --- 23,33 ---- ;;; TODO: + ;; - Ignore lines with only whitespace after the prefix when looking + ;; for potential citations. + ;; - When matching citations with attrubutions using `prefix length' for + ;; sorting, use `first line' as a secondary sort key. + ;; - Make message-id buttons fail gracefully if message-id can't be found. ;; - Command to force citations into prefered style. ;; - Pass different URL types to different packages. ;; News should be handled by GNUS itself. *************** *** 40,45 **** --- 45,51 ---- (define-key gnus-summary-wash-map "a" 'gnus-article-hide) (define-key gnus-summary-wash-map "H" 'gnus-article-highlight-headers) (define-key gnus-summary-wash-map "C" 'gnus-article-highlight-citation) + (define-key gnus-summary-wash-map "\C-c" 'gnus-article-hide-citation-maybe) (define-key gnus-summary-wash-map "S" 'gnus-article-highlight-signature) (define-key gnus-summary-wash-map "b" 'gnus-article-add-buttons) (if gnus-visual *************** *** 72,78 **** (defvar gnus-article-mouse-face (if (boundp 'gnus-mouse-face) gnus-mouse-face ! highlight) "Face used when the mouse is over the button.") (defvar gnus-header-face-alist '(("" bold italic)) --- 78,84 ---- (defvar gnus-article-mouse-face (if (boundp 'gnus-mouse-face) gnus-mouse-face ! 'highlight) "Face used when the mouse is over the button.") (defvar gnus-header-face-alist '(("" bold italic)) *************** *** 127,132 **** --- 133,144 ---- "Face used for attribution lines. It is merged with the face for the cited text belonging to the attribution.") + (defvar gnus-cite-hide-percentage 30 + "Only hide cited text if it is larger than this percent of the body.") + + (defvar gnus-cite-hide-absolute 5 + "Only hide cited text if there is at least this number of cited lines.") + (defvar gnus-signature-separator "^-- *$" "Regexp matching signature separator.") *************** *** 230,240 **** (defun gnus-article-hide () "Hide current article. This function calls `gnus-article-hide-headers', ! `gnus-article-hide-citation', and `gnus-article-hide-signature' to do ! the hiding. See the documentation for those functions." (interactive) (gnus-article-hide-headers) ! (gnus-article-hide-citation) (gnus-article-hide-signature)) (defun gnus-article-highlight-headers () --- 242,252 ---- (defun gnus-article-hide () "Hide current article. This function calls `gnus-article-hide-headers', ! `gnus-article-hide-citation-maybe', and `gnus-article-hide-signature' ! to do the hiding. See the documentation for those functions." (interactive) (gnus-article-hide-headers) ! (gnus-article-hide-citation-maybe) (gnus-article-hide-signature)) (defun gnus-article-highlight-headers () *************** *** 303,309 **** (let ((buffer-read-only nil) (alist gnus-cite-prefix-alist) (faces gnus-cite-face-list) ! face entry prefix numbers number face-alist end) ;; Loop through citation prefixes. (while alist (setq entry (car alist) --- 315,321 ---- (let ((buffer-read-only nil) (alist gnus-cite-prefix-alist) (faces gnus-cite-face-list) ! face entry prefix skip numbers number face-alist end) ;; Loop through citation prefixes. (while alist (setq entry (car alist) *************** *** 356,362 **** (gnus-cite-parse-maybe) (let ((buffer-read-only nil) (alist gnus-cite-prefix-alist) ! numbers) (while alist (setq numbers (cdr (car alist)) alist (cdr alist)) --- 368,374 ---- (gnus-cite-parse-maybe) (let ((buffer-read-only nil) (alist gnus-cite-prefix-alist) ! numbers number) (while alist (setq numbers (cdr (car alist)) alist (cdr alist)) *************** *** 367,372 **** --- 379,425 ---- (or (assq number gnus-cite-attribution-alist) (put-text-property (point) (progn (forward-line 1) (point)) 'invisible t))))))) + + (defun gnus-article-hide-citation-maybe (&optional force) + "Hide cited text that has an attribution line. + This will do nothing unless at least `gnus-cite-hide-percentage' + percent ans at least `gnus-cite-hide-absolute' lines of the body is + cited text with attributions. When called interactively, these two + variables are ignored. + See also the documentation for `gnus-article-highlight-citation'." + (interactive (list 'force)) + (save-excursion + (set-buffer gnus-article-buffer) + (gnus-cite-parse-maybe) + (goto-char (point-min)) + (search-forward "\n\n") + (let ((start (point)) + (atts gnus-cite-attribution-alist) + (buffer-read-only nil) + (hiden 0) + total) + (goto-char (point-max)) + (re-search-backward gnus-signature-separator nil t) + (setq total (count-lines start (point))) + (while atts + (setq hiden (+ hiden (length (cdr (assoc (cdr (car atts)) + gnus-cite-prefix-alist)))) + atts (cdr atts))) + (if (or force + (and (> (* 100 hiden) (* gnus-cite-hide-percentage total)) + (> hiden gnus-cite-hide-absolute))) + (progn + (setq atts gnus-cite-attribution-alist) + (while atts + (setq total (cdr (assoc (cdr (car atts)) gnus-cite-prefix-alist)) + atts (cdr atts)) + (while total + (setq hiden (car total) + total (cdr total)) + (goto-line hiden) + (or (assq hiden gnus-cite-attribution-alist) + (put-text-property (point) (progn (forward-line 1) (point)) + 'invisible t))))))))) (defun gnus-article-highlight-signature () "Highlight the signature in an article. diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-msg.el dgnus/lisp/gnus-msg.el *** pub/dgnus/lisp/gnus-msg.el Sat May 6 06:05:20 1995 --- dgnus/lisp/gnus-msg.el Sun May 7 05:15:14 1995 *************** *** 977,983 **** ;; a number. I don't know the reason why it is so. (concat "<" (gnus-inews-unique-id) "@" (gnus-inews-full-address) ">")) ! (defun gnus-inews-unique-id () "Generate unique ID from user name and current time." (concat (downcase (gnus-inews-login-name)) (mapconcat --- 977,983 ---- ;; a number. I don't know the reason why it is so. (concat "<" (gnus-inews-unique-id) "@" (gnus-inews-full-address) ">")) ! (defun gnus-inews-unique-id-old () "Generate unique ID from user name and current time." (concat (downcase (gnus-inews-login-name)) (mapconcat *************** *** 991,997 **** ;; cannot generate IDs that the old version could. ;; You might for example insert a "." somewhere (not next to another dot ;; or string boundary), or modify the newsreader name to "Ding". ! (defun gnus-inews-unique-id-new () ;; Dont use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq gnus-unique-id-char --- 991,997 ---- ;; cannot generate IDs that the old version could. ;; You might for example insert a "." somewhere (not next to another dot ;; or string boundary), or modify the newsreader name to "Ding". ! (defun gnus-inews-unique-id () ;; Dont use microseconds from (current-time), they may be unsupported. ;; Instead we use this randomly inited counter. (setq gnus-unique-id-char *************** *** 1013,1019 **** ;; Append the newsreader name, because while the generated ;; ID is unique to this newsreader, other newsreaders might ;; otherwise generate the same ID via another algorithm. ! ".DING"))) (defun gnus-inews-date () --- 1013,1019 ---- ;; Append the newsreader name, because while the generated ;; ID is unique to this newsreader, other newsreaders might ;; otherwise generate the same ID via another algorithm. ! ".fsf"))) (defun gnus-inews-date () *************** *** 1158,1164 **** (gnus-narrow-to-headers) (setq follow-to (funcall gnus-reply-to-function group))))) (setq from (mail-fetch-field "from")) ! (setq date (mail-fetch-field "date")) (and from (let ((stop-pos (string-match " *at \\| *@ \\| *(\\| *<" from))) --- 1158,1165 ---- (gnus-narrow-to-headers) (setq follow-to (funcall gnus-reply-to-function group))))) (setq from (mail-fetch-field "from")) ! (setq date (or (mail-fetch-field "date") ! (header-date gnus-current-headers))) (and from (let ((stop-pos (string-match " *at \\| *@ \\| *(\\| *<" from))) 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 Sat May 6 06:05:20 1995 --- dgnus/lisp/gnus-uu.el Sun May 7 02:44:28 1995 *************** *** 264,270 **** (defvar gnus-uu-extract-view-map nil) (defvar gnus-uu-mark-map nil) ! (define-prefix-command 'gnus-summary-process-map) (define-key gnus-summary-mark-map "p" 'gnus-uu-mark-map) (define-key gnus-uu-mark-map "p" 'gnus-summary-mark-as-processable) (define-key gnus-uu-mark-map "u" 'gnus-summary-unmark-as-processable) --- 264,270 ---- (defvar gnus-uu-extract-view-map nil) (defvar gnus-uu-mark-map nil) ! (define-prefix-command 'gnus-uu-mark-map) (define-key gnus-summary-mark-map "p" 'gnus-uu-mark-map) (define-key gnus-uu-mark-map "p" 'gnus-summary-mark-as-processable) (define-key gnus-uu-mark-map "u" 'gnus-summary-unmark-as-processable) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-vm.el dgnus/lisp/gnus-vm.el *** pub/dgnus/lisp/gnus-vm.el Sun May 7 02:09:35 1995 --- dgnus/lisp/gnus-vm.el Sun May 7 02:48:10 1995 *************** *** 0 **** --- 1,235 ---- + ;;; gnus-vm: vm interface for Gnus + ;; Copyright (C) 1994,95 Free Software Foundation, Inc. + + ;; Author: Per Persson + ;; Keywords: news, mail + + ;; 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: + + ;; Major contributors: + ;; Christian Limpach + ;; Some code stolen from: + ;; Rick Sladkey + + (eval-after-load + "gnus-vm" + (require 'vm)) + (require 'gnus) + + (defvar gnus-vm-inhibit-window-system nil + "*Inhibit loading `win-vm' if using a window-system.") + + (or gnus-vm-inhibit-window-system + (condition-case nil + (if window-system + (require 'win-vm)) + (error nil))) + + (defun gnus-vm-make-folder (&optional buffer) + (let ((article (or buffer (current-buffer))) + (tmp-folder (generate-new-buffer " *tmp-folder*")) + (start (point-min)) + (end (point-max))) + (set-buffer tmp-folder) + (insert-buffer-substring article start end) + (goto-char (point-min)) + (if (looking-at "^\\(From [^ ]+ \\).*$") + (replace-match (concat "\\1" (current-time-string))) + (insert "From " gnus-newsgroup-name " " + (current-time-string) "\n")) + (while (re-search-forward "\n\nFrom " nil t) + (replace-match "\n\n>From ")) + ;; insert a newline, otherwise the last line gets lost + (goto-char (point-max)) + (insert "\n") + (vm-mode) + tmp-folder)) + + (defun gnus-summary-save-in-vm (&optional folder) + (interactive) + (let ((default-name + (funcall gnus-mail-save-name gnus-newsgroup-name + gnus-current-headers gnus-newsgroup-last-mail))) + (or folder + (setq folder + (read-file-name + (concat "Save article in VM folder: (default " + (file-name-nondirectory default-name) ") ") + (file-name-directory default-name) + default-name))) + (setq folder + (expand-file-name folder + (and default-name + (file-name-directory default-name)))) + (gnus-make-directory (file-name-directory folder)) + (set-buffer gnus-article-buffer) + (save-excursion + (save-restriction + (widen) + (let ((vm-folder (gnus-vm-make-folder))) + (vm-save-message folder) + (kill-buffer vm-folder)))) + ;; Remember the directory name to save articles. + (setq gnus-newsgroup-last-mail folder))) + + (defun gnus-mail-forward-using-vm () + "Forward the current message to another user using vm." + (let ((gnus-buffer (current-buffer)) + (subject (concat "[" gnus-newsgroup-name "] " + (or (gnus-fetch-field "Subject") "")))) + (or (featurep 'win-vm) + (if gnus-use-full-window + (pop-to-buffer gnus-article-buffer) + (switch-to-buffer gnus-article-buffer))) + (set-buffer gnus-article-buffer) + (save-excursion + (save-restriction + (widen) + (let ((vm-folder (gnus-vm-make-folder)) + (vm-forward-message-hook + (append vm-forward-message-hook + '((lambda () + (save-excursion + (mail-position-on-field "Subject") + (beginning-of-line) + (looking-at "^\\(Subject: \\).*$") + (replace-match (concat "\\1" subject)))))))) + (vm-forward-message) + (gnus-vm-init-reply-buffer gnus-buffer) + (kill-buffer vm-folder)))))) + + (defun gnus-vm-init-reply-buffer (buffer) + (make-local-variable 'gnus-summary-buffer) + (setq gnus-summary-buffer buffer + vm-mail-buffer nil) + (use-local-map (copy-keymap (current-local-map))) + (local-set-key "\C-c\C-y" 'gnus-yank-article)) + + (defun gnus-mail-reply-using-vm (&optional yank) + "Compose reply mail using vm. + Optional argument YANK means yank original article. + The command \\[vm-yank-message] yank the original message into current buffer." + (let ((gnus-buffer (current-buffer))) + (set-buffer gnus-article-buffer) + (save-excursion + (save-restriction + (widen) + (let ((vm-folder (gnus-vm-make-folder gnus-article-buffer))) + (vm-reply 1) + (gnus-vm-init-reply-buffer gnus-buffer) + (setq gnus-buffer (current-buffer)) + (and yank + ;; nil will (magically :-)) yank the current article + (gnus-yank-article nil)) + (kill-buffer vm-folder)))) + (if (featurep 'win-vm) nil + (pop-to-buffer gnus-buffer)))) + + (defun gnus-mail-other-window-using-vm () + "Compose mail in the other window using VM." + (interactive) + (let ((gnus-buffer (current-buffer))) + (vm-mail) + (gnus-vm-init-reply-buffer gnus-buffer))) + + (defun gnus-yank-article (article &optional prefix) + ;; Based on vm-yank-message by Kyle Jones. + "Yank article number N into the current buffer at point. + When called interactively N is read from the minibuffer. + + This command is meant to be used in GNUS created Mail mode buffers; + the yanked article comes from the newsgroup containing the article + you are replying to or forwarding. + + All article headers are yanked along with the text. Point is left + before the inserted text, the mark after. Any hook functions bound to + `mail-citation-hook' are run, after inserting the text and setting + point and mark. + + Prefix arg means to ignore `mail-citation-hook', don't set the mark, + prepend the value of `vm-included-text-prefix' to every yanked line. + For backwards compatibility, if `mail-citation-hook' is set to nil, + `mail-yank-hooks' is run instead. If that is also nil, a default + action is taken." + (interactive + (list + (let ((result 0) + default prompt) + (setq default (and gnus-summary-buffer + (save-excursion + (set-buffer gnus-summary-buffer) + (and gnus-current-article + (int-to-string gnus-current-article)))) + prompt (if default + (format "Yank article number: (default %s) " default) + "Yank article number: ")) + (while (and (not (stringp result)) (zerop result)) + (setq result (read-string prompt)) + (and (string= result "") default (setq result default)) + (or (string-match "^<.*>$" result) + (setq result (string-to-int result)))) + result) + current-prefix-arg)) + (if gnus-summary-buffer + (save-excursion + (let ((message (current-buffer)) + (start (point)) end + (tmp (generate-new-buffer " *tmp-yank*"))) + (set-buffer gnus-summary-buffer) + ;; Make sure the connection to the server is alive. + (or (gnus-server-opened (gnus-find-method-for-group + gnus-newsgroup-name)) + (progn + (gnus-check-news-server + (gnus-find-method-for-group gnus-newsgroup-name)) + (gnus-request-group gnus-newsgroup-name t))) + (and (stringp article) + (let ((gnus-override-method gnus-refer-article-method)) + (gnus-read-header article))) + (gnus-request-article (or article + gnus-current-article) + gnus-newsgroup-name tmp) + (set-buffer tmp) + (run-hooks 'gnus-article-prepare-hook) + ;; Decode MIME message. + (if (and gnus-show-mime + (gnus-fetch-field "Mime-Version")) + (funcall gnus-show-mime-method)) + ;; Perform the article display hooks. + (let ((buffer-read-only nil)) + (run-hooks 'gnus-article-display-hook)) + (append-to-buffer message (point-min) (point-max)) + (kill-buffer tmp) + (set-buffer message) + (setq end (point)) + (goto-char start) + (if (or prefix + (not (or mail-citation-hook mail-yank-hooks))) + (save-excursion + (while (< (point) end) + (insert vm-included-text-prefix) + (forward-line 1))) + (push-mark end) + (cond + (mail-citation-hook (run-hooks 'mail-citation-hook)) + (mail-yank-hooks (run-hooks 'mail-yank-hooks)))))))) + + (provide 'gnus-vm) + + ;;; gnus-vm.el ends here. 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 Sat May 6 06:05:20 1995 --- dgnus/lisp/gnus.el Sun May 7 05:16:37 1995 *************** *** 1116,1122 **** `gnus-article-treat-overstrike' (turn \"^H_\" into bold characters).") (add-hook 'gnus-article-display-hook 'gnus-article-hide-headers-if-wanted) (add-hook 'gnus-article-display-hook 'gnus-article-treat-overstrike) - (add-hook 'gnus-article-display-hook 'gnus-article-maybe-highlight) (defvar gnus-article-x-face-command "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -" --- 1116,1121 ---- *************** *** 1318,1324 **** (defconst gnus-maintainer "Lars Magne Ingebrigtsen " "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.64" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1317,1323 ---- (defconst gnus-maintainer "Lars Magne Ingebrigtsen " "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.65" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 1589,1594 **** --- 1588,1611 ---- (autoload 'gnus-score-adaptive "gnus-score") (autoload 'gnus-score-remove-lines-adaptive "gnus-score") + ;; gnus-uu + (autoload 'gnus-uu-extract-map "gnus-uu" nil nil 'keymap) + (autoload 'gnus-uu-mark-map "gnus-uu" nil nil 'keymap) + (autoload 'gnus-uu-digest-mail-forward "gnus-uu" nil t) + (autoload 'gnus-uu-digest-post-forward "gnus-uu" nil t) + (autoload 'gnus-uu-mark-series "gnus-uu" nil t) + (autoload 'gnus-uu-mark-region "gnus-uu" nil t) + (autoload 'gnus-uu-mark-by-regexp "gnus-uu" nil t) + (autoload 'gnus-uu-mark-all "gnus-uu" nil t) + (autoload 'gnus-uu-mark-sparse "gnus-uu" nil t) + (autoload 'gnus-uu-mark-thread "gnus-uu" nil t) + (autoload 'gnus-uu-decode-uu "gnus-uu" nil t) + (autoload 'gnus-uu-decode-uu-and-save "gnus-uu" nil t) + (autoload 'gnus-uu-decode-unshar "gnus-uu" nil t) + (autoload 'gnus-uu-decode-unshar-and-save "gnus-uu" nil t) + (autoload 'gnus-uu-decode-save "gnus-uu" nil t) + (autoload 'gnus-uu-decode-binhex "gnus-uu" nil t) + ;; gnus-msg (autoload 'gnus-summary-send-map "gnus-msg" nil nil 'keymap) (autoload 'gnus-group-post-news "gnus-msg" nil t) *************** *** 1612,1617 **** --- 1629,1641 ---- (autoload 'gnus-mail-forward-using-mail "gnus-msg") (autoload 'gnus-mail-other-window-using-mail "gnus-msg") + ;; gnus-vm + (autoload 'gnus-summary-save-in-vm "gnus-vm" nil t) + (autoload 'gnus-mail-forward-using-vm "gnus-vm") + (autoload 'gnus-mail-reply-using-vm "gnus-vm") + (autoload 'gnus-mail-other-window-using-vm "gnus-vm" nil t) + (autoload 'gnus-yank-article "gnus-vm" nil t) + ) *************** *** 3915,3921 **** (interactive "P") (let ((groups (gnus-group-process-prefix n)) group) ! (and groups (error "No groups to expire")) (while groups (setq group (car groups) groups (cdr groups)) --- 3939,3945 ---- (interactive "P") (let ((groups (gnus-group-process-prefix n)) group) ! (or groups (error "No groups to expire")) (while groups (setq group (car groups) groups (cdr groups)) *************** *** 4994,5003 **** (defun gnus-summary-setup-buffer (group) "Initialize summary buffer." (let ((buffer (concat "*Summary " group "*"))) ! ;; Fix by Sudish Joseph ! (setq gnus-summary-buffer (set-buffer (get-buffer-create buffer))) ! (gnus-add-current-to-buffer-list) ! (gnus-summary-mode))) (defun gnus-set-global-variables () ;; Set the global equivalents of the summary buffer-local variables --- 5018,5032 ---- (defun gnus-summary-setup-buffer (group) "Initialize summary buffer." (let ((buffer (concat "*Summary " group "*"))) ! (if (get-buffer buffer) ! (progn ! (set-buffer buffer) ! nil) ! ;; Fix by Sudish Joseph ! (setq gnus-summary-buffer (set-buffer (get-buffer-create buffer))) ! (gnus-add-current-to-buffer-list) ! (gnus-summary-mode) ! t))) (defun gnus-set-global-variables () ;; Set the global equivalents of the summary buffer-local variables *************** *** 5114,5123 **** If SHOW-ALL is non-nil, already read articles are also listed. If NO-ARTICLE is non-nil, no article is selected initially." (message "Retrieving newsgroup: %s..." group) ! (gnus-summary-setup-buffer group) ! (let ((did-select (gnus-select-newsgroup group show-all)) ! (method (car (gnus-find-method-for-group group)))) (cond ((null did-select) (and (eq major-mode 'gnus-summary-mode) (not (equal (current-buffer) kill-buffer)) --- 5143,5161 ---- If SHOW-ALL is non-nil, already read articles are also listed. If NO-ARTICLE is non-nil, no article is selected initially." (message "Retrieving newsgroup: %s..." group) ! (let* ((new-group (gnus-summary-setup-buffer group)) ! (did-select (and new-group (gnus-select-newsgroup group show-all))) ! (method (car (gnus-find-method-for-group group)))) (cond + ((not new-group) + (gnus-set-global-variables) + (gnus-kill-buffer kill-buffer) + (gnus-configure-windows 'summary) + (pop-to-buffer gnus-summary-buffer) + (gnus-set-mode-line 'summary) + (gnus-summary-position-cursor) + (message "") + t) ((null did-select) (and (eq major-mode 'gnus-summary-mode) (not (equal (current-buffer) kill-buffer)) *************** *** 6253,6259 **** '(if (and (<= (following-char) ?9) (>= (following-char) ?0)) (prog1 ! (read (current-buffer)) (or (eobp) (forward-char 1))) (gnus-nov-skip-field) 0)) --- 6291,6298 ---- '(if (and (<= (following-char) ?9) (>= (following-char) ?0)) (prog1 ! (let ((num (read (current-buffer)))) ! (if (numberp num) num 0)) (or (eobp) (forward-char 1))) (gnus-nov-skip-field) 0)) *************** *** 6569,6574 **** --- 6608,6614 ---- header) (and article (setq header (gnus-get-header-by-number article)) + (vectorp header) (header-subject header)))) (defalias 'gnus-summary-score 'gnus-summary-article-score) *************** *** 9759,9765 **** ((eq type 'lapsed) (let* ((sec (- (gnus-seconds-since-epoch (timezone-make-date-arpa-standard ! (current-time-string) nil "UT")) (gnus-seconds-since-epoch (timezone-make-date-arpa-standard date nil "UT")))) (units (list (cons 'year (* 365.25 24 60 60)) --- 9799,9805 ---- ((eq type 'lapsed) (let* ((sec (- (gnus-seconds-since-epoch (timezone-make-date-arpa-standard ! (current-time-string) (current-time-zone) "UT")) (gnus-seconds-since-epoch (timezone-make-date-arpa-standard date nil "UT")))) (units (list (cons 'year (* 365.25 24 60 60)) *************** *** 11071,11077 **** ;; be reached) we just set the number of unread articles in this ;; newsgroup to t. This means that Gnus thinks that there are ;; unread articles, but it has no idea how many. ! (if (setq method (nth 4 info)) (if (or (and gnus-activate-foreign-newsgroups (not (numberp gnus-activate-foreign-newsgroups))) (and (numberp gnus-activate-foreign-newsgroups) --- 11111,11119 ---- ;; be reached) we just set the number of unread articles in this ;; newsgroup to t. This means that Gnus thinks that there are ;; unread articles, but it has no idea how many. ! (if (and (setq method (nth 4 info)) ! (not (gnus-server-equal gnus-select-method ! (gnus-server-get-method nil method)))) (if (or (and gnus-activate-foreign-newsgroups (not (numberp gnus-activate-foreign-newsgroups))) (and (numberp gnus-activate-foreign-newsgroups) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/nndigest.el dgnus/lisp/nndigest.el *** pub/dgnus/lisp/nndigest.el Sat May 6 06:05:20 1995 --- dgnus/lisp/nndigest.el Sun May 7 03:37:54 1995 *************** *** 38,46 **** (defvar nndigest-group-alist nil) ! (defconst nndigest-separator "^------------------------------[\n \t]*\n[^ ]+: ") ;;; Interface functions. --- 38,49 ---- (defvar nndigest-group-alist nil) ! (defvar nndigest-separator "^------------------------------[\n \t]*\n[^ ]+: ") + (defvar nndigest-first-article-separator + "^------------------------------*[\n \t]*\n[^ ]+: ") + ;;; Interface functions. *************** *** 120,125 **** --- 123,130 ---- (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) *************** *** 174,182 **** (set-buffer nndigest-current-buffer) (widen) (goto-char (point-min)) ! (while (and (not (zerop article)) ! (re-search-forward nndigest-separator nil t)) ! (setq article (1- article))) (if (zerop article) (progn (goto-char (match-end 0)) --- 179,187 ---- (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)) 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 Sat May 6 06:05:20 1995 --- dgnus/lisp/nntp.el Sun May 7 04:32:04 1995 *************** *** 241,247 **** (if (looking-at "^[23]") (while (progn (goto-char (- (point-max) 3)) ! (not (looking-at "^\\.\r$"))) (nntp-accept-response))) (and (numberp nntp-large-newsgroup) (> number nntp-large-newsgroup) --- 241,247 ---- (if (looking-at "^[23]") (while (progn (goto-char (- (point-max) 3)) ! (not (looking-at "^\\.\r?$"))) (nntp-accept-response))) (and (numberp nntp-large-newsgroup) (> number nntp-large-newsgroup) *************** *** 299,305 **** (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. --- 299,305 ---- (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. *************** *** 449,455 **** (art (or (and (numberp id) (int-to-string id)) id))) ;; If NEmacs, end of message may look like: "\256\215" (".^M") (prog1 ! (nntp-send-command "^\\.\r$" "ARTICLE" art) (nntp-decode-text) (and nntp-async-articles (nntp-async-fetch-articles id))))) (if buffer (set-process-buffer --- 449,455 ---- (art (or (and (numberp id) (int-to-string id)) id))) ;; If NEmacs, end of message may look like: "\256\215" (".^M") (prog1 ! (nntp-send-command "^\\.\r?$" "ARTICLE" art) (nntp-decode-text) (and nntp-async-articles (nntp-async-fetch-articles id))))) (if buffer (set-process-buffer *************** *** 461,467 **** (prog1 ;; If NEmacs, end of message may look like: "\256\215" (".^M") (nntp-send-command ! "^\\.\r$" "BODY" (or (and (numberp id) (int-to-string id)) id)) (nntp-decode-text))) (defun nntp-request-head (id &optional newsgroup server) --- 461,467 ---- (prog1 ;; If NEmacs, end of message may look like: "\256\215" (".^M") (nntp-send-command ! "^\\.\r?$" "BODY" (or (and (numberp id) (int-to-string id)) id)) (nntp-decode-text))) (defun nntp-request-head (id &optional newsgroup server) *************** *** 469,511 **** (nntp-possibly-change-server newsgroup server) (prog1 (nntp-send-command ! "^\\.\r$" "HEAD" (or (and (numberp id) (int-to-string id)) id)) (nntp-decode-text))) (defun nntp-request-stat (id &optional newsgroup server) "Request STAT of article ID (message-id or number)." (nntp-possibly-change-server newsgroup server) (nntp-send-command ! "^[23].*\r$" "STAT" (or (and (numberp id) (int-to-string id)) id))) (defun nntp-request-group (group &optional server dont-check) "Select GROUP." ! (nntp-send-command "^.*\r$" "GROUP" group) (save-excursion (set-buffer nntp-server-buffer) (goto-char (point-min)) (looking-at "[23]"))) (defun nntp-request-asynchronous (group &optional server articles) ! (or (nntp-async-server-opened) ! (nntp-async-open-server) ! (error "Can't open second connection to %s" nntp-address)) ! (setq nntp-async-articles articles) ! (setq nntp-async-fetched nil) ! (save-excursion ! (set-buffer nntp-async-buffer) ! (erase-buffer)) ! (nntp-async-send-strings "GROUP" group) ! t) (defun nntp-list-active-group (group &optional server) ! (nntp-send-command "^.*\r$" "LIST ACTIVE" group)) (defun nntp-request-group-description (group &optional server) "Get description of GROUP." (if (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^.*\r$" "XGTITLE" group) (nntp-decode-text)))) (defun nntp-close-group (group &optional server) --- 469,515 ---- (nntp-possibly-change-server newsgroup server) (prog1 (nntp-send-command ! "^\\.\r?$" "HEAD" (or (and (numberp id) (int-to-string id)) id)) (nntp-decode-text))) (defun nntp-request-stat (id &optional newsgroup server) "Request STAT of article ID (message-id or number)." (nntp-possibly-change-server newsgroup server) (nntp-send-command ! "^[23].*\r?$" "STAT" (or (and (numberp id) (int-to-string id)) id))) (defun nntp-request-group (group &optional server dont-check) "Select GROUP." ! (nntp-send-command "^.*\r?$" "GROUP" group) (save-excursion (set-buffer nntp-server-buffer) (goto-char (point-min)) (looking-at "[23]"))) (defun nntp-request-asynchronous (group &optional server articles) ! (if (not (or (nntp-async-server-opened) ! (nntp-async-open-server))) ! (progn ! (message "Can't open second connection to %s" nntp-address) ! (ding) ! (setq nntp-async-articles nil) ! (sit-for 2)) ! (setq nntp-async-articles articles) ! (setq nntp-async-fetched nil) ! (save-excursion ! (set-buffer nntp-async-buffer) ! (erase-buffer)) ! (nntp-async-send-strings "GROUP" group) ! t)) (defun nntp-list-active-group (group &optional server) ! (nntp-send-command "^.*\r?$" "LIST ACTIVE" group)) (defun nntp-request-group-description (group &optional server) "Get description of GROUP." (if (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^.*\r?$" "XGTITLE" group) (nntp-decode-text)))) (defun nntp-close-group (group &optional server) *************** *** 515,528 **** "List active groups." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r$" "LIST") (nntp-decode-text))) (defun nntp-request-list-newsgroups (&optional server) "List groups." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r$" "LIST NEWSGROUPS") (nntp-decode-text))) (defun nntp-request-newgroups (date &optional server) --- 519,532 ---- "List active groups." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r?$" "LIST") (nntp-decode-text))) (defun nntp-request-list-newsgroups (&optional server) "List groups." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r?$" "LIST NEWSGROUPS") (nntp-decode-text))) (defun nntp-request-newgroups (date &optional server) *************** *** 536,565 **** (substring (aref date 3) 3 5) (substring (aref date 3) 6 8)))) (prog1 ! (nntp-send-command "^\\.\r$" "NEWGROUPS" time-string) (nntp-decode-text)))) (defun nntp-request-list-distributions (&optional server) "List distributions." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r$" "LIST DISTRIBUTIONS") (nntp-decode-text))) (defun nntp-request-last (&optional newsgroup server) "Decrease the current article pointer." (nntp-possibly-change-server newsgroup server) ! (nntp-send-command "^[23].*\r$" "LAST")) (defun nntp-request-next (&optional newsgroup server) "Advance the current article pointer." (nntp-possibly-change-server newsgroup server) ! (nntp-send-command "^[23].*\r$" "NEXT")) (defun nntp-request-post (&optional server) "Post the current buffer." (nntp-possibly-change-server nil server) ! (if (nntp-send-command "^[23].*\r$" "POST") (progn (nntp-encode-text) (nntp-send-region-to-server (point-min) (point-max)) --- 540,569 ---- (substring (aref date 3) 3 5) (substring (aref date 3) 6 8)))) (prog1 ! (nntp-send-command "^\\.\r?$" "NEWGROUPS" time-string) (nntp-decode-text)))) (defun nntp-request-list-distributions (&optional server) "List distributions." (nntp-possibly-change-server nil server) (prog1 ! (nntp-send-command "^\\.\r?$" "LIST DISTRIBUTIONS") (nntp-decode-text))) (defun nntp-request-last (&optional newsgroup server) "Decrease the current article pointer." (nntp-possibly-change-server newsgroup server) ! (nntp-send-command "^[23].*\r?$" "LAST")) (defun nntp-request-next (&optional newsgroup server) "Advance the current article pointer." (nntp-possibly-change-server newsgroup server) ! (nntp-send-command "^[23].*\r?$" "NEXT")) (defun nntp-request-post (&optional server) "Post the current buffer." (nntp-possibly-change-server nil server) ! (if (nntp-send-command "^[23].*\r?$" "POST") (progn (nntp-encode-text) (nntp-send-region-to-server (point-min) (point-max)) *************** *** 661,674 **** This function is supposed to be called from `nntp-server-opened-hook'. It will make innd servers spawn an nnrpd process to allow actual article reading." ! (nntp-send-command "^.*\r$" "MODE READER")) (defun nntp-send-authinfo () "Send the AUTHINFO to the nntp server. This function is supposed to be called from `nntp-server-opened-hook'. It will prompt for a password." ! (nntp-send-command "^.*\r$" "AUTHINFO USER" (user-login-name)) ! (nntp-send-command "^.*\r$" "AUTHINFO PASS" (read-string "NNTP password: "))) (defun nntp-default-sentinel (proc status) "Default sentinel function for NNTP server process." --- 665,678 ---- This function is supposed to be called from `nntp-server-opened-hook'. It will make innd servers spawn an nnrpd process to allow actual article reading." ! (nntp-send-command "^.*\r?$" "MODE READER")) (defun nntp-send-authinfo () "Send the AUTHINFO to the nntp server. This function is supposed to be called from `nntp-server-opened-hook'. It will prompt for a password." ! (nntp-send-command "^.*\r?$" "AUTHINFO USER" (user-login-name)) ! (nntp-send-command "^.*\r?$" "AUTHINFO PASS" (read-string "NNTP password: "))) (defun nntp-default-sentinel (proc status) "Default sentinel function for NNTP server process." *************** *** 766,772 **** (nntp-wait-for-response response) t))) ! (defun nntp-wait-for-response (regexp) "Wait for server response which matches REGEXP." (save-excursion (let ((status t) --- 770,776 ---- (nntp-wait-for-response response) t))) ! (defun nntp-wait-for-response (regexp &optional slow) "Wait for server response which matches REGEXP." (save-excursion (let ((status t) *************** *** 786,797 **** (nntp-accept-response) (while wait (goto-char (point-min)) ! (cond ((looking-at "[23]") ! (setq wait nil)) ! ((looking-at "[45]") ! (setq status nil) ! (setq wait nil)) ! (t (nntp-accept-response)))) ;; Save status message. (end-of-line) (setq nntp-status-string --- 790,812 ---- (nntp-accept-response) (while wait (goto-char (point-min)) ! (if slow ! (progn ! (cond ((re-search-forward "^[23][0-9][0-9]" nil t) ! (setq wait nil)) ! ((re-search-forward "^[45][0-9][0-9]" nil t) ! (setq status nil) ! (setq wait nil)) ! (t (nntp-accept-response))) ! (if (not wait) (delete-region (point-min) ! (progn (beginning-of-line) ! (point))))) ! (cond ((looking-at "[23]") ! (setq wait nil)) ! ((looking-at "[45]") ! (setq status nil) ! (setq wait nil)) ! (t (nntp-accept-response))))) ;; Save status message. (end-of-line) (setq nntp-status-string *************** *** 833,842 **** (nntp-last-element sequence)))) (prog1 (if (stringp nntp-server-xover) ! (nntp-send-command "^\\.\r$" nntp-server-xover range) (let ((commands nntp-xover-commands)) (while (and commands (eq nntp-server-xover 'try)) ! (nntp-send-command "^\\.\r$" (car commands) range) (save-excursion (set-buffer nntp-server-buffer) (goto-char 1) --- 848,857 ---- (nntp-last-element sequence)))) (prog1 (if (stringp nntp-server-xover) ! (nntp-send-command "^\\.\r?$" nntp-server-xover range) (let ((commands nntp-xover-commands)) (while (and commands (eq nntp-server-xover 'try)) ! (nntp-send-command "^\\.\r?$" (car commands) range) (save-excursion (set-buffer nntp-server-buffer) (goto-char 1) *************** *** 910,916 **** (setq nntp-address server) (setq status (condition-case nil ! (nntp-wait-for-response "^[23].*\r$") (error nil) (quit nil))) (or status (nntp-close-server-internal server)) --- 925,931 ---- (setq nntp-address server) (setq status (condition-case nil ! (nntp-wait-for-response "^[23].*\r?$" 'slow) (error nil) (quit nil))) (or status (nntp-close-server-internal server)) *************** *** 1035,1042 **** (let ((nntp-server-process nil) (nntp-server-buffer nntp-async-buffer)) (nntp-open-server-semi-internal nntp-address nntp-port-number) ! (setq nntp-async-process nntp-server-process) ! (set-process-buffer nntp-async-process nntp-async-buffer))) (defun nntp-async-fetch-articles (article) (if (stringp article) --- 1050,1059 ---- (let ((nntp-server-process nil) (nntp-server-buffer nntp-async-buffer)) (nntp-open-server-semi-internal nntp-address nntp-port-number) ! (if (not (setq nntp-async-process nntp-server-process)) ! (progn ! (setq nntp-async-number nil)) ! (set-process-buffer nntp-async-process nntp-async-buffer)))) (defun nntp-async-fetch-articles (article) (if (stringp article) 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 Sat May 6 06:05:22 1995 --- dgnus/texi/gnus.texi Sun May 7 01:50:25 1995 *************** *** 5863,5875 **** for some quite common situations. @menu ! * Slow @sc{nntp} Connection:: You run a local Emacs and get the news elsewhere. * Slow Terminal Connection:: You run a remote Emacs. * Little Disk Space:: You feel that having large setup files is icky. * Slow Machine:: You feel like buying a faster machine. @end menu ! @node Slow @sc{nntp} Connection @section Slow @sc{nntp} Connection If you run Emacs on a machine locally, and get your news from a machine --- 5863,5875 ---- for some quite common situations. @menu ! * Slow NNTP Connection:: You run a local Emacs and get the news elsewhere. * Slow Terminal Connection:: You run a remote Emacs. * Little Disk Space:: You feel that having large setup files is icky. * Slow Machine:: You feel like buying a faster machine. @end menu ! @node Slow NNTP Connection @section Slow @sc{nntp} Connection If you run Emacs on a machine locally, and get your news from a machine