*** pub/sgnus/lisp/gnus-cache.el Sat Mar 16 16:39:18 1996 --- sgnus/lisp/gnus-cache.el Sun Mar 17 12:56:14 1996 *************** *** 357,363 **** (or (and ticked (memq 'ticked class)) (and dormant (memq 'dormant class)) (and unread (memq 'unread class)) ! (and (not unread) (memq 'read class)))) (defun gnus-cache-file-name (group article) (concat (file-name-as-directory gnus-cache-directory) --- 357,363 ---- (or (and ticked (memq 'ticked class)) (and dormant (memq 'dormant class)) (and unread (memq 'unread class)) ! (and (not unread) (not ticked) (not dormant) (memq 'read class)))) (defun gnus-cache-file-name (group article) (concat (file-name-as-directory gnus-cache-directory) *************** *** 377,384 **** gnus-newsgroup-name article (gnus-summary-article-header article) nil nil nil t))) ! (defun gnus-cache-possibly-remove-article ! (article ticked dormant unread &optional force) "Possibly remove ARTICLE from the cache." (let ((file (gnus-cache-file-name gnus-newsgroup-name article))) (when (and (file-exists-p file) --- 377,384 ---- gnus-newsgroup-name article (gnus-summary-article-header article) nil nil nil t))) ! (defun gnus-cache-possibly-remove-article (article ticked dormant unread ! &optional force) "Possibly remove ARTICLE from the cache." (let ((file (gnus-cache-file-name gnus-newsgroup-name article))) (when (and (file-exists-p file) *** pub/sgnus/lisp/gnus-msg.el Sat Mar 16 16:39:20 1996 --- sgnus/lisp/gnus-msg.el Sun Mar 17 14:31:17 1996 *************** *** 1651,1657 **** "Return the current Distribution header, if any." (when (and gnus-distribution-function (fboundp gnus-distribution-function)) ! (funcall gnus-distribution-function (or gnus-newsgroup-name "")))) (defun gnus-inews-message-id () "Generate unique Message-ID for user." --- 1651,1660 ---- "Return the current Distribution header, if any." (when (and gnus-distribution-function (fboundp gnus-distribution-function)) ! (funcall gnus-distribution-function ! (or gnus-newsgroup-name ! (save-excursion (mail-fetch-field "newsgroups")) ! "")))) (defun gnus-inews-message-id () "Generate unique Message-ID for user." *************** *** 1878,1884 **** (defun gnus-mail-reply (&optional yank to-address followup) (save-excursion (set-buffer gnus-summary-buffer) ! (let ((group (gnus-group-real-name gnus-newsgroup-name)) (cur (cons (current-buffer) (cdr gnus-article-current))) (winconf (current-window-configuration)) from subject date reply-to message-of to cc --- 1881,1887 ---- (defun gnus-mail-reply (&optional yank to-address followup) (save-excursion (set-buffer gnus-summary-buffer) ! (let ((group gnus-newsgroup-name) (cur (cons (current-buffer) (cdr gnus-article-current))) (winconf (current-window-configuration)) from subject date reply-to message-of to cc *************** *** 2153,2159 **** (gnus-y-or-n-p "Are you sure you want to post to all of USENET? "))) () ! (let ((group (gnus-group-real-name (or group gnus-newsgroup-name))) (cur (cons (current-buffer) (cdr gnus-article-current))) (winconf (current-window-configuration)) from subject date message-of --- 2156,2162 ---- (gnus-y-or-n-p "Are you sure you want to post to all of USENET? "))) () ! (let ((group (or group gnus-newsgroup-name)) (cur (cons (current-buffer) (cdr gnus-article-current))) (winconf (current-window-configuration)) from subject date message-of *** pub/sgnus/lisp/gnus.el Sat Mar 16 16:39:26 1996 --- sgnus/lisp/gnus.el Sun Mar 17 14:31:14 1996 *************** *** 1715,1721 **** "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.53" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1715,1721 ---- "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.54" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 3678,3690 **** "Set text PROPS on the B to E region, extending `intangble' 1 past B." (add-text-properties b e props) (when (memq 'intangible props) ! (put-text-property (1- b) b 'intangible (cddr (memq 'intangible props))))) (defsubst gnus-unhide-text (b e) "Remove hidden text properties from region between B and E." (remove-text-properties b e gnus-hidden-properties) (when (memq 'intangible gnus-hidden-properties) ! (put-text-property (1- b) b 'intangible nil))) (defun gnus-hide-text-type (b e type) "Hide text of TYPE between B and E." --- 3678,3692 ---- "Set text PROPS on the B to E region, extending `intangble' 1 past B." (add-text-properties b e props) (when (memq 'intangible props) ! (put-text-property (max (1- b) (point-min)) ! b 'intangible (cddr (memq 'intangible props))))) (defsubst gnus-unhide-text (b e) "Remove hidden text properties from region between B and E." (remove-text-properties b e gnus-hidden-properties) (when (memq 'intangible gnus-hidden-properties) ! (put-text-property (max (1- b) (point-min)) ! b 'intangible nil))) (defun gnus-hide-text-type (b e type) "Hide text of TYPE between B and E." *************** *** 7840,7851 **** (defun gnus-summary-update-article (article &optional header) "Update ARTICLE in the summary buffer." ! (let ((id (mail-header-id (gnus-summary-article-header article))) ! (data (gnus-data-find article))) ! (setcar (gnus-id-to-thread id) nil) ! (gnus-summary-insert-subject id) ! ;; Set the (possibly) new article number in the data structure. ! (gnus-data-set-number data (gnus-id-to-article id)))) (defun gnus-rebuild-thread (id) "Rebuild the thread containing ID." --- 7842,7863 ---- (defun gnus-summary-update-article (article &optional header) "Update ARTICLE in the summary buffer." ! (set-buffer gnus-summary-buffer) ! (let* ((header (or header (gnus-summary-article-header article))) ! (id (mail-header-id header)) ! (data (gnus-data-find article)) ! (thread (gnus-id-to-thread id)) ! (parent ! (gnus-id-to-thread (or (gnus-parent-id ! (mail-header-references header)) ! "tull")))) ! (when thread ! (setcar thread nil) ! (when parent ! (delq thread parent)) ! (when (gnus-summary-insert-subject id header) ! ;; Set the (possibly) new article number in the data structure. ! (gnus-data-set-number data (gnus-id-to-article id)))))) (defun gnus-rebuild-thread (id) "Rebuild the thread containing ID." *************** *** 9189,9197 **** (progn (end-of-line) (point)))) (mail-header-set-xref headers xref)))))))) ! (defun gnus-summary-insert-subject (id) "Find article ID and insert the summary line for that article." ! (let ((header (gnus-read-header id)) (number (and (numberp id) id))) (when header ;; Rebuild the thread that this article is part of and go to the --- 9201,9209 ---- (progn (end-of-line) (point)))) (mail-header-set-xref headers xref)))))))) ! (defun gnus-summary-insert-subject (id &optional header) "Find article ID and insert the summary line for that article." ! (let ((header (gnus-read-header id header)) (number (and (numberp id) id))) (when header ;; Rebuild the thread that this article is part of and go to the *************** *** 10213,10218 **** --- 10225,10231 ---- (interactive "p") (gnus-set-global-variables) (gnus-configure-windows 'article) + (gnus-summary-show-thread) (when (eq (gnus-summary-select-article nil nil 'pseudo) 'old) (gnus-eval-in-buffer-window gnus-article-buffer *************** *** 13153,13277 **** (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." ! (prog1 ! (save-excursion ! (erase-buffer) ! (gnus-kill-all-overlays) ! (setq group (or group gnus-newsgroup-name)) ! ;; Open server if it has closed. ! (gnus-check-server (gnus-find-method-for-group group)) ! ;; Using `gnus-request-article' directly will insert the article into ! ;; `nntp-server-buffer' - so we'll save some time by not having to ! ;; copy it from the server buffer into the article buffer. ! ! ;; We only request an article by message-id when we do not have the ! ;; headers for it, so we'll have to get those. ! (when (stringp article) ! (let ((gnus-override-method gnus-refer-article-method)) ! (gnus-read-header article))) ! ! ;; If the article number is negative, that means that this article ! ;; doesn't belong in this newsgroup (possibly), so we find its ! ;; message-id and request it by id instead of number. ! (when (and (numberp article) ! gnus-summary-buffer ! (get-buffer gnus-summary-buffer) ! (buffer-name (get-buffer gnus-summary-buffer))) ! (save-excursion ! (set-buffer gnus-summary-buffer) ! (let ((header (gnus-summary-article-header article))) ! (if (< article 0) ! (cond ! ((memq article gnus-newsgroup-sparse) ! ;; This is a sparse gap article. ! (setq article (mail-header-id header))) ! ((vectorp header) ! ;; It's a real article. ! (setq article (mail-header-id header))) ! (t ! ;; It is an extracted pseudo-article. ! (setq article 'pseudo) ! (gnus-request-pseudo-article header)))) ! (let ((method (gnus-find-method-for-group ! gnus-newsgroup-name))) ! (if (not (eq (car method) 'nneething)) ! () ! (let ((dir (concat (file-name-as-directory (nth 1 method)) ! (mail-header-subject header)))) ! (if (file-directory-p dir) ! (progn ! (setq article 'nneething) ! (gnus-group-enter-directory dir))))))))) ! (cond ! ;; We first check `gnus-original-article-buffer'. ! ((and (equal (car gnus-original-article) group) ! (eq (cdr gnus-original-article) article) ! (get-buffer gnus-original-article-buffer)) ! (insert-buffer-substring gnus-original-article-buffer) ! 'article) ! ;; Check the backlog. ! ((and gnus-keep-backlog ! (gnus-backlog-request-article group article (current-buffer))) ! 'article) ! ;; Check the cache. ! ((and gnus-use-cache ! (numberp article) ! (gnus-cache-request-article article group)) ! 'article) ! ;; Get the article and put into the article buffer. ! ((or (stringp article) (numberp article)) ! (let ((gnus-override-method ! (and (stringp article) gnus-refer-article-method)) ! (buffer-read-only nil)) (erase-buffer) ! (gnus-kill-all-overlays) ! (if (gnus-request-article article group (current-buffer)) ! (progn ! (and gnus-keep-backlog ! (gnus-backlog-enter-article ! group article (current-buffer))) ! 'article)))) ! ;; It was a pseudo. ! (t article))) ! ! ;; Take the article from the original article buffer ! ;; and place it in the buffer it's supposed to be in. ! (when (and (get-buffer gnus-article-buffer) ! (equal (buffer-name (current-buffer)) ! (buffer-name (get-buffer gnus-article-buffer)))) ! (save-excursion ! (setq gnus-original-article (cons group article)) ! (if (get-buffer gnus-original-article-buffer) ! (set-buffer (get-buffer gnus-original-article-buffer)) ! (set-buffer (get-buffer-create gnus-original-article-buffer)) ! (buffer-disable-undo (current-buffer)) ! (setq major-mode 'gnus-original-article-mode) ! (setq buffer-read-only t) ! (gnus-add-current-to-buffer-list)) ! (let (buffer-read-only) ! (erase-buffer) ! (insert-buffer-substring gnus-article-buffer)))) ! ;; Update sparse articles. ! (when (memq article gnus-newsgroup-sparse) ! (gnus-summary-update-article article)))) ! (defun gnus-read-header (id) "Read the headers of article ID and enter them into the Gnus system." (let ((group gnus-newsgroup-name) ! header where) ;; First we check to see whether the header in question is already ;; fetched. (if (stringp id) ;; This is a Message-ID. ! (setq header (gnus-id-to-header id)) ;; This is an article number. ! (setq header (gnus-summary-article-header id))) ! (if header ;; We have found the header. header ;; We have to really fetch the header to this article. --- 13166,13300 ---- (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." ! (let (do-update-line) ! (prog1 ! (save-excursion ! (erase-buffer) ! (gnus-kill-all-overlays) ! (setq group (or group gnus-newsgroup-name)) ! ;; Open server if it has closed. ! (gnus-check-server (gnus-find-method-for-group group)) ! ;; Using `gnus-request-article' directly will insert the article into ! ;; `nntp-server-buffer' - so we'll save some time by not having to ! ;; copy it from the server buffer into the article buffer. ! ! ;; We only request an article by message-id when we do not have the ! ;; headers for it, so we'll have to get those. ! (when (stringp article) ! (let ((gnus-override-method gnus-refer-article-method)) ! (gnus-read-header article))) ! ! ;; If the article number is negative, that means that this article ! ;; doesn't belong in this newsgroup (possibly), so we find its ! ;; message-id and request it by id instead of number. ! (when (and (numberp article) ! gnus-summary-buffer ! (get-buffer gnus-summary-buffer) ! (buffer-name (get-buffer gnus-summary-buffer))) ! (save-excursion ! (set-buffer gnus-summary-buffer) ! (let ((header (gnus-summary-article-header article))) ! (if (< article 0) ! (cond ! ((memq article gnus-newsgroup-sparse) ! ;; This is a sparse gap article. ! (setq do-update-line article) ! (setq article (mail-header-id header)) ! (let ((gnus-override-method gnus-refer-article-method)) ! (gnus-read-header article))) ! ((vectorp header) ! ;; It's a real article. ! (setq article (mail-header-id header))) ! (t ! ;; It is an extracted pseudo-article. ! (setq article 'pseudo) ! (gnus-request-pseudo-article header)))) ! (let ((method (gnus-find-method-for-group ! gnus-newsgroup-name))) ! (if (not (eq (car method) 'nneething)) ! () ! (let ((dir (concat (file-name-as-directory (nth 1 method)) ! (mail-header-subject header)))) ! (if (file-directory-p dir) ! (progn ! (setq article 'nneething) ! (gnus-group-enter-directory dir))))))))) ! (cond ! ;; We first check `gnus-original-article-buffer'. ! ((and (equal (car gnus-original-article) group) ! (eq (cdr gnus-original-article) article) ! (get-buffer gnus-original-article-buffer)) ! (insert-buffer-substring gnus-original-article-buffer) ! 'article) ! ;; Check the backlog. ! ((and gnus-keep-backlog ! (gnus-backlog-request-article group article (current-buffer))) ! 'article) ! ;; Check the cache. ! ((and gnus-use-cache ! (numberp article) ! (gnus-cache-request-article article group)) ! 'article) ! ;; Get the article and put into the article buffer. ! ((or (stringp article) (numberp article)) ! (let ((gnus-override-method ! (and (stringp article) gnus-refer-article-method)) ! (buffer-read-only nil)) ! (erase-buffer) ! (gnus-kill-all-overlays) ! (if (gnus-request-article article group (current-buffer)) ! (progn ! (and gnus-keep-backlog ! (gnus-backlog-enter-article ! group article (current-buffer))) ! 'article)))) ! ;; It was a pseudo. ! (t article))) ! ! ;; Take the article from the original article buffer ! ;; and place it in the buffer it's supposed to be in. ! (when (and (get-buffer gnus-article-buffer) ! (equal (buffer-name (current-buffer)) ! (buffer-name (get-buffer gnus-article-buffer)))) ! (save-excursion ! (setq gnus-original-article (cons group article)) ! (if (get-buffer gnus-original-article-buffer) ! (set-buffer (get-buffer gnus-original-article-buffer)) ! (set-buffer (get-buffer-create gnus-original-article-buffer)) ! (buffer-disable-undo (current-buffer)) ! (setq major-mode 'gnus-original-article-mode) ! (setq buffer-read-only t) ! (gnus-add-current-to-buffer-list)) ! (let (buffer-read-only) (erase-buffer) ! (insert-buffer-substring gnus-article-buffer)))) ! ;; Update sparse articles. ! (when do-update-line ! (save-excursion ! (set-buffer gnus-summary-buffer) ! (gnus-summary-update-article do-update-line) ! (gnus-summary-goto-subject do-update-line) ! (set-window-point (get-buffer-window (current-buffer) t) ! (point))))))) ! (defun gnus-read-header (id &optional header) "Read the headers of article ID and enter them into the Gnus system." (let ((group gnus-newsgroup-name) ! where) ;; First we check to see whether the header in question is already ;; fetched. (if (stringp id) ;; This is a Message-ID. ! (setq header (or header (gnus-id-to-header id))) ;; This is an article number. ! (setq header (or header (gnus-summary-article-header id)))) ! (if (and header ! (not (memq (mail-header-number header) gnus-newsgroup-sparse))) ;; We have found the header. header ;; We have to really fetch the header to this article. *************** *** 13290,13311 **** (princ (cond ((numberp id) id) ((cdr where) (cdr where)) (t gnus-reffed-article-number)) (current-buffer)) (insert " Article retrieved.\n")) (if (not (setq header (car (gnus-get-newsgroup-headers)))) ! () ; Malformed head. ! (if (and (stringp id) ! (not (string= (gnus-group-real-name group) ! (car where)))) ! ;; If we fetched by Message-ID and the article came ! ;; from a different group, we fudge some bogus article ! ;; numbers for this article. ! (mail-header-set-number header gnus-reffed-article-number)) ! (decf gnus-reffed-article-number) ! (push header gnus-newsgroup-headers) ! (setq gnus-current-headers header) ! (push (mail-header-number header) gnus-newsgroup-limit) header))))) (defun gnus-article-prepare (article &optional all-headers header) --- 13313,13339 ---- (princ (cond ((numberp id) id) ((cdr where) (cdr where)) + (header (mail-header-number header)) (t gnus-reffed-article-number)) (current-buffer)) (insert " Article retrieved.\n")) + ;(when (and header + ; (memq (mail-header-number header) gnus-newsgroup-sparse)) + ; (setcar (gnus-id-to-thread id) nil)) (if (not (setq header (car (gnus-get-newsgroup-headers)))) ! () ; Malformed head. ! (unless (memq (mail-header-number header) gnus-newsgroup-sparse) ! (if (and (stringp id) ! (not (string= (gnus-group-real-name group) ! (car where)))) ! ;; If we fetched by Message-ID and the article came ! ;; from a different group, we fudge some bogus article ! ;; numbers for this article. ! (mail-header-set-number header gnus-reffed-article-number)) ! (decf gnus-reffed-article-number) ! (push header gnus-newsgroup-headers) ! (setq gnus-current-headers header) ! (push (mail-header-number header) gnus-newsgroup-limit)) header))))) (defun gnus-article-prepare (article &optional all-headers header) *************** *** 13776,13784 **** (setq beg (point)) ;; Hide the actual signature. (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) ! (setq end (match-beginning 0)) (gnus-hide-text ! (match-beginning 0) (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) (match-end 0) ;; Perhaps we shouldn't hide to the end of the buffer --- 13804,13812 ---- (setq beg (point)) ;; Hide the actual signature. (and (search-forward "\n-----BEGIN PGP SIGNATURE-----\n" nil t) ! (setq end (1+ (match-beginning 0))) (gnus-hide-text ! end (if (search-forward "\n-----END PGP SIGNATURE-----\n" nil t) (match-end 0) ;; Perhaps we shouldn't hide to the end of the buffer *** pub/sgnus/lisp/ChangeLog Sat Mar 16 16:39:34 1996 --- sgnus/lisp/ChangeLog Sun Mar 17 14:31:15 1996 *************** *** 1,3 **** --- 1,29 ---- + Sun Mar 17 13:17:26 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-article-hide-pgp): Would hide one char too many. + + * gnus-msg.el (gnus-inews-distribution): Fall back on the + Newsgroups header. + + * gnus.el (gnus-read-header): Read sparse threads. + + Sun Mar 17 11:23:53 1996 Lars Magne Ingebrigtsen + + * gnus.el (gnus-summary-scroll-up): Show threads. + + * gnus-msg.el (gnus-mail-reply): Use prefixed group name. + (gnus-news-followup): Ditto. + + * gnus-cache.el (gnus-cache-member-of-class): Would remove ticked + articles from the cache. + + * gnus.el (gnus-hide-text): Would bug out at bob. + (gnus-unhide-text): Ditto. + + Sat Mar 16 13:28:57 1996 Lars Magne Ingebrigtsen + + * gnus.el: 0.53 is released. + Sat Mar 16 14:46:29 1996 Brad Miller * gnus-gl.el: New version.