*** pub/sgnus/lisp/gnus-cache.el Tue Dec 5 06:10:51 1995 --- sgnus/lisp/gnus-cache.el Sat Dec 9 03:31:25 1995 *************** *** 25,34 **** ;;; Code: (require 'gnus) ! (defvar gnus-cache-directory (concat gnus-article-save-directory "cache/") "*The directory where cached articles will be stored.") (defvar gnus-cache-enter-articles '(ticked dormant) "*Classes of articles to enter into the cache.") --- 25,40 ---- ;;; Code: (require 'gnus) + (eval-when-compile (require 'cl)) ! (defvar gnus-cache-directory ! (concat (file-name-as-directory gnus-article-save-directory) "cache/") "*The directory where cached articles will be stored.") + (defvar gnus-cache-active-file + (concat (file-name-as-directory gnus-cache-directory) "active") + "*The cache active file.") + (defvar gnus-cache-enter-articles '(ticked dormant) "*Classes of articles to enter into the cache.") *************** *** 43,75 **** (defvar gnus-cache-buffer nil) ! (defun gnus-cache-change-buffer (group) ! (and gnus-cache-buffer ! ;; see if the current group's overview cache has been loaded ! (or (string= group (car gnus-cache-buffer)) ! ;; another overview cache is current, save it ! (gnus-cache-save-buffers))) ! ;; if gnus-cache buffer is nil, create it ! (or gnus-cache-buffer ! ;; create cache buffer ! (save-excursion ! (setq gnus-cache-buffer ! (cons group ! (set-buffer (get-buffer-create " *gnus-cache-overview*")))) ! (buffer-disable-undo (current-buffer)) ! ;; insert the contents of this groups cache overview ! (erase-buffer) ! (let ((file (gnus-cache-file-name group ".overview"))) ! (and (file-exists-p file) ! (insert-file-contents file))) ! ;; we have a fresh (empty/just loaded) buffer, ! ;; mark it as unmodified to save a redundant write later. ! (set-buffer-modified-p nil)))) (defun gnus-cache-save-buffers () ;; save the overview buffer if it exists and has been modified --- 49,73 ---- + ;;; Internal variables. + (defvar gnus-cache-buffer nil) + (defvar gnus-group-alist nil) + (defvar gnus-cache-active-hashtb nil) + (defvar gnus-cache-active-altered nil) ! ;;; Functions called from Gnus. + (defun gnus-cache-open () + "Initialize the cache." + (gnus-cache-read-active)) + + (defun gnus-cache-close () + "Shut down the cache." + (gnus-cache-write-active) + (setq gnus-cache-active-hashtb nil)) (defun gnus-cache-save-buffers () ;; save the overview buffer if it exists and has been modified *************** *** 103,127 **** (gnus-kill-buffer buffer) (setq gnus-cache-buffer nil)))) - - ;; Return whether an article is a member of a class. - (defun gnus-cache-member-of-class (class ticked dormant unread) - (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) - (file-name-as-directory - (if (gnus-use-long-file-name 'not-cache) - group - (let ((group (concat group ""))) - (if (string-match ":" group) - (aset group (match-beginning 0) ?/)) - (gnus-replace-chars-in-string group ?. ?/)))) - (if (stringp article) article (int-to-string article)))) - (defun gnus-cache-possibly-enter-article (group article headers ticked dormant unread) (let ((number (mail-header-number headers)) --- 101,106 ---- *************** *** 143,149 **** (let ((gnus-use-cache nil)) (gnus-summary-select-article)) (save-excursion ! (set-buffer gnus-article-buffer) (save-restriction (widen) (write-region (point-min) (point-max) file nil 'quiet)) --- 122,128 ---- (let ((gnus-use-cache nil)) (gnus-summary-select-article)) (save-excursion ! (set-buffer gnus-original-article-buffer) (save-restriction (widen) (write-region (point-min) (point-max) file nil 'quiet)) *************** *** 179,216 **** (or (mail-header-chars headers) "") (or (mail-header-lines headers) "") (or (mail-header-xref headers) "")))) t)))) (defun gnus-cache-enter-remove-article (article) (setq gnus-cache-removeable-articles (cons article gnus-cache-removeable-articles))) - (defsubst gnus-cache-possibly-remove-article - (article ticked dormant unread) - (let ((file (gnus-cache-file-name gnus-newsgroup-name article))) - (if (or (not (file-exists-p file)) - (not (gnus-cache-member-of-class - gnus-cache-remove-articles ticked dormant unread))) - nil - (save-excursion - (delete-file file) - (set-buffer (cdr gnus-cache-buffer)) - (goto-char (point-min)) - (if (or (looking-at (concat (int-to-string article) "\t")) - (search-forward (concat "\n" (int-to-string article) "\t") - (point-max) t)) - (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point)))))))) - (defun gnus-cache-possibly-remove-articles () (let ((articles gnus-cache-removeable-articles) (cache-articles (gnus-cache-articles-in-group gnus-newsgroup-name)) article) (gnus-cache-change-buffer gnus-newsgroup-name) (while articles ! (setq article (car articles) ! articles (cdr articles)) ! (if (memq article cache-articles) ;; The article was in the cache, so we see whether we are ;; supposed to remove it from the cache. (gnus-cache-possibly-remove-article --- 158,180 ---- (or (mail-header-chars headers) "") (or (mail-header-lines headers) "") (or (mail-header-xref headers) "")))) + ;; Update the active info. + (gnus-cache-update-active group number) t)))) (defun gnus-cache-enter-remove-article (article) + "Mark ARTICLE for later possible removal." (setq gnus-cache-removeable-articles (cons article gnus-cache-removeable-articles))) (defun gnus-cache-possibly-remove-articles () + "Possibly remove some of the removable articles." (let ((articles gnus-cache-removeable-articles) (cache-articles (gnus-cache-articles-in-group gnus-newsgroup-name)) article) (gnus-cache-change-buffer gnus-newsgroup-name) (while articles ! (if (memq (setq article (pop articles)) cache-articles) ;; The article was in the cache, so we see whether we are ;; supposed to remove it from the cache. (gnus-cache-possibly-remove-article *************** *** 218,292 **** (memq article gnus-newsgroup-dormant) (or (memq article gnus-newsgroup-unreads) (memq article gnus-newsgroup-unselected)))))) ! ;; the overview file might have been modified, save it ;; safe because we're only called at group exit anyway (gnus-cache-save-buffers)) - (defun gnus-cache-request-article (article group) (let ((file (gnus-cache-file-name group article)) (buffer-read-only nil)) ! (if (not (file-exists-p file)) ! () (erase-buffer) ! ;; There may be some overlays that we have to kill... ! (insert "i") ! (let ((overlays (and (fboundp 'overlays-at) ! (overlays-at (point-min))))) ! (while overlays ! (delete-overlay (car overlays)) ! (setq overlays (cdr overlays)))) ! (erase-buffer) (insert-file-contents file) t))) - (defun gnus-cache-articles-in-group (group) - (let ((dir (file-name-directory (gnus-cache-file-name group 1))) - articles) - (if (not (file-exists-p dir)) - nil - (setq articles (directory-files dir nil "^[0-9]+$" t)) - (if (not articles) - nil - (sort (mapcar (function (lambda (name) - (string-to-int name))) - articles) - '<))))) - - (defun gnus-cache-active-articles (group) - (let ((articles (gnus-cache-articles-in-group group))) - (and articles - (cons (car articles) (gnus-last-element articles))))) - (defun gnus-cache-possibly-alter-active (group active) ! (let ((cache-active (gnus-cache-active-articles group))) ! (and cache-active (< (car cache-active) (car active)) (setcar active (car cache-active))) ! (and cache-active (> (cdr cache-active) (cdr active)) (setcdr active (cdr cache-active))))) (defun gnus-cache-retrieve-headers (articles group) (let* ((cached (gnus-cache-articles-in-group group)) (articles (gnus-sorted-complement articles cached)) (cache-file (gnus-cache-file-name group ".overview")) type) (let ((gnus-use-cache nil)) (setq type (and articles (gnus-retrieve-headers articles group)))) (gnus-cache-save-buffers) (save-excursion ! (cond ((not (file-exists-p cache-file)) ! type) ! ((null type) ! (set-buffer nntp-server-buffer) ! (erase-buffer) ! (insert-file-contents cache-file) ! 'nov) ! ((eq type 'nov) ! (gnus-cache-braid-nov group cached) ! type) ! (t ! (gnus-cache-braid-heads group cached) ! type))))) (defun gnus-cache-braid-nov (group cached) (let ((cache-buf (get-buffer-create " *gnus-cache*")) --- 182,318 ---- (memq article gnus-newsgroup-dormant) (or (memq article gnus-newsgroup-unreads) (memq article gnus-newsgroup-unselected)))))) ! ;; The overview file might have been modified, save it ;; safe because we're only called at group exit anyway (gnus-cache-save-buffers)) (defun gnus-cache-request-article (article group) + "Retrieve ARTICLE in GROUP from the cache." (let ((file (gnus-cache-file-name group article)) (buffer-read-only nil)) ! (when (file-exists-p file) (erase-buffer) ! (gnus-kill-all-overlays) (insert-file-contents file) t))) (defun gnus-cache-possibly-alter-active (group active) ! "Alter the ACTIVE info for GROUP to reflect the articles in the cache." ! (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) ! (and cache-active ! (< (car cache-active) (car active)) (setcar active (car cache-active))) ! (and cache-active ! (> (cdr cache-active) (cdr active)) (setcdr active (cdr cache-active))))) (defun gnus-cache-retrieve-headers (articles group) + "Retrieve the headers for ARTICLES in GROUP." (let* ((cached (gnus-cache-articles-in-group group)) (articles (gnus-sorted-complement articles cached)) (cache-file (gnus-cache-file-name group ".overview")) type) + ;; We first retrieve all the headers that we don't have in + ;; the cache. (let ((gnus-use-cache nil)) (setq type (and articles (gnus-retrieve-headers articles group)))) (gnus-cache-save-buffers) + ;; Then we insert the cached headers. (save-excursion ! (cond ! ((not (file-exists-p cache-file)) ! ;; There are no cached headers. ! type) ! ((null type) ! ;; There were no uncached headers (or retrieval was ! ;; unsuccessful), so we use the cached headers exclusively. ! (set-buffer nntp-server-buffer) ! (erase-buffer) ! (insert-file-contents cache-file) ! 'nov) ! ((eq type 'nov) ! ;; We have both cached and uncached NOV headers, so we ! ;; braid them. ! (gnus-cache-braid-nov group cached) ! type) ! (t ! ;; We braid HEADs. ! (gnus-cache-braid-heads group cached) ! type))))) ! ! ! ;;; Internal functions. ! ! (defun gnus-cache-change-buffer (group) ! (and gnus-cache-buffer ! ;; See if the current group's overview cache has been loaded. ! (or (string= group (car gnus-cache-buffer)) ! ;; Another overview cache is current, save it. ! (gnus-cache-save-buffers))) ! ;; if gnus-cache buffer is nil, create it ! (or gnus-cache-buffer ! ;; Create cache buffer ! (save-excursion ! (setq gnus-cache-buffer ! (cons group ! (set-buffer (get-buffer-create " *gnus-cache-overview*")))) ! (buffer-disable-undo (current-buffer)) ! ;; Insert the contents of this group's cache overview. ! (erase-buffer) ! (let ((file (gnus-cache-file-name group ".overview"))) ! (and (file-exists-p file) ! (insert-file-contents file))) ! ;; We have a fresh (empty/just loaded) buffer, ! ;; mark it as unmodified to save a redundant write later. ! (set-buffer-modified-p nil)))) ! ! ;; Return whether an article is a member of a class. ! (defun gnus-cache-member-of-class (class ticked dormant unread) ! (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) ! (file-name-as-directory ! (if (gnus-use-long-file-name 'not-cache) ! group ! (let ((group (concat group ""))) ! (if (string-match ":" group) ! (aset group (match-beginning 0) ?/)) ! (gnus-replace-chars-in-string group ?. ?/)))) ! (if (stringp article) article (int-to-string article)))) ! ! (defun gnus-cache-possibly-remove-article ! (article ticked dormant unread) ! (let ((file (gnus-cache-file-name gnus-newsgroup-name article))) ! (if (or (not (file-exists-p file)) ! (not (gnus-cache-member-of-class ! gnus-cache-remove-articles ticked dormant unread))) ! nil ! (save-excursion ! (delete-file file) ! (set-buffer (cdr gnus-cache-buffer)) ! (goto-char (point-min)) ! (if (or (looking-at (concat (int-to-string article) "\t")) ! (search-forward (concat "\n" (int-to-string article) "\t") ! (point-max) t)) ! (delete-region (progn (beginning-of-line) (point)) ! (progn (forward-line 1) (point)))))))) ! ! (defun gnus-cache-articles-in-group (group) ! (let ((dir (file-name-directory (gnus-cache-file-name group 1))) ! articles) ! (if (not (file-exists-p dir)) ! nil ! (setq articles (directory-files dir nil "^[0-9]+$" t)) ! (if (not articles) ! nil ! (sort (mapcar (function (lambda (name) ! (string-to-int name))) ! articles) ! '<))))) (defun gnus-cache-braid-nov (group cached) (let ((cache-buf (get-buffer-create " *gnus-cache*")) *************** *** 349,354 **** --- 375,381 ---- (setq cached (cdr cached))) (kill-buffer cache-buf))) + ;;;###autoload (defun gnus-jog-cache () "Go through all groups and put the articles into the cache." (interactive) *************** *** 366,371 **** --- 393,481 ---- (setq gnus-newsgroup-unreads (cdr gnus-newsgroup-unreads))) (kill-buffer (current-buffer))) (setq newsrc (cdr newsrc))))) + + (defun gnus-cache-read-active (&optional force) + "Read the cache active file." + (if (not (and (file-exists-p gnus-cache-active-file) + (or force (not gnus-cache-active-hashtb)))) + ;; There is no active file, so we generate one. + (gnus-cache-generate-active) + ;; We simply read the active file. + (save-excursion + (gnus-set-work-buffer) + (insert-file-contents gnus-cache-active-file) + (gnus-active-to-gnus-format + nil (setq gnus-cache-active-hashtb + (gnus-make-hashtable + (count-lines (point-min) (point-max))))) + (setq gnus-cache-active-altered nil)))) + + (defun gnus-cache-write-active (&optional force) + "Write the active hashtb to the active file." + (when (or force + (and gnus-cache-active-hashtb + gnus-cache-active-altered)) + (save-excursion + (gnus-set-work-buffer) + (mapatoms + (lambda (sym) + (when (and sym (boundp sym)) + (insert (symbol-name sym) " " (cdr (symbol-value sym)) + " " (car (symbol-value sym)) " y\n"))) + gnus-cache-active-hashtb) + (write-region + (point-min) (point-max) gnus-cache-active-file nil 'silent)) + ;; Mark the active hashtb as unaltered. + (setq gnus-cache-active-altered nil))) + + (defun gnus-cache-update-active (group number &optional low) + "Update the upper bound of the active info of GROUP to NUMBER. + If LOW, update the lower bound instead." + (let ((active (gnus-gethash group gnus-cache-active-hashtb))) + (if (null active) + ;; We just create a new active entry for this group. + (gnus-sethash group (cons number number) gnus-cache-active-hashtb) + ;; Update the lower or upper bound. + (if low + (setcar active number) + (setcdr active number)) + ;; Mark the active hashtb as altered. + (setq gnus-cache-active-altered t)))) + + ;;;###autoload + (defun gnus-cache-generate-active (&optional directory) + "Generate the cache active file." + (let* ((top (null directory)) + (directory (or directory gnus-cache-directory)) + (files (directory-files directory)) + (group + (progn + (string-match (concat "^" (expand-file-name gnus-cache-directory)) + directory) + (gnus-replace-chars-in-string + (substring (expand-file-name gnus-cache-directory) (match-end 0)) + ?/ ?.))) + nums alphs) + (when top + (setq gnus-cache-active-hashtb (gnus-make-hashtable 123))) + ;; Separate articles from all other files and directories. + (while files + (if (string-match "^[0-9]$" (car files)) + (push (string-to-int (pop files)) nums) + (push (pop files) alphs))) + ;; If we have nums, then this is probably a valid group. + (setq nums (sort nums '<)) + (gnus-sethash group (cons (car nums) (gnus-last-element nums)) + gnus-cache-active-hashtb) + ;; Go through all the other files. + (while alphs + (when (file-directory-p (car alphs)) + ;; We descend directories. + (gnus-cache-generate-active (car alphs))) + (setq alphs (cdr alphs))) + ;; Write the new active file. + (when top + (gnus-cache-write-active t)))) (provide 'gnus-cache) *** pub/sgnus/lisp/gnus-mh.el Tue Dec 5 06:10:51 1995 --- sgnus/lisp/gnus-mh.el Fri Dec 8 09:01:53 1995 *************** *** 62,76 **** (funcall gnus-folder-save-name gnus-newsgroup-name gnus-current-headers gnus-newsgroup-last-folder) t)))) ! (errbuf (get-buffer-create " *Gnus rcvstore*"))) (gnus-eval-in-buffer-window gnus-original-article-buffer (save-restriction (widen) (unwind-protect ! (call-process-region (point-min) (point-max) ! (expand-file-name "rcvstore" mh-lib) ! nil errbuf nil folder) (set-buffer errbuf) (if (zerop (buffer-size)) (message "Article saved in folder: %s" folder) --- 62,81 ---- (funcall gnus-folder-save-name gnus-newsgroup-name gnus-current-headers gnus-newsgroup-last-folder) t)))) ! (errbuf (get-buffer-create " *Gnus rcvstore*")) ! ;; Find the rcvstore program. ! (rcvstore ! (expand-file-name ! (mh-search-path ! (if mh-lib (cons mh-lib exec-path) exec-path) ! "rcvstore")))) (gnus-eval-in-buffer-window gnus-original-article-buffer (save-restriction (widen) (unwind-protect ! (call-process-region ! (point-min) (point-max) rcvstore nil errbuf nil folder) (set-buffer errbuf) (if (zerop (buffer-size)) (message "Article saved in folder: %s" folder) *************** *** 82,89 **** (let ((config (current-window-configuration))) (mh-find-path) (mh-send-sub (or to "") (or cc "") (or subject "") config) ! (goto-char (point-min)) ! (and in-reply-to (insert "In-Reply-To: " in-reply-to "\n")) (setq mh-sent-from-folder gnus-article-copy) (setq mh-sent-from-msg 1) (setq gnus-mail-buffer (buffer-name (current-buffer))) --- 87,96 ---- (let ((config (current-window-configuration))) (mh-find-path) (mh-send-sub (or to "") (or cc "") (or subject "") config) ! (when in-reply-to ! (save-excursion ! (goto-char (point-min)) ! (insert "In-Reply-To: " in-reply-to "\n"))) (setq mh-sent-from-folder gnus-article-copy) (setq mh-sent-from-msg 1) (setq gnus-mail-buffer (buffer-name (current-buffer))) *** pub/sgnus/lisp/gnus-msg.el Tue Dec 5 06:10:53 1995 --- sgnus/lisp/gnus-msg.el Sat Dec 9 10:00:34 1995 *************** *** 192,200 **** '(From Date Newsgroups Subject Message-ID Organization Lines X-Newsreader) "*Headers to be generated or prompted for when posting an article. RFC977 and RFC1036 require From, Date, Newsgroups, Subject, ! Message-ID. Organization, Lines, In-Reply-To and X-Newsreader are ! optional. If you want Gnus not to insert some header, remove it from ! this list.") (defvar gnus-required-mail-headers '(From Date To Subject (optional . In-Reply-To) Message-ID Organization Lines) --- 192,200 ---- '(From Date Newsgroups Subject Message-ID Organization Lines X-Newsreader) "*Headers to be generated or prompted for when posting an article. RFC977 and RFC1036 require From, Date, Newsgroups, Subject, ! Message-ID. Organization, Lines, In-Reply-To, Expires, and ! X-Newsreader are optional. If you want Gnus not to insert some ! header, remove it from this list.") (defvar gnus-required-mail-headers '(From Date To Subject (optional . In-Reply-To) Message-ID Organization Lines) *************** *** 208,213 **** --- 208,227 ---- (defvar gnus-removable-headers '(NNTP-Posting-Host Bcc Xref) "*Headers to be removed unconditionally before posting.") + (defvar gnus-article-expires 14 + "*Number of days before your article expires. + This variable isn't used unless you have the `Expires' element in + `gnus-required-headers'.") + + (defvar gnus-distribution-function nil + "*Function that should return the Distribution header for outgoing articles. + It will be called from the buffer where the outgoing article + is being prepared with the group name as the only parameter. + It should return a valid distribution. + + The function will only be called if you have the `Distribution' header in + `gnus-required-headers'.") + (defvar gnus-check-before-posting '(subject-cmsg multiple-headers sendsys message-id from long-lines control-chars size new-text *************** *** 355,361 **** (setq gnus-newsgroup-name (setq group (completing-read "Group: " gnus-active-hashtb nil nil ! (cons group 0))))) (gnus-post-news 'post group nil gnus-article-buffer))) (defun gnus-summary-post-news () --- 369,375 ---- (setq gnus-newsgroup-name (setq group (completing-read "Group: " gnus-active-hashtb nil nil ! (cons (or group "") 0))))) (gnus-post-news 'post group nil gnus-article-buffer))) (defun gnus-summary-post-news () *************** *** 490,496 **** (string-match gnus-mailing-list-groups group)) group (gnus-group-real-name group))) (if (or to-group ! (and (gnus-member-of-valid 'post (or pgroup gnus-newsgroup-name)) (not mailing-list) (not to-list) (not to-address))) --- 504,512 ---- (string-match gnus-mailing-list-groups group)) group (gnus-group-real-name group))) (if (or to-group ! (and (gnus-news-group-p ! (or pgroup gnus-newsgroup-name) ! (if header (mail-header-number header) gnus-current-article)) (not mailing-list) (not to-list) (not to-address))) *************** *** 509,514 **** --- 525,536 ---- (setq gnus-add-to-address group))) (gnus-mail-reply yank to-address 'followup))))) + (defun gnus-news-group-p (group &optional article) + "Return non-nil if GROUP (and ARTICLE) come from a news server." + (or (gnus-member-of-valid 'post group) ; Ordinary news group. + (and (gnus-member-of-valid 'post-mail group) ; Combined group. + (eq (gnus-request-type group article) 'post)))) + (defun gnus-inews-news (&optional use-group-method) "Send a news message. If given a prefix, and the group is a foreign group, this function *************** *** 835,841 **** (newsgroups nil) (message-id nil) (distribution nil)) ! (or (gnus-member-of-valid 'post gnus-newsgroup-name) (error "This backend does not support canceling")) (save-excursion ;; Get header info. from original article. --- 857,863 ---- (newsgroups nil) (message-id nil) (distribution nil)) ! (or (gnus-news-group-p gnus-newsgroup-name) (error "This backend does not support canceling")) (save-excursion ;; Get header info. from original article. *************** *** 1072,1093 **** "Prepare article headers. Headers already prepared in the buffer are not modified. Headers in `gnus-required-headers' will be generated." ! (let ((Date (gnus-inews-date)) ! (Message-ID (gnus-inews-message-id)) ! (Organization (gnus-inews-organization)) ! (From (gnus-inews-user-name)) ! (Path (gnus-inews-path)) ! (Subject nil) ! (Newsgroups nil) ! (In-Reply-To (gnus-inews-in-reply-to)) ! (To nil) ! (Distribution nil) ! (Lines (gnus-inews-lines)) ! (X-Newsreader (gnus-extended-version)) ! (X-Mailer (gnus-extended-version)) ! (headers (or headers gnus-required-headers)) ! (case-fold-search t) ! header value elem) ;; First we remove any old generated headers. (let ((headers gnus-deletable-headers)) (while headers --- 1094,1116 ---- "Prepare article headers. Headers already prepared in the buffer are not modified. Headers in `gnus-required-headers' will be generated." ! (let* ((Date (gnus-inews-date)) ! (Message-ID (gnus-inews-message-id)) ! (Organization (gnus-inews-organization)) ! (From (gnus-inews-user-name)) ! (Path (gnus-inews-path)) ! (Subject nil) ! (Newsgroups nil) ! (In-Reply-To (gnus-inews-in-reply-to)) ! (To nil) ! (Distribution (gnus-inews-distribution)) ! (Lines (gnus-inews-lines)) ! (X-Newsreader (gnus-extended-version)) ! (X-Mailer X-Newsreader) ! (Expires (gnus-inews-expires)) ! (headers (or headers gnus-required-headers)) ! (case-fold-search t) ! header value elem) ;; First we remove any old generated headers. (let ((headers gnus-deletable-headers)) (while headers *************** *** 1182,1193 **** (if (and from (not (gnus-check-before-posting 'sender)) (not (string= ! (downcase (car (gnus-extract-address-components from))) (downcase (gnus-inews-real-user-address)))) (or (null sender) (not (string= ! (downcase (car (gnus-extract-address-components sender))) (downcase (gnus-inews-real-user-address)))))) (progn (goto-char (point-min)) --- 1205,1216 ---- (if (and from (not (gnus-check-before-posting 'sender)) (not (string= ! (downcase (car (cdr (gnus-extract-address-components from)))) (downcase (gnus-inews-real-user-address)))) (or (null sender) (not (string= ! (downcase (car (cdr (gnus-extract-address-components sender)))) (downcase (gnus-inews-real-user-address)))))) (progn (goto-char (point-min)) *************** *** 1292,1298 **** (funcall gnus-author-copy-saver file) (if (and (file-readable-p file) (mail-file-babyl-p file)) (gnus-output-to-rmail file) ! (rmail-output file 1 t t))))))))) (defun gnus-inews-path () "Return uucp path." --- 1315,1322 ---- (funcall gnus-author-copy-saver file) (if (and (file-readable-p file) (mail-file-babyl-p file)) (gnus-output-to-rmail file) ! (let ((mail-use-rfc822 t)) ! (rmail-output file 1 t t)))))))))) (defun gnus-inews-path () "Return uucp path." *************** *** 1368,1375 **** (t domain))) (if (string-match "\\." (system-name)) (system-name) ! (substring user-mail-address ! (1+ (string-match "@" user-mail-address)))))) (defun gnus-inews-full-address () (let ((domain (gnus-inews-domain-name)) --- 1392,1401 ---- (t domain))) (if (string-match "\\." (system-name)) (system-name) ! (if (string-match "@\\([^ ]+\\)\\($\\| \\)" user-mail-address) ! (substring user-mail-address ! (match-beginning 1) (match-end 1)) ! "bogus-domain")))) (defun gnus-inews-full-address () (let ((domain (gnus-inews-domain-name)) *************** *** 1379,1384 **** --- 1405,1427 ---- (if (string-match (concat "^" (regexp-quote system)) domain) domain (concat system "." domain))))) + (defun gnus-inews-expires () + "Return an Expires header based on `gnus-article-expires'." + (let ((current (current-time)) + (future (* 1.0 gnus-article-expires 60 60 24))) + ;; Add the future to current. + (setcar current (+ (car current) (round (/ future (expt 2 16))))) + (setcar (cdr current) (+ (nth 1 current) (% (round future) (expt 2 16)))) + ;; Return the date in the future in UT. + (timezone-make-date-arpa-standard + (current-time-string current) (current-time-zone) '(0 "UT")))) + + (defun gnus-inews-distribution () + "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." ;; Message-ID should not contain a slash and should be terminated by *************** *** 1512,1527 **** (let (resent) ;; We first set up a normal mail buffer. (nnheader-set-temp-buffer " *Gnus resend*") ! (gnus-mail-setup 'new address) ;; Insert our usual headers. (gnus-inews-narrow-to-headers) ! (let ((headers '(From Date To Message-ID Organization))) (gnus-inews-insert-headers headers)) (goto-char (point-min)) ;; Rename them all to "Resent-*". ! (while (re-search-forward "^" nil t) (insert "Resent-")) (widen) (delete-region (point) (point-max)) ;; Insert the message to be resent. (insert-buffer-substring gnus-original-article-buffer) --- 1555,1578 ---- (let (resent) ;; We first set up a normal mail buffer. (nnheader-set-temp-buffer " *Gnus resend*") ! ;; This code from sendmail.el ! (insert "To: ") ! (let ((fill-prefix "\t") ! (address-start (point))) ! (insert address "\n") ! (fill-region-as-paragraph address-start (point-max))) ! (insert mail-header-separator "\n") ;; Insert our usual headers. (gnus-inews-narrow-to-headers) ! (let ((headers '(From Date To))) (gnus-inews-insert-headers headers)) (goto-char (point-min)) ;; Rename them all to "Resent-*". ! (while (re-search-forward "^[A-Za-z]" nil t) ! (forward-char -1) (insert "Resent-")) (widen) + (forward-line) (delete-region (point) (point-max)) ;; Insert the message to be resent. (insert-buffer-substring gnus-original-article-buffer) *************** *** 1721,1731 **** (gnus-summary-select-article nil nil nil (car yank)) (gnus-summary-remove-process-mark (car yank))) (save-excursion (gnus-copy-article-buffer) (mail-yank-original nil) (save-restriction (narrow-to-region (point-min) (point)) ! (goto-char (mark)) (let ((news-reply-yank-from (save-excursion (set-buffer gnus-article-buffer) --- 1772,1783 ---- (gnus-summary-select-article nil nil nil (car yank)) (gnus-summary-remove-process-mark (car yank))) (save-excursion + (setq end (point)) (gnus-copy-article-buffer) (mail-yank-original nil) (save-restriction (narrow-to-region (point-min) (point)) ! (goto-char (mark t)) (let ((news-reply-yank-from (save-excursion (set-buffer gnus-article-buffer) *************** *** 2182,2188 **** "Attemps to go through the Gnus source file and report what variables have been changed. The source file has to be in the Emacs load path." (interactive) ! (let ((files '("gnus.el" "gnus-msg.el" "gnus-score.el")) file dirs expr olist sym) (message "Please wait while we snoop your variables...") (sit-for 0) --- 2234,2240 ---- "Attemps to go through the Gnus source file and report what variables have been changed. The source file has to be in the Emacs load path." (interactive) ! (let ((files '("gnus.el" "gnus-msg.el" "gnus-score.el" "nnmail.el")) file dirs expr olist sym) (message "Please wait while we snoop your variables...") (sit-for 0) *************** *** 2219,2224 **** --- 2271,2277 ---- (setq files (cdr files))) (kill-buffer (current-buffer))) (insert "------------------- Environment follows -------------------\n\n") + (setq olist (nreverse olist)) (while olist (if (boundp (car olist)) (insert "(setq " (symbol-name (car olist)) *************** *** 2355,2361 **** (concat "^" (regexp-quote mail-header-separator) "$") nil t) (forward-line 1) (goto-char (point-max))) - ; (insert "\n\n") (gnus-inews-modify-mail-mode-map)) ;;; Gcc handling. --- 2408,2413 ---- *** pub/sgnus/lisp/gnus-setup.el Tue Dec 5 06:10:56 1995 --- sgnus/lisp/gnus-setup.el Sat Dec 9 03:21:37 1995 *************** *** 4,10 **** ;; Author: Steven L. Baur ;; Keywords: news ! ;; This file is part of GNU Emacs. ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by --- 4,10 ---- ;; Author: Steven L. Baur ;; Keywords: news ! ;; This file is not yet a 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 *************** *** 24,42 **** ;; My head is starting to spin with all the different mail/news packages. ;; Stop The Madness! ;;; Code: ! (defvar gnus-gnus-lisp-directory "/usr/lib/xemacs/gnus-5.0/lisp/" "Directory where Gnus Emacs lisp is found.") ! (defvar gnus-sgnus-lisp-directory "/usr/lib/xemacs/sgnus/lisp/" "Directory where September Gnus Emacs lisp is found.") ! (defvar gnus-tm-lisp-directory "/usr/lib/xemacs/site-lisp/" "Directory where TM Emacs lisp is found.") ! (defvar gnus-mailcrypt-lisp-directory ! "/usr/lib/xemacs/site-lisp/mailcrypt-3.4/" "Directory where Mailcrypt Emacs Lisp is found.") (defvar gnus-use-tm t "Set this if you want MIME support for Gnus") (defvar gnus-use-mhe nil --- 24,62 ---- ;; My head is starting to spin with all the different mail/news packages. ;; Stop The Madness! + ;; Given that Emacs Lisp byte codes may be diverging, it is probably best + ;; not to byte compile this, and just arrange to have the .el loaded out + ;; of .emacs. + ;;; Code: ! (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)) ! ! (defvar gnus-emacs-lisp-directory (if running-xemacs ! "/usr/local/lib/xemacs/" ! "/usr/local/share/emacs/") ! "Directory where Emacs site lisp is located.") ! ! (defvar gnus-gnus-lisp-directory (concat gnus-emacs-lisp-directory ! "gnus-5.0.12/lisp/") "Directory where Gnus Emacs lisp is found.") ! ! (defvar gnus-sgnus-lisp-directory (concat gnus-emacs-lisp-directory ! "sgnus/lisp/") "Directory where September Gnus Emacs lisp is found.") ! ! (defvar gnus-tm-lisp-directory (concat gnus-emacs-lisp-directory ! "site-lisp/") "Directory where TM Emacs lisp is found.") ! (defvar gnus-mailcrypt-lisp-directory (concat gnus-emacs-lisp-directory ! "site-lisp/mailcrypt-3.4/") "Directory where Mailcrypt Emacs Lisp is found.") + (defvar gnus-bbdb-lisp-directory (concat gnus-emacs-lisp-directory + "site-lisp/bbdb-1.50/") + "Directory where Big Brother Database is found.") + (defvar gnus-use-tm t "Set this if you want MIME support for Gnus") (defvar gnus-use-mhe nil *************** *** 69,77 **** (if gnus-use-tm (progn (if (null (member gnus-tm-lisp-directory load-path)) ! (setq load-path (cons gnus-tm-lisp-directory load-path)))) ! (load "tm-setup") ! (load "mime-setup")) ;;; Mailcrypt by ;;; Jin Choi --- 89,96 ---- (if gnus-use-tm (progn (if (null (member gnus-tm-lisp-directory load-path)) ! (setq load-path (cons gnus-tm-lisp-directory load-path))) ! (load "mime-setup"))) ;;; Mailcrypt by ;;; Jin Choi *************** *** 80,86 **** (if gnus-use-mailcrypt (progn (if (null (member gnus-mailcrypt-lisp-directory load-path)) ! (setq load-path (cons gnus-mailcrypt-lisp-directory load-path)))) (autoload 'mc-install-write-mode "mailcrypt" nil t) (autoload 'mc-install-read-mode "mailcrypt" nil t) (add-hook 'mail-mode-hook 'mc-install-write-mode) --- 99,105 ---- (if gnus-use-mailcrypt (progn (if (null (member gnus-mailcrypt-lisp-directory load-path)) ! (setq load-path (cons gnus-mailcrypt-lisp-directory load-path))) (autoload 'mc-install-write-mode "mailcrypt" nil t) (autoload 'mc-install-read-mode "mailcrypt" nil t) (add-hook 'mail-mode-hook 'mc-install-write-mode) *************** *** 90,102 **** (if gnus-use-mhe (progn (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) ! (add-hook 'mh-letter-mode-hook 'mc-install-write-mode)))) ;;; BBDB by ;;; Jamie Zawinski (if gnus-use-bbdb (progn (autoload 'bbdb "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-name "bbdb-com" --- 109,123 ---- (if gnus-use-mhe (progn (add-hook 'mh-folder-mode-hook 'mc-install-read-mode) ! (add-hook 'mh-letter-mode-hook 'mc-install-write-mode))))) ;;; BBDB by ;;; Jamie Zawinski (if gnus-use-bbdb (progn + (if (null (member gnus-bbdb-lisp-directory load-path)) + (setq load-path (cons gnus-bbdb-lisp-directory load-path))) (autoload 'bbdb "bbdb-com" "Insidious Big Brother Database" t) (autoload 'bbdb-name "bbdb-com" *************** *** 144,149 **** --- 165,173 ---- (autoload 'gnus-update-format "gnus" "\ Update the format specification near point." t nil) + + (autoload 'gnus-slave-no-server "gnus" "\ + Read network news as a slave without connecting to local server." t nil) (autoload 'gnus-no-server "gnus" "\ Read network news. *** pub/sgnus/lisp/gnus-soup.el Tue Dec 5 06:10:56 1995 --- sgnus/lisp/gnus-soup.el Wed Dec 6 05:57:28 1995 *************** *** 67,78 **** `n' means no index file and `c' means standard Cnews overview format.") - (defvar gnus-soup-group-type ?u - "*Soup message area type. - `u' is unknown, `m' is private mail, and `n' is news. - Gnus will determine by itself what type to use in what group, so - setting this variable won't do much.") - (defvar gnus-soup-areas nil) (defvar gnus-soup-last-prefix nil) (defvar gnus-soup-prev-prefix nil) --- 67,72 ---- *************** *** 211,217 **** (concat directory prefix ".IDX")))) (article-buf (current-buffer)) from head-line beg type) ! (setq gnus-soup-buffers (cons msg-buf gnus-soup-buffers)) (buffer-disable-undo msg-buf) (and idx-buf (progn --- 205,211 ---- (concat directory prefix ".IDX")))) (article-buf (current-buffer)) from head-line beg type) ! (setq gnus-soup-buffers (cons msg-buf (delq msg-buf gnus-soup-buffers))) (buffer-disable-undo msg-buf) (and idx-buf (progn *************** *** 255,261 **** (set-buffer idx-buf) (gnus-soup-insert-idx beg headers)) ((/= index ?n) ! (error "Unknown index type: %c" type)))))) (defun gnus-soup-group-brew (group) (let ((gnus-expert-user t) --- 249,257 ---- (set-buffer idx-buf) (gnus-soup-insert-idx beg headers)) ((/= index ?n) ! (error "Unknown index type: %c" type))) ! ;; Return the MSG buf. ! msg-buf))) (defun gnus-soup-group-brew (group) (let ((gnus-expert-user t) *** pub/sgnus/lisp/gnus-srvr.el Tue Dec 5 06:10:56 1995 --- sgnus/lisp/gnus-srvr.el Sat Dec 9 10:10:19 1995 *************** *** 95,105 **** (gnus-visual-p 'server-menu 'menu)) (gnus-server-make-menu-bar)) (kill-all-local-variables) ! (setq mode-line-modified "-- ") ! (make-local-variable 'mode-line-format) ! (setq mode-line-format (copy-sequence mode-line-format)) ! (and (equal (nth 3 mode-line-format) " ") ! (setcar (nthcdr 3 mode-line-format) "")) (setq major-mode 'gnus-server-mode) (setq mode-name "Server") ; (gnus-group-set-mode-line) --- 95,101 ---- (gnus-visual-p 'server-menu 'menu)) (gnus-server-make-menu-bar)) (kill-all-local-variables) ! (gnus-simplify-mode-line) (setq major-mode 'gnus-server-mode) (setq mode-name "Server") ; (gnus-group-set-mode-line) *** pub/sgnus/lisp/gnus-topic.el Tue Dec 5 06:10:56 1995 --- sgnus/lisp/gnus-topic.el Sat Dec 9 08:33:22 1995 *************** *** 95,100 **** --- 95,101 ---- If ALL is non-nil, list groups that have no unread articles. If LOWEST is non-nil, list all newsgroups of level LOWEST or higher." (set-buffer gnus-group-buffer) + (setq gnus-topic-indentation "") (let ((buffer-read-only nil) (lowest (or lowest 1)) tlist info) *************** *** 234,239 **** --- 235,241 ---- (indentation (make-string (* 2 level) ? )) (number-of-articles (gnus-topic-articles-in-topic entries)) (number-of-groups (length entries))) + (setq gnus-topic-indentation "") (beginning-of-line) ;; Insert the text. (add-text-properties *************** *** 242,248 **** (eval gnus-topic-line-format-spec)) (list 'gnus-topic name 'gnus-topic-level level ! 'gnus-topic-visible visiblep)))) (defun gnus-topic-previous-topic (topic) "Return the previous topic on the same level as TOPIC." --- 244,251 ---- (eval gnus-topic-line-format-spec)) (list 'gnus-topic name 'gnus-topic-level level ! 'gnus-topic-visible visiblep)) ! (gnus-group-remove-excess-properties))) (defun gnus-topic-previous-topic (topic) "Return the previous topic on the same level as TOPIC." *************** *** 370,381 **** (entries (gnus-topic-find-groups (car type))) (visiblep (eq (nth 1 type) 'visible))) ;; Insert the topic line. ! (if topic ! (progn ! (gnus-delete-line) ! (gnus-topic-insert-topic-line ! (car type) visiblep ! (not (eq (nth 2 type) 'hidden)) level entries))))) ;;; Topic mode, commands and keymap. --- 373,383 ---- (entries (gnus-topic-find-groups (car type))) (visiblep (eq (nth 1 type) 'visible))) ;; Insert the topic line. ! (when topic ! (gnus-delete-line) ! (gnus-topic-insert-topic-line ! (car type) visiblep ! (not (eq (nth 2 type) 'hidden)) level entries)))) ;;; Topic mode, commands and keymap. *************** *** 475,483 **** ;; Check whether this topic already exists. (when (gnus-topic-find-topology topic) (error "Topic aleady exists")) (let ((top (cdr (gnus-topic-find-topology parent)))) (unless top ! (error "No such topic: %s" parent)) (if previous (progn (while (and (cdr top) --- 477,487 ---- ;; Check whether this topic already exists. (when (gnus-topic-find-topology topic) (error "Topic aleady exists")) + (unless parent + (setq parent (car (car gnus-topic-topology)))) (let ((top (cdr (gnus-topic-find-topology parent)))) (unless top ! (error "No such parent topic: %s" parent)) (if previous (progn (while (and (cdr top) *************** *** 570,578 **** "Move all groups that match REGEXP to some topic." (interactive (let (topic) ! (list ! (setq topic (completing-read "Move to topic: " gnus-topic-alist nil t)) ! (read-string (format "Move to %s (regexp): " topic))))) (gnus-group-mark-regexp regexp) (gnus-topic-move-group nil topic copyp)) --- 574,583 ---- "Move all groups that match REGEXP to some topic." (interactive (let (topic) ! (nreverse ! (list ! (setq topic (completing-read "Move to topic: " gnus-topic-alist nil t)) ! (read-string (format "Move to %s (regexp): " topic)))))) (gnus-group-mark-regexp regexp) (gnus-topic-move-group nil topic copyp)) *************** *** 580,588 **** "Copy all groups that match REGEXP to some topic." (interactive (let (topic) ! (list ! (setq topic (completing-read "Copy to topic: " gnus-topic-alist nil t)) ! (read-string (format "Copy to %s (regexp): " topic))))) (gnus-topic-move-matching regexp topic t)) (defun gnus-topic-delete (topic) --- 585,594 ---- "Copy all groups that match REGEXP to some topic." (interactive (let (topic) ! (nreverse ! (list ! (setq topic (completing-read "Copy to topic: " gnus-topic-alist nil t)) ! (read-string (format "Copy to %s (regexp): " topic)))))) (gnus-topic-move-matching regexp topic t)) (defun gnus-topic-delete (topic) *************** *** 605,619 **** (defun gnus-topic-rename (old-name new-name) "Rename a topic." (interactive ! (list ! (completing-read "Rename topic: " gnus-topic-alist nil t) ! (read-string (format "Rename %s to: ")))) (let ((top (gnus-topic-find-topology old-name)) (entry (assoc old-name gnus-topic-alist))) (when top (setcar (car (cdr top)) new-name)) (when entry ! (setcar entry new-name)))) (defun gnus-topic-indent (&optional unindent) "Indent a topic -- make it a sub-topic of the previous topic. --- 611,627 ---- (defun gnus-topic-rename (old-name new-name) "Rename a topic." (interactive ! (let (topic) ! (list ! (setq topic (completing-read "Rename topic: " gnus-topic-alist nil t)) ! (read-string (format "Rename %s to: " topic))))) (let ((top (gnus-topic-find-topology old-name)) (entry (assoc old-name gnus-topic-alist))) (when top (setcar (car (cdr top)) new-name)) (when entry ! (setcar entry new-name)) ! (gnus-group-list-groups))) (defun gnus-topic-indent (&optional unindent) "Indent a topic -- make it a sub-topic of the previous topic. *** pub/sgnus/lisp/gnus-vis.el Tue Dec 5 06:10:57 1995 --- sgnus/lisp/gnus-vis.el Sat Dec 9 10:01:56 1995 *************** *** 1266,1272 **** (skip-chars-forward ": \t") (let ((from (point))) (goto-char end) ! (skip-chars-backward " \t") (put-text-property from (point) 'face field-face) (setq field-found t)))))) (goto-char begin))))))) --- 1266,1272 ---- (skip-chars-forward ": \t") (let ((from (point))) (goto-char end) ! (skip-chars-backward " \t\n") (put-text-property from (point) 'face field-face) (setq field-found t)))))) (goto-char begin))))))) *** pub/sgnus/lisp/gnus.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/gnus.el Sat Dec 9 10:15:19 1995 *************** *** 189,199 **** (defvar gnus-group-faq-directory '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/" ! "/ftp@ftp.uu.net:/usenet/news.answers/" "/ftp@ftp.seas.gwu.edu:/pub/rtfm/" "/ftp@rtfm.mit.edu:/pub/usenet/news.answers/" "/ftp@ftp.uni-paderborn.de:/pub/FAQ/" ! "/ftp@ftp.Germany.EU.net:/pub/newsarchive/news.answers/" "/ftp@ftp.sunet.se:/pub/usenet/" "/ftp@nctuccca.edu.tw:/USENET/FAQ/" "/ftp@hwarang.postech.ac.kr:/pub/usenet/news.answers/" --- 189,199 ---- (defvar gnus-group-faq-directory '("/ftp@mirrors.aol.com:/pub/rtfm/usenet/" ! ; "/ftp@ftp.uu.net:/usenet/news.answers/" "/ftp@ftp.seas.gwu.edu:/pub/rtfm/" "/ftp@rtfm.mit.edu:/pub/usenet/news.answers/" "/ftp@ftp.uni-paderborn.de:/pub/FAQ/" ! ; "/ftp@ftp.Germany.EU.net:/pub/newsarchive/news.answers/" "/ftp@ftp.sunet.se:/pub/usenet/" "/ftp@nctuccca.edu.tw:/USENET/FAQ/" "/ftp@hwarang.postech.ac.kr:/pub/usenet/news.answers/" *************** *** 212,223 **** If the default site is too slow, try one of these: ! North America: ftp.uu.net /usenet/news.answers ! mirrors.aol.com /pub/rtfm/usenet ftp.seas.gwu.edu /pub/rtfm rtfm.mit.edu /pub/usenet/news.answers Europe: ftp.uni-paderborn.de /pub/FAQ - ftp.Germany.EU.net /pub/newsarchive/news.answers ftp.sunet.se /pub/usenet Asia: nctuccca.edu.tw /USENET/FAQ hwarang.postech.ac.kr /pub/usenet/news.answers --- 212,221 ---- If the default site is too slow, try one of these: ! North America: mirrors.aol.com /pub/rtfm/usenet ftp.seas.gwu.edu /pub/rtfm rtfm.mit.edu /pub/usenet/news.answers Europe: ftp.uni-paderborn.de /pub/FAQ ftp.sunet.se /pub/usenet Asia: nctuccca.edu.tw /USENET/FAQ hwarang.postech.ac.kr /pub/usenet/news.answers *************** *** 914,920 **** If nil, all files that use the same viewing command will be given as a list of parameters to that command.") ! (defvar gnus-group-line-format "%M%S%p%5y: %(%g%)\n" "*Format of group lines. It works along the same lines as a normal formatting string, with some simple extensions. --- 912,918 ---- If nil, all files that use the same viewing command will be given as a list of parameters to that command.") ! (defvar gnus-group-line-format "%M%S%p%P%5y: %(%g%)\n" "*Format of group lines. It works along the same lines as a normal formatting string, with some simple extensions. *************** *** 936,941 **** --- 934,940 ---- %o Moderated group (char, \"m\") %p Process mark (char) %O Moderated group (string, \"(m)\" or \"\") + %P Topic indentation (string) %n Select from where (string) %z A string that look like `<%s:%n>' if a foreign select method is used %u User defined specifier. The next character in the format string should *************** *** 1036,1052 **** (defvar gnus-valid-select-methods '(("nntp" post address prompt-address) ("nnspool" post) ! ("nnvirtual" none virtual prompt-address) ("nnmbox" mail respool) ("nnml" mail respool) ("nnmh" mail respool) ("nndir" none prompt-address address) ("nneething" none prompt-address) - ("nndigest" none) ("nndoc" none prompt-address) ("nnbabyl" mail respool) ("nnkiboze" post virtual) ! ("nnsoup" post) ("nnfolder" mail respool)) "An alist of valid select methods. The first element of each list lists should be a string with the name --- 1035,1050 ---- (defvar gnus-valid-select-methods '(("nntp" post address prompt-address) ("nnspool" post) ! ("nnvirtual" post-mail virtual prompt-address) ("nnmbox" mail respool) ("nnml" mail respool) ("nnmh" mail respool) ("nndir" none prompt-address address) ("nneething" none prompt-address) ("nndoc" none prompt-address) ("nnbabyl" mail respool) ("nnkiboze" post virtual) ! ("nnsoup" post-mail) ("nnfolder" mail respool)) "An alist of valid select methods. The first element of each list lists should be a string with the name *************** *** 1263,1268 **** --- 1261,1269 ---- It is meant to be used for highlighting the article in some way. It is not run if `gnus-visual' is nil.") + (defun gnus-parse-headers-hook nil + "*A hook called before parsing the headers.") + (defvar gnus-exit-group-hook nil "*A hook called when exiting (not quitting) summary mode.") *************** *** 1316,1321 **** --- 1317,1323 ---- (defvar gnus-newsgroup-selected-overlay nil) (defvar gnus-inhibit-hiding nil) + (defvar gnus-topic-indentation "") (defvar gnus-article-mode-map nil) (defvar gnus-dribble-buffer nil) *************** *** 1355,1366 **** --- 1357,1370 ---- (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))) ?d) (?g gnus-tmp-group ?s) (?G gnus-tmp-qualified-group ?s) + (?c (gnus-group-short-name gnus-tmp-group) ?s) (?D gnus-tmp-newsgroup-description ?s) (?o gnus-tmp-moderated ?c) (?O gnus-tmp-moderated-string ?s) (?p gnus-tmp-process-marked ?c) (?s gnus-tmp-news-server ?s) (?n gnus-tmp-news-method ?s) + (?P gnus-topic-indentation ?s) (?z gnus-tmp-news-method-string ?s) (?u gnus-tmp-user-defined ?s))) *************** *** 1435,1441 **** "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.18" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1439,1445 ---- "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)" "The mail address of the Gnus maintainers.") ! (defconst gnus-version "September Gnus v0.19" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 1735,1741 **** ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers gnus-cache-possibly-remove-articles gnus-cache-request-article gnus-cache-retrieve-headers gnus-cache-possibly-alter-active ! gnus-cache-enter-remove-article) ("gnus-cache" :interactive t gnus-jog-cache) ("gnus-score" :interactive t gnus-summary-increase-score gnus-summary-lower-score --- 1739,1746 ---- ("gnus-cache" gnus-cache-possibly-enter-article gnus-cache-save-buffers gnus-cache-possibly-remove-articles gnus-cache-request-article gnus-cache-retrieve-headers gnus-cache-possibly-alter-active ! gnus-cache-enter-remove-article ! gnus-cache-open gnus-cache-close) ("gnus-cache" :interactive t gnus-jog-cache) ("gnus-score" :interactive t gnus-summary-increase-score gnus-summary-lower-score *************** *** 2035,2040 **** --- 2040,2046 ---- (defun gnus-group-line-format-spec () (insert gnus-tmp-marked gnus-tmp-subscribed gnus-tmp-process-marked + gnus-topic-indentation (format "%5s: " gnus-tmp-number-of-unread)) (put-text-property (point) *************** *** 3251,3256 **** --- 3257,3271 ---- "Return the quit-config of GROUP." (nth 1 (assoc 'quit-config (gnus-find-method-for-group group)))) + (defun gnus-simplify-mode-line () + "Make mode lines a bit simpler." + (setq mode-line-modified "-- ") + (when (listp mode-line-format) + (make-local-variable 'mode-line-format) + (setq mode-line-format (copy-sequence mode-line-format)) + (and (equal (nth 3 mode-line-format) " ") + (setcar (nthcdr 3 mode-line-format) "")))) + ;;; List and range functions (defun gnus-last-element (list) *************** *** 3503,3509 **** (defvar gnus-group-sort-map nil) (defvar gnus-group-soup-map nil) (defvar gnus-group-sub-map nil) - (defvar gnus-group-sub-map nil) (defvar gnus-group-help-map nil) (defvar gnus-group-score-map nil) (put 'gnus-group-mode 'mode-class 'special) --- 3518,3523 ---- *************** *** 3617,3626 **** (define-key gnus-group-sort-map "r" 'gnus-group-sort-groups-by-rank) (define-key gnus-group-sort-map "m" 'gnus-group-sort-groups-by-method) - (define-prefix-command 'gnus-group-help-map) - (define-key gnus-group-mode-map "H" 'gnus-group-help-map) - (define-key gnus-group-help-map "f" 'gnus-group-fetch-faq) - (define-prefix-command 'gnus-group-list-map) (define-key gnus-group-mode-map "A" 'gnus-group-list-map) (define-key gnus-group-list-map "k" 'gnus-group-list-killed) --- 3631,3636 ---- *************** *** 3632,3642 **** --- 3642,3657 ---- (define-key gnus-group-list-map "d" 'gnus-group-description-apropos) (define-key gnus-group-list-map "m" 'gnus-group-list-matching) (define-key gnus-group-list-map "M" 'gnus-group-list-all-matching) + (define-key gnus-group-list-map "l" 'gnus-group-list-level) (define-prefix-command 'gnus-group-score-map) (define-key gnus-group-mode-map "W" 'gnus-group-score-map) (define-key gnus-group-score-map "f" 'gnus-score-flush-cache) + (define-prefix-command 'gnus-group-help-map) + (define-key gnus-group-mode-map "H" 'gnus-group-help-map) + (define-key gnus-group-help-map "f" 'gnus-group-fetch-faq) + (define-prefix-command 'gnus-group-sub-map) (define-key gnus-group-mode-map "S" 'gnus-group-sub-map) (define-key gnus-group-sub-map "l" 'gnus-group-set-current-level) *************** *** 3669,3679 **** (gnus-visual-p 'group-menu 'menu)) (gnus-group-make-menu-bar)) (kill-all-local-variables) ! (setq mode-line-modified "-- ") ! (make-local-variable 'mode-line-format) ! (setq mode-line-format (copy-sequence mode-line-format)) ! (and (equal (nth 3 mode-line-format) " ") ! (setcar (nthcdr 3 mode-line-format) "")) (setq major-mode 'gnus-group-mode) (setq mode-name "Group") (gnus-group-set-mode-line) --- 3684,3690 ---- (gnus-visual-p 'group-menu 'menu)) (gnus-group-make-menu-bar)) (kill-all-local-variables) ! (gnus-simplify-mode-line) (setq major-mode 'gnus-group-mode) (setq mode-name "Group") (gnus-group-set-mode-line) *************** *** 3742,3752 **** (gnus-group-get-new-news)) (gnus-clear-system) - (nnheader-init-server-buffer) - (gnus-read-init-file) - (setq gnus-slave slave) (gnus-group-setup-buffer) --- 3753,3760 ---- *************** *** 3778,3784 **** --- 3786,3794 ---- (and (or gnus-slave gnus-use-dribble-file) (gnus-dribble-read-file)) (gnus-summary-make-display-table) + ;; Do the actual startup. (gnus-setup-news nil level) + ;; Generate the group buffer. (gnus-group-list-groups level) (gnus-configure-windows 'group) (gnus-group-set-mode-line)))))) *************** *** 3937,3943 **** (gnus-group-mode) (and gnus-carpal (gnus-carpal-setup-buffer 'group))))) ! (defun gnus-group-list-groups (&optional level unread) "List newsgroups with level LEVEL or lower that have unread articles. Default is all subscribed groups. If argument UNREAD is non-nil, groups with no unread articles are also --- 3947,3953 ---- (gnus-group-mode) (and gnus-carpal (gnus-carpal-setup-buffer 'group))))) ! (defun gnus-group-list-groups (&optional level unread lowest) "List newsgroups with level LEVEL or lower that have unread articles. Default is all subscribed groups. If argument UNREAD is non-nil, groups with no unread articles are also *************** *** 3956,3962 **** (gnus-update-format-specifications) (let ((case-fold-search nil) (group (gnus-group-group-name))) ! (funcall gnus-group-prepare-function level unread nil) (if (zerop (buffer-size)) (gnus-message 5 gnus-no-groups-message) (goto-char (point-min)) --- 3966,3972 ---- (gnus-update-format-specifications) (let ((case-fold-search nil) (group (gnus-group-group-name))) ! (funcall gnus-group-prepare-function level unread lowest) (if (zerop (buffer-size)) (gnus-message 5 gnus-no-groups-message) (goto-char (point-min)) *************** *** 3984,3995 **** --- 3994,4012 ---- ;; Adjust cursor point. (gnus-group-position-point)))) + (defun gnus-group-list-level (level &optional all) + "List groups on LEVEL. + If ALL (the prefix), also list groups that have no unread articles." + (interactive "nList groups on level: \nP") + (gnus-group-list-groups level all level)) + (defun gnus-group-prepare-flat (level &optional all lowest regexp) "List all newsgroups with unread articles of level LEVEL or lower. If ALL is non-nil, list groups that have no unread articles. If LOWEST is non-nil, list all newsgroups of level LOWEST or higher. If REGEXP, only list groups matching REGEXP." (set-buffer gnus-group-buffer) + (setq gnus-topic-indentation "") (let ((buffer-read-only nil) (newsrc (cdr gnus-newsrc-alist)) (lowest (or lowest 1)) *************** *** 4961,4975 **** "Get info from buffer, update variables and jump to the group buffer." (set-buffer (get-buffer-create gnus-group-edit-buffer)) (goto-char (point-min)) ! (let ((form (read (current-buffer))) ! (winconf gnus-prev-winconf)) (if (eq part 'info) ! (gnus-group-set-info form) (gnus-group-set-info form group part)) (kill-buffer (current-buffer)) (and winconf (set-window-configuration winconf)) (set-buffer gnus-group-buffer) ! (gnus-group-update-group (gnus-group-group-name)) (gnus-group-position-point))) (defun gnus-group-make-help-group () --- 4978,5007 ---- "Get info from buffer, update variables and jump to the group buffer." (set-buffer (get-buffer-create gnus-group-edit-buffer)) (goto-char (point-min)) ! (let* ((form (read (current-buffer))) ! (winconf gnus-prev-winconf) ! (new-group (when (eq part 'info) ! (if (or (not (nth 4 form)) ! (gnus-server-equal ! gnus-select-method (nth 4 form))) ! (gnus-group-real-name (car form)) ! (gnus-group-prefixed-name ! (gnus-group-real-name (car form)) (nth 4 form)))))) ! ;; Set the info. (if (eq part 'info) ! (progn ! (when new-group (setcar form new-group)) ! (gnus-group-set-info form)) (gnus-group-set-info form group part)) (kill-buffer (current-buffer)) (and winconf (set-window-configuration winconf)) (set-buffer gnus-group-buffer) ! (when (and new-group ! (not (equal new-group group))) ! (when (gnus-group-goto-group group) ! (gnus-group-kill-group 1)) ! (gnus-activate-group new-group)) ! (gnus-group-update-group (or new-group group)) (gnus-group-position-point))) (defun gnus-group-make-help-group () *************** *** 5316,5327 **** (let* ((info (gnus-get-info group)) (expirable (if (gnus-group-total-expirable-p group) (cons nil (gnus-list-of-read-articles group)) ! (assq 'expire (gnus-info-marks info))))) (when expirable (setcdr expirable (gnus-compress-sequence ! (gnus-request-expire-articles ! (gnus-uncompress-sequence (cdr expirable)) group))))))))) (defun gnus-group-expire-all-groups () "Expire all expirable articles in all newsgroups." --- 5348,5366 ---- (let* ((info (gnus-get-info group)) (expirable (if (gnus-group-total-expirable-p group) (cons nil (gnus-list-of-read-articles group)) ! (assq 'expire (gnus-info-marks info)))) ! (expiry-wait (gnus-group-get-parameter 'expiry-wait))) (when expirable (setcdr expirable (gnus-compress-sequence ! (if expiry-wait ! (let ((nnmail-expiry-wait-function nil) ! (nnmail-expiry-wait expiry-wait)) ! (gnus-request-expire-articles ! (gnus-uncompress-sequence (cdr expirable)) group)) ! (gnus-request-expire-articles ! (gnus-uncompress-sequence (cdr expirable)) ! group)))))))))) (defun gnus-group-expire-all-groups () "Expire all expirable articles in all newsgroups." *************** *** 5373,5385 **** (gnus-group-unsubscribe-group group (if (<= (gnus-group-group-level) gnus-level-subscribed) gnus-level-default-unsubscribed ! gnus-level-default-subscribed)) (gnus-group-update-group-line)) (gnus-group-next-group 1))) ! (defun gnus-group-unsubscribe-group (group &optional level) ! "Toggle subscribe from/to unsubscribe GROUP. ! New newsgroup is added to .newsrc automatically." (interactive (list (completing-read "Group: " gnus-active-hashtb nil --- 5412,5425 ---- (gnus-group-unsubscribe-group group (if (<= (gnus-group-group-level) gnus-level-subscribed) gnus-level-default-unsubscribed ! gnus-level-default-subscribed) t) (gnus-group-update-group-line)) (gnus-group-next-group 1))) ! (defun gnus-group-unsubscribe-group (group &optional level silent) ! "Toggle subscription to GROUP. ! Killed newsgroups are subscribed. If SILENT, don't try to update the ! group line." (interactive (list (completing-read "Group: " gnus-active-hashtb nil *************** *** 5395,5401 **** gnus-level-subscribed) (1+ gnus-level-subscribed) gnus-level-default-subscribed))) ! (gnus-group-update-group group)) ((and (stringp group) (or (not (memq gnus-select-method gnus-have-read-active-file)) (gnus-active group))) --- 5435,5442 ---- gnus-level-subscribed) (1+ gnus-level-subscribed) gnus-level-default-subscribed))) ! (unless silent ! (gnus-group-update-group group))) ((and (stringp group) (or (not (memq gnus-select-method gnus-have-read-active-file)) (gnus-active group))) *************** *** 5408,5414 **** gnus-level-killed) (and (gnus-group-group-name) (gnus-gethash (gnus-group-group-name) gnus-newsrc-hashtb))) ! (gnus-group-update-group group)) (t (error "No such newsgroup: %s" group))) (gnus-group-position-point))) --- 5449,5456 ---- gnus-level-killed) (and (gnus-group-group-name) (gnus-gethash (gnus-group-group-name) gnus-newsrc-hashtb))) ! (unless silent ! (gnus-group-update-group group))) (t (error "No such newsgroup: %s" group))) (gnus-group-position-point))) *************** *** 5877,5882 **** --- 5919,5927 ---- (gnus-save-newsrc-file) ;; Kill-em-all. (gnus-close-backends) + ;; Shut down the cache. + (when gnus-use-cache + (gnus-cache-open)) ;; Reset everything. (gnus-clear-system)))) *************** *** 5908,5913 **** --- 5953,5961 ---- (gnus-remove-some-windows)) (gnus-dribble-save) (gnus-close-backends) + ;; Shut down the cache. + (when gnus-use-cache + (gnus-cache-open)) (gnus-clear-system))) (defun gnus-offer-save-summaries () *************** *** 6075,6085 **** (when (and menu-bar-mode (gnus-visual-p 'browse-menu 'menu)) (gnus-browse-make-menu-bar)) ! (setq mode-line-modified "-- ") ! (make-local-variable 'mode-line-format) ! (setq mode-line-format (copy-sequence mode-line-format)) ! (and (equal (nth 3 mode-line-format) " ") ! (setcar (nthcdr 3 mode-line-format) "")) (setq major-mode 'gnus-browse-mode) (setq mode-name "Browse Server") (setq mode-line-process nil) --- 6123,6129 ---- (when (and menu-bar-mode (gnus-visual-p 'browse-menu 'menu)) (gnus-browse-make-menu-bar)) ! (gnus-simplify-mode-line) (setq major-mode 'gnus-browse-mode) (setq mode-name "Browse Server") (setq mode-line-process nil) *************** *** 6557,6567 **** (set (car locals) nil)) (setq locals (cdr locals)))) (gnus-make-thread-indent-array) ! (setq mode-line-modified "-- ") ! (make-local-variable 'mode-line-format) ! (setq mode-line-format (copy-sequence mode-line-format)) ! (and (equal (nth 3 mode-line-format) " ") ! (setcar (nthcdr 3 mode-line-format) "")) (setq major-mode 'gnus-summary-mode) (setq mode-name "Summary") (make-local-variable 'minor-mode-alist) --- 6601,6607 ---- (set (car locals) nil)) (setq locals (cdr locals)))) (gnus-make-thread-indent-array) ! (gnus-simplify-mode-line) (setq major-mode 'gnus-summary-mode) (setq mode-name "Summary") (make-local-variable 'minor-mode-alist) *************** *** 7192,7198 **** (let (id heads) (mapatoms (lambda (refs) ! (when (car (symbol-value refs)) (setq heads (cdr (symbol-value refs))) (while heads (if (memq (mail-header-number (car (car heads))) --- 7232,7238 ---- (let (id heads) (mapatoms (lambda (refs) ! (when (not (car (symbol-value refs))) (setq heads (cdr (symbol-value refs))) (while heads (if (memq (mail-header-number (car (car heads))) *************** *** 7582,7591 **** default-score) gnus-summary-mark-below)) (setq gnus-newsgroup-unreads ! (delq number gnus-newsgroup-unreads) ! gnus-newsgroup-reads ! (cons (cons number gnus-low-score-mark) ! gnus-newsgroup-reads)))) (when gnus-tmp-header ;; We may have an old dummy line to output before this --- 7622,7632 ---- default-score) gnus-summary-mark-below)) (setq gnus-newsgroup-unreads ! (delq number gnus-newsgroup-unreads)) ! (if gnus-newsgroup-auto-expire ! (push number gnus-newsgroup-expirable) ! (push (cons number gnus-low-score-mark) ! gnus-newsgroup-reads)))) (when gnus-tmp-header ;; We may have an old dummy line to output before this *************** *** 7704,7713 **** gnus-summary-default-score 0) gnus-summary-mark-below)) (setq gnus-newsgroup-unreads ! (delq number gnus-newsgroup-unreads) ! gnus-newsgroup-reads ! (cons (cons number gnus-low-score-mark) ! gnus-newsgroup-reads))) (setq mark (cond --- 7745,7755 ---- gnus-summary-default-score 0) gnus-summary-mark-below)) (setq gnus-newsgroup-unreads ! (delq number gnus-newsgroup-unreads)) ! (if gnus-newsgroup-auto-expire ! (push number gnus-newsgroup-expirable) ! (push (cons number gnus-low-score-mark) ! gnus-newsgroup-reads))) (setq mark (cond *************** *** 7936,7948 **** (bookmarks . bookmark) (dormant . dormant) (scored . score))) (info (gnus-get-info gnus-newsgroup-name)) ! (uncompressed '(score bookmark)) ! var type list newmarked) ;; Add all marks lists that are non-nil to the list of marks lists. (while types (setq type (pop types)) ! (when (setq list (symbol-value (intern (format "gnus-newsgroup-%s" ! (car type))))) (push (cons (cdr type) (if (memq (cdr type) uncompressed) list (gnus-compress-sequence list t))) --- 7978,7993 ---- (bookmarks . bookmark) (dormant . dormant) (scored . score))) (info (gnus-get-info gnus-newsgroup-name)) ! (uncompressed '(score bookmark killed)) ! var type list newmarked symbol) ;; Add all marks lists that are non-nil to the list of marks lists. (while types (setq type (pop types)) ! (when (setq list (symbol-value ! (setq symbol ! (intern (format "gnus-newsgroup-%s" ! (car type)))))) ! (setq list (set symbol (sort list '<))) (push (cons (cdr type) (if (memq (cdr type) uncompressed) list (gnus-compress-sequence list t))) *************** *** 7950,7971 **** ;; Enter these new marks into the info of the group. (if (nthcdr 3 info) ! (progn ! (setcar (nthcdr 3 info) newmarked) ! ;; Cut off the end of the info if there's nothing else there. ! (or newmarked (nthcdr 4 info) ! (setcdr (nthcdr 2 info) nil))) ;; Add the marks lists to the end of the info. (when newmarked ! (setcdr (nthcdr 2 info) (list newmarked)))))) (defun gnus-add-marked-articles (group type articles &optional info force) ;; Add ARTICLES of TYPE to the info of GROUP. ;; If INFO is non-nil, use that info. If FORCE is non-nil, don't ;; add, but replace marked articles of TYPE with ARTICLES. (let ((info (or info (gnus-get-info group))) ! (uncompressed '(score bookmark)) marked m) (or (not info) (and (not (setq marked (nthcdr 3 info))) --- 7995,8018 ---- ;; Enter these new marks into the info of the group. (if (nthcdr 3 info) ! (setcar (nthcdr 3 info) newmarked) ;; Add the marks lists to the end of the info. (when newmarked ! (setcdr (nthcdr 2 info) (list newmarked)))) + ;; Cut off the end of the info if there's nothing else there. + (let ((i 5)) + (while (and (> i 2) + (not (nth i info))) + (when (nthcdr (decf i) info) + (setcdr (nthcdr i info) nil)))))) (defun gnus-add-marked-articles (group type articles &optional info force) ;; Add ARTICLES of TYPE to the info of GROUP. ;; If INFO is non-nil, use that info. If FORCE is non-nil, don't ;; add, but replace marked articles of TYPE with ARTICLES. (let ((info (or info (gnus-get-info group))) ! (uncompressed '(score bookmark killed)) marked m) (or (not info) (and (not (setq marked (nthcdr 3 info))) *************** *** 8011,8017 **** gnus-tmp-unread-and-unticked gnus-tmp-unselected)))) (gnus-tmp-subject ! (if gnus-current-headers (mail-header-subject gnus-current-headers) "")) max-len header);; passed as argument to any user-format-funcs --- 8058,8065 ---- gnus-tmp-unread-and-unticked gnus-tmp-unselected)))) (gnus-tmp-subject ! (if (and gnus-current-headers ! (vectorp gnus-current-headers)) (mail-header-subject gnus-current-headers) "")) max-len header);; passed as argument to any user-format-funcs *************** *** 8341,8346 **** --- 8389,8398 ---- number headers header) (save-excursion (set-buffer nntp-server-buffer) + ;; Allow the user to mangle the headers before parsing them. + (run-hooks 'gnus-parse-headers-hook) + ;; Allow the user to mangle the headers before parsing them. + (run-hooks 'gnus-parse-headers-hook) (goto-char (point-min)) (while (and sequence (not (eobp))) (setq number (read cur)) *************** *** 8861,8866 **** --- 8913,8920 ---- (bury-buffer gnus-article-buffer)) (setq gnus-current-select-method gnus-select-method) (pop-to-buffer gnus-group-buffer) + ;; Clear the current group name. + (setq gnus-newsgroup-name nil) (if (not quit-config) (progn (gnus-group-jump-to-group group) *************** *** 8880,8909 **** (gnus-set-global-variables) (let* ((group gnus-newsgroup-name) (quit-config (gnus-group-quit-config group))) ! (if (or no-questions ! gnus-expert-user ! (gnus-y-or-n-p "Do you really wanna quit reading this group? ")) ! (progn ! (gnus-close-group group) ! (gnus-summary-clear-local-variables) ! (set-buffer gnus-group-buffer) ! (gnus-summary-clear-local-variables) ! ;; Return to group selection mode. ! (gnus-configure-windows 'group 'force) ! (if (get-buffer gnus-summary-buffer) ! (kill-buffer gnus-summary-buffer)) ! (if (get-buffer gnus-article-buffer) ! (bury-buffer gnus-article-buffer)) ! (if (equal (gnus-group-group-name) group) ! (gnus-group-next-unread-group 1)) ! (if quit-config ! (progn ! (if (not (buffer-name (car quit-config))) ! (gnus-configure-windows 'group 'force) ! (set-buffer (car quit-config)) ! (and (eq major-mode 'gnus-summary-mode) ! (gnus-set-global-variables)) ! (gnus-configure-windows (cdr quit-config))))))))) ;; Suggested by Andrew Eskilsson . (defun gnus-summary-fetch-faq (&optional faq-dir) --- 8934,8963 ---- (gnus-set-global-variables) (let* ((group gnus-newsgroup-name) (quit-config (gnus-group-quit-config group))) ! (when (or no-questions ! gnus-expert-user ! (gnus-y-or-n-p "Do you really wanna quit reading this group? ")) ! (gnus-close-group group) ! (gnus-summary-clear-local-variables) ! (set-buffer gnus-group-buffer) ! (gnus-summary-clear-local-variables) ! ;; Return to the group buffer. ! (gnus-configure-windows 'group 'force) ! ;; Clear the current group name. ! (setq gnus-newsgroup-name nil) ! (when (get-buffer gnus-summary-buffer) ! (kill-buffer gnus-summary-buffer)) ! (when (get-buffer gnus-article-buffer) ! (bury-buffer gnus-article-buffer)) ! (when (equal (gnus-group-group-name) group) ! (gnus-group-next-unread-group 1)) ! (when quit-config ! (if (not (buffer-name (car quit-config))) ! (gnus-configure-windows 'group 'force) ! (set-buffer (car quit-config)) ! (when (eq major-mode 'gnus-summary-mode) ! (gnus-set-global-variables)) ! (gnus-configure-windows (cdr quit-config))))))) ;; Suggested by Andrew Eskilsson . (defun gnus-summary-fetch-faq (&optional faq-dir) *************** *** 9640,9646 **** (< score gnus-summary-mark-below)) (setq gnus-newsgroup-unreads (delq number gnus-newsgroup-unreads)) ! (push (cons number gnus-low-score-mark) gnus-newsgroup-reads)) t)) ;; Nope, invisible article. 0 --- 9694,9703 ---- (< score gnus-summary-mark-below)) (setq gnus-newsgroup-unreads (delq number gnus-newsgroup-unreads)) ! (if gnus-newsgroup-auto-expire ! (push number gnus-newsgroup-expirable) ! (push (cons number gnus-low-score-mark) ! gnus-newsgroup-reads))) t)) ;; Nope, invisible article. 0 *************** *** 10317,10329 **** (gnus-list-of-read-articles gnus-newsgroup-name) (setq gnus-newsgroup-expirable (sort gnus-newsgroup-expirable '<)))) es) (when expirable ;; There are expirable articles in this group, so we run them ;; through the expiry process. (gnus-message 6 "Expiring articles...") ;; The list of articles that weren't expired is returned. ! (setq es (gnus-request-expire-articles expirable gnus-newsgroup-name)) (or total (setq gnus-newsgroup-expirable es)) ;; We go through the old list of expirable, and mark all ;; really expired articles as non-existant. --- 10374,10393 ---- (gnus-list-of-read-articles gnus-newsgroup-name) (setq gnus-newsgroup-expirable (sort gnus-newsgroup-expirable '<)))) + (expiry-wait (gnus-group-get-parameter 'expiry-wait)) es) (when expirable ;; There are expirable articles in this group, so we run them ;; through the expiry process. (gnus-message 6 "Expiring articles...") ;; The list of articles that weren't expired is returned. ! (if expiry-wait ! (let ((nnmail-expiry-wait-function nil) ! (nnmail-expiry-wait expiry-wait)) ! (setq es (gnus-request-expire-articles ! expirable gnus-newsgroup-name))) ! (setq es (gnus-request-expire-articles ! expirable gnus-newsgroup-name))) (or total (setq gnus-newsgroup-expirable es)) ;; We go through the old list of expirable, and mark all ;; really expired articles as non-existant. *************** *** 10347,10353 **** (gnus-y-or-n-p "Are you really, really, really sure you want to expunge? ") (error "Phew!")) ! (let ((nnmail-expiry-wait -1) (nnmail-expiry-wait-function nil)) (gnus-summary-expire-articles))) --- 10411,10417 ---- (gnus-y-or-n-p "Are you really, really, really sure you want to expunge? ") (error "Phew!")) ! (let ((nnmail-expiry-wait 'immediate) (nnmail-expiry-wait-function nil)) (gnus-summary-expire-articles))) *************** *** 10675,10681 **** (defun gnus-summary-set-process-mark (article) "Set the process mark on ARTICLE and update the summary line." ! (setq gnus-newsgroup-processable (cons article gnus-newsgroup-processable)) (let ((buffer-read-only nil)) (if (gnus-summary-goto-subject article) (progn --- 10739,10747 ---- (defun gnus-summary-set-process-mark (article) "Set the process mark on ARTICLE and update the summary line." ! (setq gnus-newsgroup-processable ! (cons article ! (delq article gnus-newsgroup-processable))) (let ((buffer-read-only nil)) (if (gnus-summary-goto-subject article) (progn *************** *** 11364,11374 **** (cons (lambda () (let* ((header (gnus-summary-article-header)) ! (extract (funcall ! gnus-extract-address-components ! (mail-header-from header)))) ! (concat (or (car extract) (cdr extract)) ! "\r" (mail-header-subject header)))) 'gnus-thread-sort-by-author) reverse)) --- 11430,11442 ---- (cons (lambda () (let* ((header (gnus-summary-article-header)) ! extract) ! (if (not (vectorp header)) ! "" ! (setq extract (funcall gnus-extract-address-components ! (mail-header-from header))) ! (concat (or (car extract) (cdr extract)) ! "\r" (mail-header-subject header))))) 'gnus-thread-sort-by-author) reverse)) *************** *** 11382,11393 **** (cons (lambda () (let* ((header (gnus-summary-article-header)) ! (extract (funcall ! gnus-extract-address-components ! (mail-header-from header)))) ! (concat ! (downcase (gnus-simplify-subject (gnus-summary-article-subject) t)) ! "\r" (or (car extract) (cdr extract))))) 'gnus-thread-sort-by-subject) reverse)) --- 11450,11463 ---- (cons (lambda () (let* ((header (gnus-summary-article-header)) ! extract) ! (if (not (vectorp header)) ! "" ! (setq extract (funcall gnus-extract-address-components ! (mail-header-from header))) ! (concat ! (downcase (gnus-simplify-subject (gnus-summary-article-subject) t)) ! "\r" (or (car extract) (cdr extract)))))) 'gnus-thread-sort-by-subject) reverse)) *************** *** 11660,11666 **** (widen) (if (and (file-readable-p filename) (mail-file-babyl-p filename)) (gnus-output-to-rmail filename) ! (rmail-output filename 1 t t))))) ;; Remember the directory name to save articles. (setq gnus-newsgroup-last-mail filename))) --- 11730,11737 ---- (widen) (if (and (file-readable-p filename) (mail-file-babyl-p filename)) (gnus-output-to-rmail filename) ! (let ((mail-use-rfc822 t)) ! (rmail-output filename 1 t t)))))) ;; Remember the directory name to save articles. (setq gnus-newsgroup-last-mail filename))) *************** *** 11940,11950 **** (gnus-visual-p 'article-menu 'menu)) (gnus-article-make-menu-bar)) (kill-all-local-variables) ! (setq mode-line-modified "-- ") ! (make-local-variable 'mode-line-format) ! (setq mode-line-format (copy-sequence mode-line-format)) ! (and (equal (nth 3 mode-line-format) " ") ! (setcar (nthcdr 3 mode-line-format) "")) (setq mode-name "Article") (setq major-mode 'gnus-article-mode) (make-local-variable 'minor-mode-alist) --- 12011,12017 ---- (gnus-visual-p 'article-menu 'menu)) (gnus-article-make-menu-bar)) (kill-all-local-variables) ! (gnus-simplify-mode-line) (setq mode-name "Article") (setq major-mode 'gnus-article-mode) (make-local-variable 'minor-mode-alist) *************** *** 11991,11996 **** --- 12058,12072 ---- (forward-line line) (point))))) + (defun gnus-kill-all-overlays () + "Delete all overlays in the current buffer." + (when (fboundp 'overlay-lists) + (let* ((overlayss (overlay-lists)) + (buffer-read-only nil) + (overlays (nconc (car overlayss) (cdr overlayss)))) + (while overlays + (delete-overlay (pop overlays)))))) + (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." (prog1 *************** *** 12066,12079 **** (and (stringp article) gnus-refer-article-method)) (buffer-read-only nil)) (erase-buffer) ! ;; There may be some overlays that we have to kill... ! (insert "i") ! (let ((overlays (and (fboundp 'overlays-at) ! (overlays-at (point-min))))) ! (while overlays ! (delete-overlay (car overlays)) ! (setq overlays (cdr overlays)))) ! (erase-buffer) (if (gnus-request-article article group (current-buffer)) (progn (and gnus-keep-backlog --- 12142,12148 ---- (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 *************** *** 12085,12097 **** (setq gnus-original-article (cons group article)) (let (buffer-read-only) (erase-buffer) ! ;; There may be some overlays that we have to kill... ! (insert "i") ! (let ((overlays (and (fboundp 'overlays-at) ! (overlays-at (point-min))))) ! (while overlays ! (delete-overlay (pop overlays)))) ! (erase-buffer) (insert-buffer-substring gnus-original-article-buffer)))) (defun gnus-read-header (id) --- 12154,12160 ---- (setq gnus-original-article (cons group article)) (let (buffer-read-only) (erase-buffer) ! (gnus-kill-all-overlays) (insert-buffer-substring gnus-original-article-buffer)))) (defun gnus-read-header (id) *************** *** 12229,12234 **** --- 12292,12299 ---- (gnus-summary-article-header gnus-current-article) gnus-article-current (cons gnus-newsgroup-name gnus-current-article)) + (unless (vectorp gnus-current-headers) + (setq gnus-current-headers nil)) (gnus-summary-show-thread) (run-hooks 'gnus-mark-article-hook) (gnus-set-mode-line 'summary) *************** *** 12527,12537 **** ;; if there is no end to the signature? (point-max)) gnus-hidden-properties)) (when (and beg end) (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward "^- " nil t) ! (replace-match "" t t)) (widen))))) (defvar gnus-article-time-units --- 12592,12604 ---- ;; if there is no end to the signature? (point-max)) gnus-hidden-properties)) + ;; Hide "- " PGP quotation markers. (when (and beg end) (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward "^- " nil t) ! (add-text-properties (match-beginning 0) (match-end 0) ! gnus-hidden-properties)) (widen))))) (defvar gnus-article-time-units *************** *** 13258,13263 **** --- 13325,13338 ---- "Request active information on GROUPS from METHOD." (funcall (gnus-get-function method 'retrieve-groups) groups (nth 1 method))) + (defun gnus-request-type (group &optional article) + "Return the type (`post' or `mail') of GROUP (and ARTICLE)." + (let ((method (gnus-find-method-for-group group))) + (if (not (gnus-check-backend-function 'request-type method)) + 'unknown + (funcall (gnus-get-function method 'request-type) + (gnus-group-real-name group) article)))) + (defun gnus-request-article (article group &optional buffer) "Request the ARTICLE in GROUP. ARTICLE can either be an article number or an article Message-ID. *************** *** 13362,13368 **** (defun gnus-member-of-valid (symbol group) "Find out if GROUP has SYMBOL as part of its \"valid\" spec." (memq symbol (assoc ! (format "%s" (car (gnus-find-method-for-group group))) gnus-valid-select-methods))) (defun gnus-method-option-p (method option) --- 13437,13443 ---- (defun gnus-member-of-valid (symbol group) "Find out if GROUP has SYMBOL as part of its \"valid\" spec." (memq symbol (assoc ! (symbol-name (car (gnus-find-method-for-group group))) gnus-valid-select-methods))) (defun gnus-method-option-p (method option) *************** *** 13370,13376 **** (memq 'post (assoc (format "%s" (car method)) gnus-valid-select-methods))) - (defmacro gnus-server-equal (ss1 ss2) "Say whether two servers are equal." `(let ((s1 ,ss1) --- 13445,13450 ---- *************** *** 13493,13498 **** --- 13567,13576 ---- (or gnus-active-hashtb (setq gnus-active-hashtb (make-vector 4095 0))) + ;; Initialize the cache. + (when gnus-use-cache + (gnus-cache-open)) + ;; Possibly eval the dribble file. (and init (or gnus-use-dribble-file gnus-slave) (gnus-dribble-eval-file)) *************** *** 13500,13506 **** ;; Find new newsgroups and treat them. (if (and init gnus-check-new-newsgroups gnus-read-active-file (not level) ! (gnus-server-opened gnus-select-method)) (gnus-find-new-newsgroups)) ;; Find the number of unread articles in each non-dead group. --- 13578,13584 ---- ;; Find new newsgroups and treat them. (if (and init gnus-check-new-newsgroups gnus-read-active-file (not level) ! (gnus-check-server gnus-select-method)) (gnus-find-new-newsgroups)) ;; Find the number of unread articles in each non-dead group. *************** *** 14218,14224 **** (setq methods (cdr methods)))))) ;; Read an active file and place the results in `gnus-active-hashtb'. ! (defun gnus-active-to-gnus-format (method &optional hashtb ignore-errors) (let ((cur (current-buffer)) (hashtb (or hashtb (if (and gnus-active-hashtb --- 14296,14304 ---- (setq methods (cdr methods)))))) ;; Read an active file and place the results in `gnus-active-hashtb'. ! (defun gnus-active-to-gnus-format (&optional method hashtb ignore-errors) ! (unless method ! (setq method gnus-select-method)) (let ((cur (current-buffer)) (hashtb (or hashtb (if (and gnus-active-hashtb *************** *** 14820,14826 **** ;; Don't write foreign groups to .newsrc. (progn (insert (gnus-info-group info) ! (if (> (nth 1 info) gnus-level-subscribed) "!" ":")) (if (setq ranges (gnus-info-read info)) (progn --- 14900,14906 ---- ;; Don't write foreign groups to .newsrc. (progn (insert (gnus-info-group info) ! (if (> (gnus-info-level info) gnus-level-subscribed) "!" ":")) (if (setq ranges (gnus-info-read info)) (progn *** pub/sgnus/lisp/nnbabyl.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnbabyl.el Fri Dec 8 13:15:36 1995 *************** *** 274,283 **** (defun nnbabyl-request-expire-articles (articles newsgroup &optional server force) (nnbabyl-possibly-change-newsgroup newsgroup) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function newsgroup)) ! nnmail-expiry-wait)) ! (is-old t) rest) (nnmail-activate 'nnbabyl) --- 274,280 ---- (defun nnbabyl-request-expire-articles (articles newsgroup &optional server force) (nnbabyl-possibly-change-newsgroup newsgroup) ! (let* ((is-old t) rest) (nnmail-activate 'nnbabyl) *************** *** 287,299 **** (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnbabyl-article-string (car articles)) nil t) ! (if (or force ! (setq is-old ! (> (nnmail-days-between ! (current-time-string) ! (buffer-substring ! (point) (progn (end-of-line) (point)))) ! days))) (progn (and gnus-verbose-backends (message "Deleting article %d in %s..." --- 284,294 ---- (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnbabyl-article-string (car articles)) nil t) ! (if (setq is-old ! (nnmail-expired-article-p ! newsgroup ! (buffer-substring ! (point) (progn (end-of-line) (point))) force)) (progn (and gnus-verbose-backends (message "Deleting article %d in %s..." *** pub/sgnus/lisp/nndoc.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nndoc.el Wed Dec 6 04:02:48 1995 *************** *** 56,62 **** "^-+ Start of forwarded message -+\n+" "^-+ End of forwarded message -+\n" nil "^ ?$" nil nil nil) ! (mmfd "^\^A\^A\^A\^A\n" "^\^A\^A\^A\^A\n" nil "^$" nil nil nil)) "Regular expressions for articles of the various types. --- 56,62 ---- "^-+ Start of forwarded message -+\n+" "^-+ End of forwarded message -+\n" nil "^ ?$" nil nil nil) ! (mmdf "^\^A\^A\^A\^A\n" "^\^A\^A\^A\^A\n" nil "^$" nil nil nil)) "Regular expressions for articles of the various types. *************** *** 407,419 **** (defun nndoc-guess-doc-type () "Guess what document type is in the current buffer. ! Returns one of `babyl', `mbox', `digest', `forward', `mmfd' or nil." (goto-char (point-min)) (cond ((looking-at rmail-unix-mail-delimiter) 'mbox) ((looking-at "\^A\^A\^A\^A$") ! 'mmfd) ((and (re-search-forward "^-+ Start of forwarded message -+\n+" nil t) (not (re-search-forward "^Subject:.*digest" nil t))) 'forward) --- 407,419 ---- (defun nndoc-guess-doc-type () "Guess what document type is in the current buffer. ! Returns one of `babyl', `mbox', `digest', `forward', `mmdf' or nil." (goto-char (point-min)) (cond ((looking-at rmail-unix-mail-delimiter) 'mbox) ((looking-at "\^A\^A\^A\^A$") ! 'mmdf) ((and (re-search-forward "^-+ Start of forwarded message -+\n+" nil t) (not (re-search-forward "^Subject:.*digest" nil t))) 'forward) *** pub/sgnus/lisp/nnfolder.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnfolder.el Fri Dec 8 13:15:31 1995 *************** *** 315,324 **** (defun nnfolder-request-expire-articles (articles newsgroup &optional server force) (nnfolder-possibly-change-group newsgroup) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function newsgroup)) ! nnmail-expiry-wait)) ! (is-old t) rest) (nnmail-activate 'nnfolder) --- 315,321 ---- (defun nnfolder-request-expire-articles (articles newsgroup &optional server force) (nnfolder-possibly-change-group newsgroup) ! (let* ((is-old t) rest) (nnmail-activate 'nnfolder) *************** *** 327,339 **** (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnfolder-article-string (car articles)) nil t) ! (if (or force ! (setq is-old ! (> (nnmail-days-between ! (current-time-string) ! (buffer-substring ! (point) (progn (end-of-line) (point)))) ! days))) (progn (and gnus-verbose-backends (message "Deleting article %d..." --- 324,334 ---- (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnfolder-article-string (car articles)) nil t) ! (if (setq is-old ! (nnmail-expired-article-p ! newsgroup ! (buffer-substring ! (point) (progn (end-of-line) (point))) force)) (progn (and gnus-verbose-backends (message "Deleting article %d..." *** pub/sgnus/lisp/nnkiboze.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnkiboze.el Sat Dec 9 10:11:11 1995 *************** *** 156,162 **** () (save-excursion (let ((unreads gnus-newsgroup-unreads) ! (unselected gnus-newsgroup-unselected)) (set-buffer (get-buffer-create "*nnkiboze work*")) (buffer-disable-undo (current-buffer)) (erase-buffer) --- 156,163 ---- () (save-excursion (let ((unreads gnus-newsgroup-unreads) ! (unselected gnus-newsgroup-unselected) ! (version-control 'never)) (set-buffer (get-buffer-create "*nnkiboze work*")) (buffer-disable-undo (current-buffer)) (erase-buffer) *************** *** 233,238 **** --- 234,240 ---- (regexp (nth 1 (nth 4 info))) (gnus-expert-user t) (gnus-large-newsgroup nil) + (version-control 'never) (gnus-score-find-score-files-function 'nnkiboze-score-file) gnus-select-group-hook gnus-summary-prepare-hook gnus-thread-sort-functions gnus-show-threads *** pub/sgnus/lisp/nnmail.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnmail.el Fri Dec 8 14:16:14 1995 *************** *** 75,88 **** \"mail/misc/\".") (defvar nnmail-expiry-wait 7 ! "*Articles that are older than `nnmail-expiry-wait' days will be expired.") (defvar nnmail-expiry-wait-function nil "*Variable that holds function to specify how old articles should be before they are expired. The function will be called with the name of the group that the expiry is to be performed in, and it should return an integer that says how many days an article can be stored before it is considered ! 'old'. Eg.: --- 75,91 ---- \"mail/misc/\".") (defvar nnmail-expiry-wait 7 ! "*Expirable articles that are older than this will be expired. ! This variable can either be a number (which will be interpreted as a ! number of days) -- this doesn't have to be an integer. This variable ! can also be `immediate' and `never'.") (defvar nnmail-expiry-wait-function nil "*Variable that holds function to specify how old articles should be before they are expired. The function will be called with the name of the group that the expiry is to be performed in, and it should return an integer that says how many days an article can be stored before it is considered ! \"old\". It can also return the values `never' and `immediate'. Eg.: *************** *** 90,95 **** --- 93,99 ---- (lambda (newsgroup) (cond ((string-match \"private\" newsgroup) 31) ((string-match \"junk\" newsgroup) 1) + ((string-match \"important\" 'never)) (t 7))))") (defvar nnmail-spool-file *************** *** 234,239 **** --- 238,245 ---- (defvar nnmail-delete-duplicates nil "*If non-nil, nnmail will delete any duplicate mails it sees.") + ;;; Internal variables. + (defconst nnmail-version "nnmail 1.0" *************** *** 274,289 **** (setq idx (1+ idx))) string)) ! (defun nnmail-days-between (date1 date2) ! ;; Return the number of days between date1 and date2. ! (let ((d1 (mapcar (lambda (s) (and s (string-to-int s)) ) ! (timezone-parse-date date1))) ! (d2 (mapcar (lambda (s) (and s (string-to-int s)) ) ! (timezone-parse-date date2)))) ! (- (timezone-absolute-from-gregorian ! (nth 1 d1) (nth 2 d1) (car d1)) ! (timezone-absolute-from-gregorian ! (nth 1 d2) (nth 2 d2) (car d2))))) ;; Function taken from rmail.el. (defun nnmail-move-inbox (inbox) --- 280,319 ---- (setq idx (1+ idx))) string)) ! (defun nnmail-date-to-time (date) ! "Convert DATE into time." ! (let* ((d1 (timezone-parse-date date)) ! (t1 (timezone-parse-time (aref d1 3)))) ! (apply 'encode-time ! (mapcar (lambda (el) ! (and el (string-to-number el))) ! (list ! (aref t1 2) (aref t1 1) (aref t1 0) ! (aref d1 2) (aref d1 1) (aref d1 0) ! (aref d1 4)))))) ! ! (defun nnmail-time-less (t1 t2) ! "Say whether time T1 is less than time T2." ! (or (< (car t1) (car t2)) ! (and (= (car t1) (car t2)) ! (< (nth 1 t1) (nth 1 t2))))) ! ! (defun nnmail-days-to-time (days) ! "Convert DAYS into time." ! (let ((seconds (round (* days 60 60 24))) ! (rest (expt 2 16))) ! (cons (/ seconds rest) (% seconds rest)))) ! ! (defun nnmail-time-since (time) ! "Return the time since DATE." ! (let* ((current (current-time)) ! rest) ! (when (stringp time) ! (setq time (nnmail-date-to-time time))) ! (setq rest (if (< (nth 1 current) (nth 1 time)) (expt 2 16))) ! (setcar (cdr time) (- (+ (or rest 0) (nth 1 current)) (nth 1 time))) ! (setcar time (- (+ (car current) (if rest -1 0)) (car time))) ! time)) ;; Function taken from rmail.el. (defun nnmail-move-inbox (inbox) *************** *** 384,401 **** group-assoc)) (defun nnmail-save-active (group-assoc file-name) ! (let (group) ! (save-excursion ! (set-buffer (get-buffer-create " *nnmail active*")) ! (buffer-disable-undo (current-buffer)) ! (erase-buffer) ! (while group-assoc ! (setq group (car group-assoc)) ! (insert (format "%s %d %d y\n" (car group) (cdr (car (cdr group)) ) ! (car (car (cdr group))))) ! (setq group-assoc (cdr group-assoc))) ! (write-region 1 (point-max) (expand-file-name file-name) nil 'nomesg) ! (kill-buffer (current-buffer))))) (defun nnmail-get-split-group (file group) (if (or (eq nnmail-spool-file 'procmail) --- 414,432 ---- group-assoc)) (defun nnmail-save-active (group-assoc file-name) ! "Save GROUP-ASSOC in ACTIVE-FILE." ! (when file-name ! (let (group) ! (save-excursion ! (set-buffer (get-buffer-create " *nnmail active*")) ! (buffer-disable-undo (current-buffer)) ! (erase-buffer) ! (while group-assoc ! (setq group (pop group-assoc)) ! (insert (format "%s %d %d y\n" (car group) (cdr (car (cdr group)) ) ! (car (car (cdr group)))))) ! (write-region 1 (point-max) (expand-file-name file-name) nil 'nomesg) ! (kill-buffer (current-buffer)))))) (defun nnmail-get-split-group (file group) (if (or (eq nnmail-spool-file 'procmail) *************** *** 481,487 **** (if (not (and (re-search-forward delim nil t) (goto-char (match-beginning 0)))) ;; Possibly wrong format? ! () ;; Carry on until the bitter end. (while (not (eobp)) (setq start (point) --- 512,518 ---- (if (not (and (re-search-forward delim nil t) (goto-char (match-beginning 0)))) ;; Possibly wrong format? ! (error "Error, unknown mail format! (Possibly corrupted.)") ;; Carry on until the bitter end. (while (not (eobp)) (setq start (point) *************** *** 548,561 **** (setq end (point-max)))) (goto-char end))))) ! (defun nnmail-process-mmfd-mail-format (func) (let ((delim "^\^A\^A\^A\^A$") start message-id end) (goto-char (point-min)) (if (not (and (re-search-forward delim nil t) (forward-line 1))) ;; Possibly wrong format? ! () ;; Carry on until the bitter end. (while (not (eobp)) (setq start (point)) --- 579,592 ---- (setq end (point-max)))) (goto-char end))))) ! (defun nnmail-process-mmdf-mail-format (func) (let ((delim "^\^A\^A\^A\^A$") start message-id end) (goto-char (point-min)) (if (not (and (re-search-forward delim nil t) (forward-line 1))) ;; Possibly wrong format? ! (error "Error, unknown mail format! (Possibly corrupted.)") ;; Carry on until the bitter end. (while (not (eobp)) (setq start (point)) *************** *** 594,600 **** (nnmail-cache-insert message-id) (funcall func)) (setq end (point-max)))) ! (goto-char end))))) (defun nnmail-split-incoming (incoming func &optional exit-func group) "Go through the entire INCOMING file and pick out each individual mail. --- 625,632 ---- (nnmail-cache-insert message-id) (funcall func)) (setq end (point-max)))) ! (goto-char end) ! (forward-line 2))))) (defun nnmail-split-incoming (incoming func &optional exit-func group) "Go through the entire INCOMING file and pick out each individual mail. *************** *** 618,630 **** (insert-file-contents incoming) (goto-char (point-min)) (save-excursion (run-hooks 'nnmail-prepare-incoming-hook)) ! ;; Handle both babyl, MMFD and unix mail formats, since movemail will ;; use the former when fetching from a mailbox, the latter when ;; fetches from a file. (cond ((looking-at "\^L") (nnmail-process-babyl-mail-format func)) ((looking-at "\^A\^A\^A\^A") ! (nnmail-process-mmfd-mail-format func)) (t (nnmail-process-unix-mail-format func))) ;; Close the message-id cache. --- 650,662 ---- (insert-file-contents incoming) (goto-char (point-min)) (save-excursion (run-hooks 'nnmail-prepare-incoming-hook)) ! ;; Handle both babyl, MMDF and unix mail formats, since movemail will ;; use the former when fetching from a mailbox, the latter when ;; fetches from a file. (cond ((looking-at "\^L") (nnmail-process-babyl-mail-format func)) ((looking-at "\^A\^A\^A\^A") ! (nnmail-process-mmdf-mail-format func)) (t (nnmail-process-unix-mail-format func))) ;; Close the message-id cache. *************** *** 804,813 **** nnmail-procmail-suffix "$") t))) (p procmails) (crash (when (and (file-exists-p nnmail-crash-box) ! (> (nth 7 (file-attributes nnmail-crash-box)) 0)) (list nnmail-crash-box)))) ;; Remove any directories that inadvertantly match the procmail ! ;; suffix, which might happen if the suffix is "". (while p (and (or (file-directory-p (car p)) (file-symlink-p (car p))) --- 836,847 ---- nnmail-procmail-suffix "$") t))) (p procmails) (crash (when (and (file-exists-p nnmail-crash-box) ! (> (nth 7 (file-attributes ! (file-truename nnmail-crash-box))) 0)) (list nnmail-crash-box)))) ;; Remove any directories that inadvertantly match the procmail ! ;; suffix, which might happen if the suffix is "". We also ! ;; ditch symlinks. (while p (and (or (file-directory-p (car p)) (file-symlink-p (car p))) *************** *** 964,970 **** ;; existance of POPped mail. (when (or (string-match "^po:" spool) (and (file-exists-p spool) ! (> (nth 7 (file-attributes spool)) 0))) (when gnus-verbose-backends (message "%s: Reading incoming mail..." method)) (when (and (nnmail-move-inbox spool) --- 998,1004 ---- ;; existance of POPped mail. (when (or (string-match "^po:" spool) (and (file-exists-p spool) ! (> (nth 7 (file-attributes (file-truename spool))) 0))) (when gnus-verbose-backends (message "%s: Reading incoming mail..." method)) (when (and (nnmail-move-inbox spool) *************** *** 1005,1010 **** --- 1039,1065 ---- (file-writable-p incoming) (delete-file incoming)))))) + (defun nnmail-expired-article-p (group time force) + "Say whether an article that is TIME old in GROUP should be expired." + (if force + t + (let ((days (or (and nnmail-expiry-wait-function + (funcall nnmail-expiry-wait-function group)) + nnmail-expiry-wait))) + (cond ((eq days 'never) + ;; This isn't an expirable group. + nil) + ((eq days 'immediate) + ;; We expire all articles on sight. + t) + ((equal time '(0 0)) + ;; This is an ange-ftp group, and we don't have any dates. + nil) + ((numberp days) + (setq days (nnmail-days-to-time days)) + ;; Compare the time with the current time. + (nnmail-time-less (nnmail-time-since time) days)))))) + (provide 'nnmail) ;;; nnmail.el ends here *** pub/sgnus/lisp/nnmbox.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnmbox.el Fri Dec 8 13:15:33 1995 *************** *** 241,250 **** (defun nnmbox-request-expire-articles (articles newsgroup &optional server force) (nnmbox-possibly-change-newsgroup newsgroup) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function newsgroup)) ! nnmail-expiry-wait)) ! (is-old t) rest) (nnmail-activate 'nnmbox) --- 241,247 ---- (defun nnmbox-request-expire-articles (articles newsgroup &optional server force) (nnmbox-possibly-change-newsgroup newsgroup) ! (let* ((is-old t) rest) (nnmail-activate 'nnmbox) *************** *** 253,265 **** (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnmbox-article-string (car articles)) nil t) ! (if (or force ! (setq is-old ! (> (nnmail-days-between ! (current-time-string) ! (buffer-substring ! (point) (progn (end-of-line) (point)))) ! days))) (progn (and gnus-verbose-backends (message "Deleting article %d in %s..." --- 250,260 ---- (while (and articles is-old) (goto-char (point-min)) (if (search-forward (nnmbox-article-string (car articles)) nil t) ! (if (setq is-old ! (nnmail-expired-article-p ! newsgroup ! (buffer-substring ! (point) (progn (end-of-line) (point))) force)) (progn (and gnus-verbose-backends (message "Deleting article %d in %s..." *** pub/sgnus/lisp/nnmh.el Tue Dec 5 06:10:59 1995 --- sgnus/lisp/nnmh.el Fri Dec 8 13:15:28 1995 *************** *** 246,255 **** (defun nnmh-request-expire-articles (articles newsgroup &optional server force) (nnmh-possibly-change-directory newsgroup) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function newsgroup)) ! nnmail-expiry-wait)) ! (active-articles (mapcar (function (lambda (name) --- 246,252 ---- (defun nnmh-request-expire-articles (articles newsgroup &optional server force) (nnmh-possibly-change-directory newsgroup) ! (let* ((active-articles (mapcar (function (lambda (name) *************** *** 265,277 **** (int-to-string (car articles)))) (if (setq mod-time (nth 5 (file-attributes article))) (if (and (nnmh-deletable-article-p newsgroup (car articles)) ! (or force ! (and (not (equal mod-time '(0 0))) ! (setq is-old ! (> (nnmail-days-between ! (current-time-string) ! (current-time-string mod-time)) ! days))))) (progn (and gnus-verbose-backends (message "Deleting article %s in %s..." --- 262,269 ---- (int-to-string (car articles)))) (if (setq mod-time (nth 5 (file-attributes article))) (if (and (nnmh-deletable-article-p newsgroup (car articles)) ! (setq is-old ! (nnmail-expired-article-p newsgroup mod-time force))) (progn (and gnus-verbose-backends (message "Deleting article %s in %s..." *** pub/sgnus/lisp/nnml.el Tue Dec 5 06:11:00 1995 --- sgnus/lisp/nnml.el Fri Dec 8 13:15:26 1995 *************** *** 260,269 **** (defun nnml-request-expire-articles (articles newsgroup &optional server force) (nnml-possibly-change-directory newsgroup) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function newsgroup)) ! nnmail-expiry-wait)) ! (active-articles (mapcar (function (lambda (name) --- 260,266 ---- (defun nnml-request-expire-articles (articles newsgroup &optional server force) (nnml-possibly-change-directory newsgroup) ! (let* ((active-articles (mapcar (function (lambda (name) *************** *** 271,303 **** (directory-files nnml-current-directory nil "^[0-9]+$" t))) (max-article (and active-articles (apply 'max active-articles))) (is-old t) ! article rest mod-time) (nnmail-activate 'nnml) (while (and articles is-old) (setq article (concat nnml-current-directory ! (int-to-string (car articles)))) ! (if (setq mod-time (nth 5 (file-attributes article))) ! (if (and (nnml-deletable-article-p newsgroup (car articles)) ! (or force ! (and (not (equal mod-time '(0 0))) ! (setq is-old ! (> (nnmail-days-between ! (current-time-string) ! (current-time-string mod-time)) ! days))))) ! (progn ! (and gnus-verbose-backends ! (message "Deleting article %s in %s..." ! article newsgroup)) ! (condition-case () ! (funcall nnmail-delete-file-function article) ! (file-error ! (setq rest (cons (car articles) rest)))) ! (setq active-articles (delq (car articles) active-articles)) ! (nnml-nov-delete-article newsgroup (car articles))) ! (setq rest (cons (car articles) rest)))) ! (setq articles (cdr articles))) (let ((active (nth 1 (assoc newsgroup nnml-group-alist)))) (and active (setcar active (or (and active-articles --- 268,295 ---- (directory-files nnml-current-directory nil "^[0-9]+$" t))) (max-article (and active-articles (apply 'max active-articles))) (is-old t) ! article rest mod-time number) (nnmail-activate 'nnml) (while (and articles is-old) (setq article (concat nnml-current-directory ! (int-to-string ! (setq number (pop articles))))) ! (when (setq mod-time (nth 5 (file-attributes article))) ! (if (and (nnml-deletable-article-p newsgroup number) ! (setq is-old ! (nnmail-expired-article-p newsgroup mod-time force))) ! (progn ! (and gnus-verbose-backends ! (message "Deleting article %s in %s..." ! article newsgroup)) ! (condition-case () ! (funcall nnmail-delete-file-function article) ! (file-error ! (push number rest))) ! (setq active-articles (delq number active-articles)) ! (nnml-nov-delete-article newsgroup number)) ! (push number rest)))) (let ((active (nth 1 (assoc newsgroup nnml-group-alist)))) (and active (setcar active (or (and active-articles *** pub/sgnus/lisp/nnsoup.el Tue Dec 5 06:11:00 1995 --- sgnus/lisp/nnsoup.el Sat Dec 9 03:24:46 1995 *************** *** 253,258 **** --- 253,270 ---- (max (1+ (- max min)) 0) min max group))))) t) + (defun nnsoup-request-type (group &optional article) + (nnsoup-possibly-change-group group) + (if (not article) + 'unknown + (let ((kind (gnus-soup-encoding-kind + (gnus-soup-area-encoding + (nth 1 (nnsoup-article-to-area + article nnsoup-current-group)))))) + (cond ((= kind ?m) 'mail) + ((= kind ?n) 'news) + (t 'unknown))))) + (defun nnsoup-close-group (group &optional server) ;; Kill all nnsoup buffers. (let ((buffers nnsoup-buffers) *************** *** 300,309 **** (defun nnsoup-request-expire-articles (articles group &optional server force) (nnsoup-possibly-change-group group) ! (let* ((days (or (and nnmail-expiry-wait-function ! (funcall nnmail-expiry-wait-function group)) ! nnmail-expiry-wait)) ! (total-infolist (assoc group nnsoup-group-alist)) (infolist (cdr total-infolist)) info range-list mod-time prefix) (while infolist --- 312,318 ---- (defun nnsoup-request-expire-articles (articles group &optional server force) (nnsoup-possibly-change-group group) ! (let* ((total-infolist (assoc group nnsoup-group-alist)) (infolist (cdr total-infolist)) info range-list mod-time prefix) (while infolist *************** *** 312,327 **** prefix (gnus-soup-area-prefix (nth 1 info))) (when ;; All the articles in this file are marked for expiry. (and (gnus-sublist-p articles range-list) ! ;; This file is old enough. We have to check for ! ;; `(0 0)', since that's what ange-ftp files reply with. ! (or force ! (and (not (equal ! (setq mod-time (nth 5 (nnsoup-file prefix))) ! '(0 0))) ! (> (nnmail-days-between ! (current-time-string) ! (current-time-string mod-time)) ! days)))) ;; Ok, we delete this file. (when (condition-case nil (and --- 321,329 ---- prefix (gnus-soup-area-prefix (nth 1 info))) (when ;; All the articles in this file are marked for expiry. (and (gnus-sublist-p articles range-list) ! ;; This file is old enough. ! (setq mod-time (nth 5 (nnsoup-file prefix))) ! (nnmail-expired-article-p group mod-time force)) ;; Ok, we delete this file. (when (condition-case nil (and *************** *** 585,594 **** (goto-char (1+ delimline)) (if (eval mail-mailer-swallows-blank-line) (newline))) ! (gnus-soup-store ! nnsoup-replies-directory ! (nnsoup-kind-to-prefix kind) nil nnsoup-replies-format-type ! nnsoup-replies-index-type) (kill-buffer tembuf)))) (defun nnsoup-kind-to-prefix (kind) --- 587,605 ---- (goto-char (1+ delimline)) (if (eval mail-mailer-swallows-blank-line) (newline))) ! (let ((msg-buf ! (gnus-soup-store ! nnsoup-replies-directory ! (nnsoup-kind-to-prefix kind) nil nnsoup-replies-format-type ! nnsoup-replies-index-type)) ! (num 0)) ! (when (and msg-buf (bufferp msg-buf)) ! (save-excursion ! (set-buffer msg-buf) ! (goto-char (point-min)) ! (while (re-search-forward "^#! *rnews" nil t) ! (incf num))) ! (message "Stored %d messages" num))) (kill-buffer tembuf)))) (defun nnsoup-kind-to-prefix (kind) *** pub/sgnus/lisp/nnspool.el Tue Dec 5 06:11:00 1995 --- sgnus/lisp/nnspool.el Thu Dec 7 03:29:18 1995 *************** *** 404,410 **** (prev (point-min)) num found) (if (or (eobp) ! (>= (read cur) article)) (beginning-of-line) (while (not found) (goto-char (/ (+ max min) 2)) --- 404,410 ---- (prev (point-min)) num found) (if (or (eobp) ! (>= (setq num (read cur)) article)) (beginning-of-line) (while (not found) (goto-char (/ (+ max min) 2)) *************** *** 419,426 **** (setq min (point))) (t (setq found t)))) ! (beginning-of-line)) ! (or (not num) (= num article))))) (defun nnspool-sift-nov-with-sed (articles file) --- 419,426 ---- (setq min (point))) (t (setq found t)))) ! (beginning-of-line))) ! (or (not num) (= num article)))) (defun nnspool-sift-nov-with-sed (articles file) *** pub/sgnus/lisp/nntp.el Tue Dec 5 06:11:00 1995 --- sgnus/lisp/nntp.el Sat Dec 9 10:15:19 1995 *************** *** 336,342 **** (progn (forward-line 1) (point)))) 'active)))) ! (defun nntp-open-server (server &optional defs) (nnheader-init-server-buffer) (if (nntp-server-opened server) t --- 336,345 ---- (progn (forward-line 1) (point)))) 'active)))) ! (defun nntp-open-server (server &optional defs connectionless) ! "Open the virtual server SERVER. ! If CONNECTIONLESS is non-nil, don't attempt to connect to any physical ! servers." (nnheader-init-server-buffer) (if (nntp-server-opened server) t *************** *** 359,371 **** (nnheader-set-init-variables nntp-server-variables defs))) (setq nntp-current-server server) (or (nntp-server-opened server) (progn (run-hooks 'nntp-prepare-server-hook) (nntp-open-server-semi-internal nntp-address nntp-port-number))))) (defun nntp-close-server (&optional server) "Close connection to SERVER." ! (nntp-possibly-change-server nil server) (unwind-protect (progn ;; Un-set default sentinel function before closing connection. --- 362,375 ---- (nnheader-set-init-variables nntp-server-variables defs))) (setq nntp-current-server server) (or (nntp-server-opened server) + connectionless (progn (run-hooks 'nntp-prepare-server-hook) (nntp-open-server-semi-internal nntp-address nntp-port-number))))) (defun nntp-close-server (&optional server) "Close connection to SERVER." ! (nntp-possibly-change-server nil server t) (unwind-protect (progn ;; Un-set default sentinel function before closing connection. *************** *** 1148,1163 **** (setq list (cdr list))) (car list)) ! (defun nntp-possibly-change-server (group server) ! ;; We see whether it is necessary to change the group. ! (and group ! (progn ! (not (equal group nntp-current-group)) ! (nntp-request-group group server))) ! (and server ! (or (nntp-server-opened server) ! (nntp-open-server server)))) ! (defun nntp-try-list-active (group) (nntp-list-active-group group) (save-excursion --- 1152,1168 ---- (setq list (cdr list))) (car list)) ! (defun nntp-possibly-change-server (newsgroup server &optional connectionless) ! "Check whether the virtual server needs changing." ! (if (and server ! (not (nntp-server-opened server))) ! ;; This virtual server isn't open, so we (re)open it here. ! (nntp-open-server server nil t)) ! (if (and newsgroup ! (not (equal newsgroup nntp-current-group))) ! ;; Set the proper current group. ! (nntp-request-group newsgroup server))) ! (defun nntp-try-list-active (group) (nntp-list-active-group group) (save-excursion *** pub/sgnus/lisp/nnvirtual.el Tue Dec 5 06:11:00 1995 --- sgnus/lisp/nnvirtual.el Wed Dec 6 04:02:51 1995 *************** *** 211,216 **** --- 211,222 ---- (setq nnvirtual-status-string "No component groups") (setq nnvirtual-current-group nil) nil)))) + + (defun nnvirtual-request-type (group &optional article) + (nnvirtual-possibly-change-newsgroups group nil) + (if (not article) + 'unknown + (gnus-request-type (car (nnvirtual-art-group article))))) (defun nnvirtual-close-group (group &optional server) (if (not nnvirtual-current-group) *** pub/sgnus/lisp/ChangeLog Tue Dec 5 06:11:09 1995 --- sgnus/lisp/ChangeLog Sat Dec 9 08:50:48 1995 *************** *** 1,9 **** --- 1,190 ---- + Sat Dec 9 08:50:34 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-update-marks): Chop off nils at the end of group + infos. + + Sat Dec 9 03:21:40 1995 Lars Ingebrigtsen + + * gnus-setup.el (gnus-use-bbdb): Said `gnus-use-mh' instead of + `gnus-use-mhe'. + + Fri Dec 8 07:44:35 1995 Lars Ingebrigtsen + + * nnmail.el (nnmail-expiry-wait): Can now be a floating point + number. + + * gnus.el (gnus-group-list-level): New command and keystroke. + (gnus-group-expire-articles): Use `expiry-wait' group parameter. + + * nnmail.el (gnus-expired-article-p): New function. + (nnmail-expired-article-p): New function. + (nnmail-expiry-wait): Allow `never' and `immediate' values. + + * nnbabyl.el (nnbabyl-request-expire-articles): Use it. + * nnml.el (nnml-request-expire-articles): Ditto. + * nnmh.el (nnmh-request-expire-articles): Ditto. + * nnfolder.el (nnfolder-request-expire-articles): Ditto. + * nnmbox.el (nnmbox-request-expire-articles): Ditto. + * nnsoup.el (nnsoup-request-expire-articles): Ditto. + + * gnus-msg.el (gnus-required-mail-headers): Allow Expires as a + value. + (gnus-inews-insert-headers): Use it. + (gnus-inews-expires): New function. + (gnus-article-expires): New variable. + (gnus-distribution-function): New variable. + (gnus-inews-distribution): New function. + + * gnus.el (gnus-group-edit-group-done): Allow creation of new + groups. + + * gnus-topic.el (gnus-topic-insert-topic-line): Remove excess + properties. + + * gnus-mh.el (gnus-mh-mail-setup): Let mh decide where to put + point. + + * gnus.el (gnus-summary-exit): Clear group name. + (gnus-summary-exit-no-update): Ditto. + + Tue Dec 5 21:54:39 1995 Steven L. Baur + + * gnus-setup.el: Use default installation paths, misc. cleanup + + Fri Dec 8 06:33:48 1995 Lars Ingebrigtsen + + * nnmail.el (nnmail-save-active): Don't bug out on backends that + don't have an active file. + + Wed Dec 6 08:29:04 1995 Steven L. Baur + + * gnus-msg.el (gnus-mail-reply): Defend against zmacs regions being + enabled. + + Fri Dec 8 05:20:06 1995 Jens Lautenbacher + + * gnus.el (gnus-group-unsubscribe-group): Don't update groups twice. + + Thu Dec 7 10:31:04 1995 Lars Ingebrigtsen + + * gnus-cache.el (gnus-cache-open): New function. + (gnus-cache-close): Ditto. + (gnus-cache-generate-active): New command. + (gnus-cache-update-active): New function. + (gnus-cache-write-active): Ditto. + (gnus-cache-read-active): Ditto. + + * gnus.el (gnus-kill-all-overlays): New function. + + * gnus-cache.el (gnus-cache-active-file): New variable. + + Wed Dec 6 23:08:28 1995 Lars Magne Ingebrigtsen + + * nnspool.el (nnspool-find-nov-line): Wouldn't do anything right. + + Wed Dec 6 04:25:38 1995 Lars Ingebrigtsen + + * gnus.el (gnus-update-marks): Killed articles shouldn't be + uncompressed. + (gnus-article-hide-pgp): Don't delete "- " quotes. + + * gnus-topic.el (gnus-topic-create-topic): Default to the root + topic as the parent. + + * gnus-msg.el (gnus-debug): Reverse order. + + * nnsoup.el (nnsoup-store-reply): Do more messaging. + + * gnus-soup.el (gnus-soup-store): Enter each buffer just once. + + * gnus-topic.el (gnus-topic-move-matching): Swapped interactive + args. + (gnus-topic-copy-matching): Ditto. + + * gnus.el (gnus-summary-prepare-threads): Mark low-scored as + expirable, if desired. + (gnus-summary-prepare-unthreaded): Ditto. + (gnus-summary-limit-children): Ditto. + + Wed Dec 6 04:14:28 1995 Wes Hardaker + + * gnus.el (gnus-gnus-to-newsrc-format): Would bug on on ranks. + + Tue Dec 5 15:58:01 1995 Jens Lautenbacher + + * gnus.el (gnus-build-old-threads): Will work again. + + Tue Dec 5 10:35:51 1995 David K}gedal + + * gnus-msg.el (gnus-inews-insert-headers): Use cadr of the result + from gnus-extract-address-components instead of the car. + (gnus-summary-resend-message): Do not call mail-setup, and use + fewer headers. + + Wed Dec 6 03:01:04 1995 Lars Ingebrigtsen + + * nnmail.el (nnmail-process-mmdf-mail-format): Renamed. + (nnmail-process-mmdf-mail-format): Wouldn't skip delims. + + * gnus-mh.el (gnus-summary-save-in-folder): Search `exec-path' for + "rcvstore". + + * nnvirtual.el (nnvirtual-request-type): New function. + + * gnus-msg.el (gnus-post-news): Allow correct followup and posting + in nnsoup and nnvirtual groups. + + * nnsoup.el (nnsoup-request-type): New function. + + * gnus.el (gnus-request-type): New function. + + * gnus-msg.el (gnus-news-group-p): New function. + + Wed Dec 6 02:20:13 1995 Steven L. Baur + + * gnus-setup.el: New version. + + Tue Dec 5 10:07:09 1995 Lars Ingebrigtsen + + * gnus-msg.el (gnus-mail-reply): Would sometimes try to go to + nil. + + * gnus.el (gnus-article-prepare): Nix out non-header headers. + (gnus-set-mode-line): Protect agains pseudos. + (gnus-update-marks): Always sort before compressing. + + Tue Dec 5 09:57:20 1995 Ishikawa Ichiro + + * gnus-msg.el (gnus-group-post-news): Don't bug out on empty group + buffers. + + Tue Dec 5 09:32:57 1995 Lars Ingebrigtsen + + * nnmail.el (nnmail-process-unix-mail-format): Better error + message. + + * gnus-topic.el (gnus-topic-rename): Bugged out and didn't + redisplay. + + Sun Dec 3 11:44:08 1995 Steven L. Baur + + * gnus-msg.el (gnus-inews-do-fcc): Protect call to rmail-output by + temporarily setting mail-use-rfc822 to t. + + * gnus.el (gnus-summary-save-in-mail): Ditto. + + Tue Dec 5 09:28:00 1995 Lars Ingebrigtsen + + * nnmail.el (nnmail-get-new-mail): Dereference symlinks. + Tue Dec 5 03:22:37 1995 Lars Magne Ingebrigtsen * nnbabyl.el (nnbabyl-close-server): Restore buffer mode on exit. * gnus-score.el (gnus-summary-increase-score): Simplify Xref matches. + + * gnus.el: 0.18 is released. Mon Dec 4 02:06:19 1995 Lars Ingebrigtsen *** pub/sgnus/texi/gnus.texi Tue Dec 5 06:11:13 1995 --- sgnus/texi/gnus.texi Fri Dec 8 14:14:04 1995 *************** *** 1215,1220 **** --- 1215,1222 ---- @item z A string that looks like @samp{<%s:%n>} if a foreign select method is used. + @item c + Short (collapsed) group name. @item u User defined specifier. The next character in the format string should be a letter. @sc{gnus} will call the function *************** *** 1719,1725 **** (@code{gnus-group-make-doc-group}). If you give a prefix to this command, you will be prompted for a file name and a file type. Currently supported types are @code{babyl}, @code{mbox}, @code{digest}, ! @code{mmfd}, and @code{forward}. If you run this command without a prefix, Gnus will guess at the file type. @item G DEL --- 1721,1727 ---- (@code{gnus-group-make-doc-group}). If you give a prefix to this command, you will be prompted for a file name and a file type. Currently supported types are @code{babyl}, @code{mbox}, @code{digest}, ! @code{mmdf}, and @code{forward}. If you run this command without a prefix, Gnus will guess at the file type. @item G DEL *************** *** 2161,2167 **** @code{nndoc} is a cute little thing that will let you read a single file as a newsgroup. Currently supported file types are @code{babyl} (the RMAIL file type), @code{mbox} (standard Unix mbox files), @code{digest} ! (various digests, MIME and otherwise), @code{mmfd} (the MMFD mail box format), and @code{forward} (a single forwarded mail). You can also use the special "file type" @code{guess}, which means that @code{nndoc} will try to guess what file type it is looking at. --- 2163,2169 ---- @code{nndoc} is a cute little thing that will let you read a single file as a newsgroup. Currently supported file types are @code{babyl} (the RMAIL file type), @code{mbox} (standard Unix mbox files), @code{digest} ! (various digests, MIME and otherwise), @code{mmdf} (the MMDF mail box format), and @code{forward} (a single forwarded mail). You can also use the special "file type" @code{guess}, which means that @code{nndoc} will try to guess what file type it is looking at. *************** *** 2186,2192 **** @item nndoc-article-type @vindex nndoc-article-type This should be one of @code{mbox}, @code{babyl}, @code{digest}, ! @code{mmfd}, @code{forward}, or @code{guess}. @end table --- 2188,2194 ---- @item nndoc-article-type @vindex nndoc-article-type This should be one of @code{mbox}, @code{babyl}, @code{digest}, ! @code{mmdf}, @code{forward}, or @code{guess}. @end table *************** *** 2768,2774 **** @vindex nnmail-expiry-wait The @code{nnmail-expiry-wait} variable supplies the default time an ! expirable article has to live. The default is seven days. Gnus also supplies a function that lets you fine-tune how long articles are to live, based on what group they are in. Let's say you want to --- 2770,2776 ---- @vindex nnmail-expiry-wait The @code{nnmail-expiry-wait} variable supplies the default time an ! expirable article has to live. The default is seven days. Gnus also supplies a function that lets you fine-tune how long articles are to live, based on what group they are in. Let's say you want to *************** *** 2783,2792 **** --- 2785,2804 ---- 31) ((string= group "mail.junk") 1) + ((string= group "important") + 'never) (t 6)))) @end lisp + The group names that this function is fed are "unadorned" group + names---no @samp{"nnml:"} prefixes and the like. + + The @code{nnmail-expiry-wait} variable and + @code{nnmail-expiry-wait-function} function can be either a number (not + necessarily an integer) or the symbols @code{immediate} or + @code{never}. + @vindex nnmail-keep-last-article If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never expire the final article in a mail newsgroup. This is to make life *************** *** 3075,3086 **** If the group parameter list contains an element like @code{(to-group . "some.group.name")}, all posts will be sent to that group. - @item topic - @cindex topic - If the group parameter list contains an element like @code{(topic - . "some-topic")}, the group will become a member of the topic in - question (@pxref{Group Topics}). - @item auto-expire @cindex auto-expire If this symbol is present in the group parameter list, all articles that --- 3087,3092 ---- *************** *** 3093,3098 **** --- 3099,3112 ---- expiry process, even if they are not marked as expirable. Use with caution. + @item expiry-wait + @cindex expiry-wait + If the group parameter has an element that looks like @samp{(expiry-wait + . 10)}, this value will override any @code{nnmail-expiry-wait} and + @code{nnmail-expiry-wait-functions} when expiring expirable messages. + The value can either be a number of days (not necessarily an integer) or + the symbols @code{never} or @code{immediate}. + @item @var{(variable form)} You can use the group parameters to set variables local to the group you are entering. Say you want to turn threading off in *************** *** 3145,3150 **** --- 3159,3171 ---- it lists groups of level seven or lower (i.e., just subscribed and unsubscribed groups). + @item A l + @kindex A l (Group) + @findex gnus-group-list-level + List all unread groups on a specific level + (@code{gnus-group-list-level}). If given a prefix, also list the groups + with no unread articles. + @item A k @kindex A k (Group) @findex gnus-group-list-killed *************** *** 4524,4533 **** --- 4545,4566 ---- @item Lines This optional header will be computed by Gnus. @item Message-ID + @cindex Message-ID This required header will be generated by Gnus. A unique ID will be created based on date, time, user name and system name. @item X-Newsreader + @cindex X-Newsreader This optional header will be filled out with the Gnus version numbers. + @item Expires + @vindex gnus-article-expires + @cindex Expires + This extremely optional header will be inserted according to the + @code{gnus-article-expires} variable. It is highly deprecated and + shouldn't be used unless you know what you're doing. + @item Distribution + This optional header is filled out according to the + @code{gnus-distribution-function} variable. It is a deprecated and much + misunderstood header. @end table In addition, you can enter conses into this list. The car of this cons *** pub/sgnus/texi/ChangeLog Tue Dec 5 06:11:09 1995 --- sgnus/texi/ChangeLog Fri Dec 8 14:14:05 1995 *************** *** 1,3 **** --- 1,10 ---- + Fri Dec 8 06:25:29 1995 Lars Ingebrigtsen + + * gnus.texi (Group Buffer Format): Addition. + (Expiring Old Mail Articles): Addition. + (Listing Groups): Addition. + (Group Parameters): Addition. + Mon Dec 4 05:09:28 1995 Lars Ingebrigtsen * gnus.texi (Mail): Addition.