diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/ChangeLog dgnus/lisp/ChangeLog *** pub/dgnus/lisp/ChangeLog Wed May 10 08:34:24 1995 --- dgnus/lisp/ChangeLog Sat May 13 15:00:47 1995 *************** *** 1,3 **** --- 1,64 ---- + Sat May 13 11:16:31 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-summary-refer-article): Mark fetched articles as + read. + (gnus-summary-catchup): Mark articles as expirable when they are + supposed to be. + (gnus-group-expire-articles): Allow `total-expire'. + (gnus-summary-reselect-current-group): Kill the summary buffer + before reselecting. + + * gnus-vis.el (gnus-summary-highlight-line): Would occationally + bug out. + + * gnus.el (gnus-summary-prepare-threads): Do right number of + sub-threads under adopted (etc) articles. + (gnus-read-descriptions-file): Don't barf on strange formats. + + * gnus-score.el (gnus-score-adaptive): Ignore pseudos. + (gnus-score-remove-lines-adaptive): Ditto. + + * nnml.el (nnml-get-new-mail): Handle a list of spool files. + + * gnus.el (gnus-windows-old-to-new): Translate 3.13-selects to 4.1 + symbols. + (gnus-request-article-this-buffer): Always check whether the + connection is down. + (gnus-summary-save-article): Did not init hashtb. + (gnus-matches-options-n): Reversed comparison. + (gnus-configure-windows): Use the horizontal spec. + (gnus-group-goto-unread): New variable. + (gnus-group-next-unread-group): Use it. + + * gnus-cache.el (gnus-cache-retrieve-headers): Don't barf if the + cache file doesn't exist. + + Thu May 11 12:03:10 1995 Per Abrahamsen + + * gnus.el (gnus-simplify-buffer-fuzzy): New function. + (gnus-simplify-subject-fuzzy): Use it. + + * gnus-score.el: Support fuzzy matches. + + Sat May 13 11:09:30 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-newsrc-to-gnus-format): New implementation. + + Wed May 10 08:42:21 1995 Lars Magne Ingebrigtsen + + * gnus.el (gnus-format-max-width): Don't choke on numbers. + + * nnmh.el (nnmh-request-list): Don't chase links. + + * gnus.el (gnus-parse-n-options): Would reverse the 'ignore and + strings. + (gnus-summary-remove-lines-marked-as-read): Also count + gnus-ancient-marks as a read mark. + + * nnspool.el (nnspool-inews-switches): Added the no-sig switch. + + * gnus.el (gnus-summary-sort): Don't recurse for all time. + Wed May 10 07:01:42 1995 Lars Magne Ingebrigtsen * gnus-msg.el (gnus-summary-cancel-article): Remove process marks *************** *** 10,16 **** (gnus-group-catchup-current): Advance to the next unread group. (gnus-summary-catchup): Mark articles at exit if adaptive scoring is used. ! (gnus-server-edit-server): Did not configure windows properly. Tue May 9 10:18:16 1995 Per Abrahamsen --- 71,79 ---- (gnus-group-catchup-current): Advance to the next unread group. (gnus-summary-catchup): Mark articles at exit if adaptive scoring is used. ! (gnus-server-edit-server): Did not configure windows properly. ! ! * gnus.el: 0.67 is released. Tue May 9 10:18:16 1995 Per Abrahamsen *************** *** 32,37 **** --- 95,101 ---- * gnus.el: (gnus-article-add-button): Added autoload. (gnus-article-hide-citation): Replace with autoload from `gnus-cite.el'. + Wed May 10 06:49:33 1995 Lars Magne Ingebrigtsen * gnus-vis.el: Name changes from gnus-visual-summary-* to diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-cache.el dgnus/lisp/gnus-cache.el *** pub/dgnus/lisp/gnus-cache.el Wed May 10 08:34:20 1995 --- dgnus/lisp/gnus-cache.el Sat May 13 11:35:14 1995 *************** *** 191,205 **** (defun gnus-cache-retrieve-headers (articles group) (let* ((cached (gnus-cache-articles-in-group group)) (articles (gnus-sorted-complement articles cached)) type) (let ((gnus-use-cache nil)) (setq type (gnus-retrieve-headers articles group))) (gnus-cache-save-buffers) (save-excursion ! (cond ((null type) (set-buffer nntp-server-buffer) (erase-buffer) ! (insert-file-contents (gnus-cache-file-name group ".overview")) 'nov) ((eq type 'nov) (gnus-cache-braid-nov group cached) --- 191,208 ---- (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 (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) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-mh.el dgnus/lisp/gnus-mh.el *** pub/dgnus/lisp/gnus-mh.el Wed May 10 08:34:20 1995 --- dgnus/lisp/gnus-mh.el Sat May 13 12:32:51 1995 *************** *** 81,87 **** (gnus-article-show-all-headers) ;; so colors are happy ;; lots of junk to avoid mh-send deleting other windows - (setq from (gnus-fetch-field "from") subject (let ((subject (or (gnus-fetch-field "subject") "(None)"))) --- 81,86 ---- *************** *** 105,111 **** )) ;; save excursion/restriction (mh-find-path) ! (mh-send to (or cc "") subject);; shouldn't use according to mhe ;; note - current buffer is now draft! (save-excursion --- 104,123 ---- )) ;; save excursion/restriction (mh-find-path) ! (mh-send-sub to (or cc "") (or subject "(None)") config) ;; Erik Selberg 1/23/94 ! ! (let ((draft (current-buffer)) ! mail-buf) ! (if (not yank) ! (gnus-configure-windows 'reply) ! (gnus-configure-windows 'reply-yank)) ! (setq mail-buf (cdr (assq 'mail gnus-window-to-buffer))) ! (pop-to-buffer mail-buf) ;; always in the display, so won't have window probs ! (switch-to-buffer draft) ! (kill-buffer mail-buf) ;; mh-e don't use it! ! ) ! ! ;; (mh-send to (or cc "") subject);; shouldn't use according to mhe ;; note - current buffer is now draft! (save-excursion *************** *** 147,153 **** (or (gnus-fetch-field "subject") ""))) (setq mh-show-buffer buffer) (mh-find-path) ! (mh-send to (or cc "") subject) (save-excursion (goto-char (point-max)) (insert "\n------- Forwarded Message\n\n") --- 159,173 ---- (or (gnus-fetch-field "subject") ""))) (setq mh-show-buffer buffer) (mh-find-path) ! (mh-send-sub to (or cc "") (or subject "(None)") config) ;; Erik Selberg 1/23/94 ! (let ((draft (current-buffer)) ! mail-buf) ! (gnus-configure-windows 'reply-yank) ! (setq mail-buf (cdr (assq 'mail gnus-window-to-buffer))) ! (pop-to-buffer mail-buf) ;; always in the display, so won't have window probs ! (switch-to-buffer draft) ! (kill-buffer mail-buf) ;; mh-e don't use it! ! ) (save-excursion (goto-char (point-max)) (insert "\n------- Forwarded Message\n\n") diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-msg.el dgnus/lisp/gnus-msg.el *** pub/dgnus/lisp/gnus-msg.el Wed May 10 08:34:20 1995 --- dgnus/lisp/gnus-msg.el Sat May 13 15:00:48 1995 *************** *** 1063,1075 **** Customize the variable gnus-mail-forward-method to use another mailer." (interactive "P") (gnus-summary-select-article t) - (switch-to-buffer gnus-article-buffer) - (widen) - (bury-buffer gnus-article-buffer) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (if post ! (gnus-forward-using-post) ! (funcall gnus-mail-forward-method))) (gnus-article-hide-headers-if-wanted)) (defun gnus-summary-post-forward () --- 1063,1072 ---- Customize the variable gnus-mail-forward-method to use another mailer." (interactive "P") (gnus-summary-select-article t) (let ((gnus-newsgroup-name gnus-newsgroup-name)) (if post ! (gnus-forward-using-post gnus-article-buffer) ! (funcall gnus-mail-forward-method gnus-article-buffer))) (gnus-article-hide-headers-if-wanted)) (defun gnus-summary-post-forward () *************** *** 1222,1235 **** (cdr reply))))) (and winconf (set-window-configuration winconf)))))) ! (defun gnus-forward-make-subject () ! (concat "[" (if (memq 'mail (assoc (symbol-name ! (car (gnus-find-method-for-group ! gnus-newsgroup-name))) ! gnus-valid-select-methods)) ! (gnus-fetch-field "From") gnus-newsgroup-name) ! "] " (or (gnus-fetch-field "Subject") ""))) (defun gnus-forward-insert-buffer (buffer) (let ((beg (goto-char (point-max)))) --- 1219,1234 ---- (cdr reply))))) (and winconf (set-window-configuration winconf)))))) ! (defun gnus-forward-make-subject (buffer) ! (save-excursion ! (set-buffer buffer) ! (concat "[" (if (memq 'mail (assoc (symbol-name ! (car (gnus-find-method-for-group ! gnus-newsgroup-name))) ! gnus-valid-select-methods)) ! (gnus-fetch-field "From") gnus-newsgroup-name) ! "] " (or (gnus-fetch-field "Subject") "")))) (defun gnus-forward-insert-buffer (buffer) (let ((beg (goto-char (point-max)))) *************** *** 1245,1271 **** (point) 'invisible) (point-max)))))) ! (defun gnus-mail-forward-using-mail () "Forward the current message to another user using mail." ;; This is almost a carbon copy of rmail-forward in rmail.el. ! (let ((forward-buffer (current-buffer)) ! (subject (gnus-forward-make-subject))) ! ;; If only one window, use it for the mail buffer. Otherwise, use ! ;; another window for the mail buffer so that the Rmail buffer ! ;; remains visible and sending the mail will get back to it. ! (if (if (one-window-p t) ! (mail nil nil subject) ! (mail-other-window nil nil subject)) ! (save-excursion ! (use-local-map (copy-keymap (current-local-map))) ! (local-set-key "\C-c\C-c" 'gnus-mail-send-and-exit) ! (gnus-forward-insert-buffer forward-buffer) ! ;; You have a chance to arrange the message. ! (run-hooks 'gnus-mail-forward-hook))))) ! ! (defun gnus-forward-using-post () ! (let ((forward-buffer (current-buffer)) ! (subject (gnus-forward-make-subject))) (gnus-post-news 'post nil nil nil nil subject) (save-excursion (gnus-forward-insert-buffer forward-buffer) --- 1244,1271 ---- (point) 'invisible) (point-max)))))) ! (defun gnus-mail-forward-using-mail (&optional buffer) "Forward the current message to another user using mail." ;; This is almost a carbon copy of rmail-forward in rmail.el. ! (let* ((forward-buffer (or buffer (current-buffer))) ! (winconf (current-window-configuration)) ! (subject (gnus-forward-make-subject forward-buffer))) ! (set-buffer forward-buffer) ! (mail nil nil subject) ! (use-local-map (copy-keymap (current-local-map))) ! (local-set-key "\C-c\C-c" 'gnus-mail-send-and-exit) ! (make-local-variable 'gnus-prev-winconf) ! (setq gnus-prev-winconf winconf) ! (gnus-forward-insert-buffer forward-buffer) ! (goto-char (point-min)) ! (re-search-forward "^To: " nil t) ! (gnus-configure-windows 'mail-forward) ! ;; You have a chance to arrange the message. ! (run-hooks 'gnus-mail-forward-hook))) ! ! (defun gnus-forward-using-post (&optional buffer) ! (let* ((forward-buffer (or buffer (current-buffer))) ! (subject (gnus-forward-make-subject forward-buffer))) (gnus-post-news 'post nil nil nil nil subject) (save-excursion (gnus-forward-insert-buffer forward-buffer) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-score.el dgnus/lisp/gnus-score.el *** pub/dgnus/lisp/gnus-score.el Wed May 10 08:34:20 1995 --- dgnus/lisp/gnus-score.el Sat May 13 12:57:08 1995 *************** *** 82,87 **** --- 82,88 ---- (defvar gnus-summary-score-map nil) (defvar gnus-summary-increase-map nil) (defvar gnus-summary-inc-subject-map nil) + (defvar gnus-summary-inc-fuzzy-map nil) (defvar gnus-summary-inc-author-map nil) (defvar gnus-summary-inc-body-map nil) (defvar gnus-summary-inc-id-map nil) *************** *** 90,95 **** --- 91,97 ---- (defvar gnus-summary-inc-fol-map nil) (defvar gnus-summary-lower-map nil) (defvar gnus-summary-low-subject-map nil) + (defvar gnus-summary-low-fuzzy-map nil) (defvar gnus-summary-low-author-map nil) (defvar gnus-summary-low-body-map nil) (defvar gnus-summary-low-id-map nil) *************** *** 123,128 **** --- 125,139 ---- (define-key gnus-summary-inc-subject-map "t" 'gnus-summary-temporarily-raise-by-subject) (define-key gnus-summary-inc-subject-map "p" 'gnus-summary-raise-by-subject) + (define-prefix-command 'gnus-summary-inc-fuzzy-map) + (define-key gnus-summary-increase-map "z" gnus-summary-inc-fuzzy-map) + (define-key gnus-summary-increase-map "Z" 'gnus-summary-temporarily-raise-by-fuzzy) + (define-key gnus-summary-inc-fuzzy-map "z" 'gnus-summary-temporarily-raise-by-fuzzy) + (define-key gnus-summary-inc-fuzzy-map "Z" 'gnus-summary-raise-by-fuzzy) + (define-key gnus-summary-inc-fuzzy-map "i" 'gnus-summary-immediately-raise-by-fuzzy) + (define-key gnus-summary-inc-fuzzy-map "t" 'gnus-summary-temporarily-raise-by-fuzzy) + (define-key gnus-summary-inc-fuzzy-map "p" 'gnus-summary-raise-by-fuzzy) + (define-prefix-command 'gnus-summary-inc-author-map) (define-key gnus-summary-increase-map "a" 'gnus-summary-inc-author-map) (define-key gnus-summary-increase-map "A" 'gnus-summary-temporarily-raise-by-author) *************** *** 194,199 **** --- 205,219 ---- (define-key gnus-summary-low-subject-map "t" 'gnus-summary-temporarily-lower-by-subject) (define-key gnus-summary-low-subject-map "p" 'gnus-summary-lower-by-subject) + (define-prefix-command 'gnus-summary-low-fuzzy-map) + (define-key gnus-summary-lower-map "z" 'gnus-summary-low-fuzzy-map) + (define-key gnus-summary-lower-map "Z" 'gnus-summary-temporarily-lower-by-fuzzy) + (define-key gnus-summary-low-fuzzy-map "z" 'gnus-summary-temporarily-lower-by-fuzzy) + (define-key gnus-summary-low-fuzzy-map "Z" 'gnus-summary-lower-by-fuzzy) + (define-key gnus-summary-low-fuzzy-map "i" 'gnus-summary-immediately-lower-by-fuzzy) + (define-key gnus-summary-low-fuzzy-map "t" 'gnus-summary-temporarily-lower-by-fuzzy) + (define-key gnus-summary-low-fuzzy-map "p" 'gnus-summary-lower-by-fuzzy) + (define-prefix-command 'gnus-summary-low-body-map) (define-key gnus-summary-lower-map "b" 'gnus-summary-low-body-map) (define-key gnus-summary-lower-map "B" 'gnus-summary-temporarily-lower-by-body) *************** *** 304,310 **** () (and (= score gnus-score-interactive-default-score) (setq score nil)) ! (let ((new (cond (type (list match score (and date (gnus-day-number date)) type)) (date (list match score (gnus-day-number date))) --- 324,333 ---- () (and (= score gnus-score-interactive-default-score) (setq score nil)) ! (let ((new (cond ((eq type 'f) ! (list (gnus-simplify-subject-fuzzy match) ! score (and date (gnus-day-number date)) type)) ! (type (list match score (and date (gnus-day-number date)) type)) (date (list match score (gnus-day-number date))) *************** *** 348,361 **** (or (and (stringp match) (> (length match) 0)) (error "No match")) (goto-char (point-min)) ! (let ((regexp (if type ! match ! (concat "\\`.*" (regexp-quote match) ".*\\'")))) (while (not (eobp)) (let ((content (gnus-summary-header header)) (case-fold-search t)) (and content ! (if (string-match regexp content) (gnus-summary-raise-score score)))) (beginning-of-line 2))))) --- 371,388 ---- (or (and (stringp match) (> (length match) 0)) (error "No match")) (goto-char (point-min)) ! (let ((regexp (cond ((eq type 'f) ! (gnus-simplify-subject-fuzzy match)) ! (type match) ! (t (concat "\\`.*" (regexp-quote match) ".*\\'"))))) (while (not (eobp)) (let ((content (gnus-summary-header header)) (case-fold-search t)) (and content ! (if (if (eq type 'f) ! (string-equal (gnus-simplify-subject-fuzzy content) ! regexp) ! (string-match regexp content)) (gnus-summary-raise-score score)))) (beginning-of-line 2))))) *************** *** 384,389 **** --- 411,424 ---- "subject" (gnus-simplify-subject-re (gnus-summary-header "subject")) nil (- (gnus-score-default level)) 'now t)) + (defun gnus-summary-immediately-lower-by-fuzzy (level) + "Immediately lower score by LEVEL for current fuzzy subject. + See `gnus-score-expiry-days'." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + 'f (- (gnus-score-default level)) 'now)) + (defun gnus-summary-immediately-lower-by-author (level) "Immediately lower score by LEVEL for current author. See `gnus-score-expiry-days'." *************** *** 439,444 **** --- 474,488 ---- nil (- (gnus-score-default level)) (current-time-string) t)) + (defun gnus-summary-temporarily-lower-by-fuzzy (level) + "Temporarily lower score by LEVEL for current fuzzy subject. + See `gnus-score-expiry-days'." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + 'f (- (gnus-score-default level)) + (current-time-string))) + (defun gnus-summary-temporarily-lower-by-author (level) "Temporarily lower score by LEVEL for current author. See `gnus-score-expiry-days'." *************** *** 493,498 **** --- 537,550 ---- nil (- (gnus-score-default level)) nil t)) + (defun gnus-summary-lower-by-fuzzy (level) + "Lower score by LEVEL for current fuzzy subject." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + 'f (- (gnus-score-default level)) + nil)) + (defun gnus-summary-lower-by-author (level) "Lower score by LEVEL for current author." (interactive "P") *************** *** 533,538 **** --- 585,598 ---- "subject" (gnus-simplify-subject-re (gnus-summary-header "subject")) nil level 'now t)) + (defun gnus-summary-immediately-raise-by-fuzzy (level) + "Immediately raise score by LEVEL for current fuzzy subject. + See `gnus-score-expiry-days'." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + 'f level 'now)) + (defun gnus-summary-immediately-raise-by-author (level) "Immediately raise score by LEVEL for current author. See `gnus-score-expiry-days'." *************** *** 585,590 **** --- 645,658 ---- "subject" (gnus-simplify-subject-re (gnus-summary-header "subject")) nil level (current-time-string) t)) + (defun gnus-summary-temporarily-raise-by-fuzzy (level) + "Temporarily raise score by LEVEL for current fuzzy subject. + See `gnus-score-expiry-days'." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + 'f level (current-time-string))) + (defun gnus-summary-temporarily-raise-by-author (level) "Temporarily raise score by LEVEL for current author. See `gnus-score-expiry-days'." *************** *** 634,639 **** --- 702,714 ---- "subject" (gnus-simplify-subject-re (gnus-summary-header "subject")) nil level nil t)) + (defun gnus-summary-raise-by-fuzzy (level) + "Raise score by LEVEL for current fuzzy subject." + (interactive "P") + (gnus-summary-score-entry + "subject" (gnus-summary-header "subject") + nil level nil)) + (defun gnus-summary-raise-by-author (level) "Raise score by LEVEL for current author." (interactive "P") *************** *** 1373,1387 **** (current-time-string) nil t))) ! (defun gnus-score-string (scores header now expire) ! ;; Score ARTICLES according to HEADER in SCORES. ;; Update matches entries to NOW and remove unmatched entried older ;; than EXPIRE. ;; Insert the unique article headers in the buffer. (let ((gnus-score-index (nth 1 (assoc header gnus-header-index))) ;; gnus-score-index is used as a free variable. ! alike last this art entries alist articles) ;; Sorting the articles costs os O(N*log N) but will allow us to ;; only match with each unique header. Thus the actual matching --- 1448,1462 ---- (current-time-string) nil t))) ! (defun gnus-score-string (score-list header now expire) ! ;; Score ARTICLES according to HEADER in SCORE-LIST. ;; Update matches entries to NOW and remove unmatched entried older ;; than EXPIRE. ;; Insert the unique article headers in the buffer. (let ((gnus-score-index (nth 1 (assoc header gnus-header-index))) ;; gnus-score-index is used as a free variable. ! alike last this art entries alist articles scores fuzzy) ;; Sorting the articles costs os O(N*log N) but will allow us to ;; only match with each unique header. Thus the actual matching *************** *** 1415,1421 **** (insert last ?\n) (put-text-property (1- (point)) (point) 'articles alike))) ! ;; Find matches. (while scores (setq alist (car scores) scores (cdr scores) --- 1490,1497 ---- (insert last ?\n) (put-text-property (1- (point)) (point) 'articles alike))) ! ;; Find ordinary matches. ! (setq scores score-list) (while scores (setq alist (car scores) scores (cdr scores) *************** *** 1437,1477 **** ((or (= dmt ?e) (= dmt ?s) (= dmt ?f)) 'search-forward) (t (error "Illegal match type: %s" type)))) arts art) ! (goto-char (point-min)) ! (if (= dmt ?e) ! (while (and (not (eobp)) ! (funcall search-func match nil t)) ! (and (= (progn (beginning-of-line) (point)) ! (match-beginning 0)) ! (= (progn (end-of-line) (point)) ! (match-end 0)) ! (progn ! (setq found (setq arts (get-text-property ! (point) 'articles))) ! ;; Found a match, update scores. ! (while arts ! (setq art (car arts) ! arts (cdr arts)) ! (setcdr art (+ score (cdr art)))))) ! (forward-line 1)) ! (and (string= match "") (setq match "\n")) ! (while (funcall search-func match nil t) ! (end-of-line) ! (setq found (setq arts (get-text-property (point) 'articles))) ! ;; Found a match, update scores. ! (while arts ! (setq art (car arts) ! arts (cdr arts)) ! (setcdr art (+ score (cdr art)))))) ! ;; Update expire date ! (cond ((null date)) ;Permanent entry. ! (found ;Match, update date. ! (gnus-score-set 'touched '(t) alist) ! (setcar (nthcdr 2 kill) now)) ! ((< date expire) ;Old entry, remove. ! (gnus-score-set 'touched '(t) alist) ! (setcdr entries (cdr rest)) ! (setq rest entries))) (setq entries rest)))))) (defun gnus-score-string< (a1 a2) --- 1513,1608 ---- ((or (= dmt ?e) (= dmt ?s) (= dmt ?f)) 'search-forward) (t (error "Illegal match type: %s" type)))) arts art) ! (if (= dmt ?f) ! (setq fuzzy t) ! (goto-char (point-min)) ! (if (= dmt ?e) ! (while (and (not (eobp)) ! (funcall search-func match nil t)) ! (and (= (progn (beginning-of-line) (point)) ! (match-beginning 0)) ! (= (progn (end-of-line) (point)) ! (match-end 0)) ! (progn ! (setq found (setq arts (get-text-property ! (point) 'articles))) ! ;; Found a match, update scores. ! (while arts ! (setq art (car arts) ! arts (cdr arts)) ! (setcdr art (+ score (cdr art)))))) ! (forward-line 1)) ! (and (string= match "") (setq match "\n")) ! (while (funcall search-func match nil t) ! (end-of-line) ! (setq found (setq arts (get-text-property (point) 'articles))) ! ;; Found a match, update scores. ! (while arts ! (setq art (car arts) ! arts (cdr arts)) ! (setcdr art (+ score (cdr art)))))) ! ;; Update expire date ! (cond ((null date)) ;Permanent entry. ! (found ;Match, update date. ! (gnus-score-set 'touched '(t) alist) ! (setcar (nthcdr 2 kill) now)) ! ((< date expire) ;Old entry, remove. ! (gnus-score-set 'touched '(t) alist) ! (setcdr entries (cdr rest)) ! (setq rest entries)))) ! (setq entries rest)))) ! ! ;; Find fuzzy matches. ! (setq scores (and fuzzy score-list)) ! (if fuzzy (gnus-simplify-buffer-fuzzy)) ! (while scores ! (setq alist (car scores) ! scores (cdr scores) ! entries (assoc header alist)) ! (while (cdr entries) ;First entry is the header index. ! (let* ((rest (cdr entries)) ! (kill (car rest)) ! (match (nth 0 kill)) ! (type (or (nth 3 kill) 's)) ! (score (or (nth 1 kill) gnus-score-interactive-default-score)) ! (date (nth 2 kill)) ! (found nil) ! (mt (aref (symbol-name type) 0)) ! (case-fold-search ! (not (or (= mt ?R) (= mt ?S) (= mt ?E) (= mt ?F)))) ! (dmt (downcase mt)) ! (search-func ! (cond ((= dmt ?r) 're-search-forward) ! ((or (= dmt ?e) (= dmt ?s) (= dmt ?f)) 'search-forward) ! (t (error "Illegal match type: %s" type)))) ! arts art) ! (if (/= dmt ?f) ! () ! (goto-char (point-min)) ! (while (and (not (eobp)) ! (funcall search-func match nil t)) ! (and (= (progn (beginning-of-line) (point)) ! (match-beginning 0)) ! (= (progn (end-of-line) (point)) ! (match-end 0)) ! (progn ! (setq found (setq arts (get-text-property ! (point) 'articles))) ! ;; Found a match, update scores. ! (while arts ! (setq art (car arts) ! arts (cdr arts)) ! (setcdr art (+ score (cdr art)))))) ! (forward-line 1)) ! ;; Update expire date ! (cond ((null date)) ;Permanent entry. ! (found ;Match, update date. ! (gnus-score-set 'touched '(t) alist) ! (setcar (nthcdr 2 kill) now)) ! ((< date expire) ;Old entry, remove. ! (gnus-score-set 'touched '(t) alist) ! (setcdr entries (cdr rest)) ! (setq rest entries)))) (setq entries rest)))))) (defun gnus-score-string< (a1 a2) *************** *** 1532,1538 **** (goto-char (point-min)) (while (not (eobp)) (setq elem (cdr (assq (gnus-summary-article-mark) alist))) ! (if (not elem) () (setq headers (gnus-get-header-by-number (gnus-summary-article-number))) --- 1663,1670 ---- (goto-char (point-min)) (while (not (eobp)) (setq elem (cdr (assq (gnus-summary-article-mark) alist))) ! (if (or (not elem) ! (get-text-property (point) 'gnus-pseudo)) () (setq headers (gnus-get-header-by-number (gnus-summary-article-number))) *************** *** 1570,1576 **** (while (re-search-forward marks nil t) (beginning-of-line) (setq elem (cdr (assq (gnus-summary-article-mark) alist))) ! (if (not elem) () (setq headers (gnus-get-header-by-number (gnus-summary-article-number))) --- 1702,1709 ---- (while (re-search-forward marks nil t) (beginning-of-line) (setq elem (cdr (assq (gnus-summary-article-mark) alist))) ! (if (or (not elem) ! (get-text-property (gnus-point-at-bol) 'gnus-pseudo)) () (setq headers (gnus-get-header-by-number (gnus-summary-article-number))) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus-vis.el dgnus/lisp/gnus-vis.el *** pub/dgnus/lisp/gnus-vis.el Wed May 10 08:34:20 1995 --- dgnus/lisp/gnus-vis.el Sat May 13 15:00:48 1995 *************** *** 586,592 **** (let ((face (and list (cdr (car list))))) ;; BUG! For some reason the text properties of the first ;; characters get mangled. ! (or (eq face (get-text-property (+ beg 10) 'face)) (put-text-property beg end 'face face))) (goto-char p))) --- 586,592 ---- (let ((face (and list (cdr (car list))))) ;; BUG! For some reason the text properties of the first ;; characters get mangled. ! (or (eq face (get-text-property beg 'face)) (put-text-property beg end 'face face))) (goto-char p))) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/gnus.el dgnus/lisp/gnus.el *** pub/dgnus/lisp/gnus.el Wed May 10 08:34:21 1995 --- dgnus/lisp/gnus.el Sat May 13 15:00:46 1995 *************** *** 441,446 **** --- 441,449 ---- (defvar gnus-summary-goto-unread nil "*If non-nil, marking commands will go to the next unread article.") + (defvar gnus-group-goto-unread t + "*If non-nil, movement commands will go to the next unread and subscribed group.") + (defvar gnus-check-new-newsgroups t "*Non-nil means that Gnus will add new newsgroups at startup. If this variable is `ask-server', Gnus will ask the server for new *************** *** 614,628 **** (defvar gnus-thread-indent-level 4 "*Number that says how much each sub-thread should be indented.") - ;; jwz: nuke newsgroups whose name is all digits - that means that - ;; some loser has let articles get into the root of the news spool, - ;; which is toxic. Lines beginning with whitespace also tend to be - ;; toxic. (defvar gnus-ignored-newsgroups (purecopy (mapconcat 'identity ! '("^to\\." ; not "real" groups ! "^[0-9. \t]+ " ; all digits in name ! "[][\"#'() ;\\]" ; bogus characters ) "\\|")) "*A regexp to match uninteresting newsgroups in the active file. --- 617,627 ---- (defvar gnus-thread-indent-level 4 "*Number that says how much each sub-thread should be indented.") (defvar gnus-ignored-newsgroups (purecopy (mapconcat 'identity ! '("^to\\." ; not "real" groups ! "^[0-9]+ " ; all digits in name ! "[][\"#'();\\]" ; bogus characters ) "\\|")) "*A regexp to match uninteresting newsgroups in the active file. *************** *** 751,756 **** --- 750,757 ---- (post ([post 1.0 point])) (reply ([article 0.5] [mail 1.0 point])) + (mail-forward ([mail 1.0 point])) + (post-forward ([post 1.0 point])) (reply-yank ([mail 1.0 point])) (followup ([article 0.5] [post 1.0 point])) *************** *** 1170,1176 **** (add-hook 'gnus-article-display-hook 'gnus-article-treat-overstrike) (defvar gnus-article-x-face-command ! "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -" "String or function to be executed to display an X-Face header. If it is a string, the command will be executed in a sub-shell asynchronously. The compressed face will be piped to this command.") --- 1171,1177 ---- (add-hook 'gnus-article-display-hook 'gnus-article-treat-overstrike) (defvar gnus-article-x-face-command ! "{ echo '/* Width=48, Height=48 */'; uncompface; } | icontopbm | xv -quit -" "String or function to be executed to display an X-Face header. If it is a string, the command will be executed in a sub-shell asynchronously. The compressed face will be piped to this command.") *************** *** 1334,1342 **** (list ?z 'score-char ?c) (list ?U 'unread ?c) (list ?t '(gnus-summary-number-of-articles-in-thread ! (if (boundp 'thread) (symbol-value 'thread)) nil) ?d) (list ?e '(gnus-summary-number-of-articles-in-thread ! (if (boundp 'thread) (symbol-value 'thread)) t) ?c) (list ?u 'user-defined ?s)) "An alist of format specifications that can appear in summary lines, and what variables they correspond with, along with the type of the --- 1335,1349 ---- (list ?z 'score-char ?c) (list ?U 'unread ?c) (list ?t '(gnus-summary-number-of-articles-in-thread ! (or gnus-tmp-adopt-thread ! (if (boundp 'thread) (symbol-value 'thread) ! thread nil))) ! ?d) (list ?e '(gnus-summary-number-of-articles-in-thread ! (or gnus-tmp-adopt-thread ! (if (boundp 'thread) (symbol-value 'thread) ! thread nil)) t) ! ?d) (list ?u 'user-defined ?s)) "An alist of format specifications that can appear in summary lines, and what variables they correspond with, along with the type of the *************** *** 1369,1375 **** (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)" "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.67" "Version number for this version of Gnus.") (defvar gnus-info-nodes --- 1376,1382 ---- (defconst gnus-maintainer "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls & Boys)" "The mail address of the Gnus maintainer.") ! (defconst gnus-version "(ding) Gnus v0.68" "Version number for this version of Gnus.") (defvar gnus-info-nodes *************** *** 1871,1880 **** (setq gnus-summary-mark-positions pos)))) (defun gnus-format-max-width (form length) ! (let ((val (eval form))) ! (if (> (length val) length) ! (substring val 0 length) ! val))) (defun gnus-set-mouse-face (string) ;; Set mouse face property on STRING. --- 1878,1888 ---- (setq gnus-summary-mark-positions pos)))) (defun gnus-format-max-width (form length) ! (let* ((val (eval form)) ! (valstr (if (numberp val) (int-to-string val) val))) ! (if (> (length valstr) length) ! (substring valstr 0 length) ! valstr))) (defun gnus-set-mouse-face (string) ;; Set mouse face property on STRING. *************** *** 2220,2238 **** (save-excursion (gnus-set-work-buffer) (insert subject) ! (goto-char (point-min)) ! (and (looking-at "^[ \t]*re:[ \t]*") ! (replace-match "" t t)) ! (while (re-search-forward "[ \t\n]*([^()]*)[ \t\n]*\\'" nil t) ! (replace-match "" t t) ! (goto-char (point-min))) ! (while (re-search-forward "[ \t]+" nil 'move) ! (replace-match " " t t)) ! ;; the 'move above makes sure we are at (point-max) ! (and (= (preceding-char) ? ) ! (delete-char -1)) (buffer-string)))) ;; Add the current buffer to the list of buffers to be killed on exit. (defun gnus-add-current-to-buffer-list () (setq gnus-buffer-list (cons (current-buffer) gnus-buffer-list))) --- 2228,2253 ---- (save-excursion (gnus-set-work-buffer) (insert subject) ! (gnus-simplify-buffer-fuzzy) (buffer-string)))) + (defun gnus-simplify-buffer-fuzzy () + (goto-char (point-min)) + (while (re-search-forward "^[ \t]*re:[ \t]*" nil t) + (replace-match "" t t)) + (goto-char (point-min)) + (while (re-search-forward "[ \t\n]*([^()]*)[ \t\n]*$" nil t) + (replace-match "" t t)) + (goto-char (point-min)) + (while (re-search-forward "[ \t]+" nil t) + (replace-match " " t t)) + (goto-char (point-min)) + (while (re-search-forward "[ \t]+$" nil t) + (replace-match "" t t)) + (goto-char (point-min)) + (while (re-search-forward "^[ \t]+" nil t) + (replace-match "" t t))) + ;; Add the current buffer to the list of buffers to be killed on exit. (defun gnus-add-current-to-buffer-list () (setq gnus-buffer-list (cons (current-buffer) gnus-buffer-list))) *************** *** 2315,2320 **** --- 2330,2344 ---- (setq gnus-buffer-list (cdr gnus-buffer-list)))) (defun gnus-windows-old-to-new (setting) + (if (symbolp setting) + (setq setting + (cond ((eq setting 'SelectArticle) + 'article) + ((eq setting 'SelectSubject) + 'summary) + ((eq setting 'SelectNewsgroup) + 'group) + (t setting)))) (if (or (listp setting) (not (and gnus-window-configuration (memq setting '(group summary article))))) *************** *** 2323,2329 **** (elem (car (cdr (assq setting gnus-window-configuration)))) (total (apply '+ elem)) (types '(group summary article)) ! (pbuf (if (eq setting 'group) 'group 'summary)) (i 0) perc out) --- 2347,2353 ---- (elem (car (cdr (assq setting gnus-window-configuration)))) (total (apply '+ elem)) (types '(group summary article)) ! (pbuf (if (eq setting 'newsgroup) 'group 'summary)) (i 0) perc out) *************** *** 2360,2369 **** ;; We have to do the (possible) horizontal splitting before the ;; vertical. ! (if (and (listp (car hor)) (eq (car (car hor)) 'horizontal)) (progn ! (setq hor (cdr hor)) ! (split-window nil nil t))) ;; Go through the rules and eval the elements that are to be ;; evaled. --- 2384,2394 ---- ;; We have to do the (possible) horizontal splitting before the ;; vertical. ! (if (and (listp (car hor)) ! (eq (car (car hor)) 'horizontal)) (progn ! (split-window nil (floor (* (frame-width) (nth 1 (car hor)))) t) ! (setq hor (cdr hor)))) ;; Go through the rules and eval the elements that are to be ;; evaled. *************** *** 2525,2531 **** (if (boundp (car olist)) (insert "(setq " (symbol-name (car olist)) " '" (prin1-to-string (symbol-value (car olist))) ")\n") ! (insert ";; (makunbound 'b'" (symbol-name (car olist)) ")\n")) (setq olist (cdr olist))) (insert "\n\n"))) --- 2550,2556 ---- (if (boundp (car olist)) (insert "(setq " (symbol-name (car olist)) " '" (prin1-to-string (symbol-value (car olist))) ")\n") ! (insert ";; (makeunbound '" (symbol-name (car olist)) ")\n")) (setq olist (cdr olist))) (insert "\n\n"))) *************** *** 3673,3679 **** (let ((backward (< n 0)) (n (abs n))) (while (and (> n 0) ! (gnus-group-search-forward backward all level)) (setq n (1- n))) (if (/= 0 n) (message "No more%s newsgroups%s" (if all "" " unread") (if level " on this level or higher" ""))) --- 3698,3705 ---- (let ((backward (< n 0)) (n (abs n))) (while (and (> n 0) ! (gnus-group-search-forward ! backward (or (not gnus-group-goto-unread) all) level)) (setq n (1- n))) (if (/= 0 n) (message "No more%s newsgroups%s" (if all "" " unread") (if level " on this level or higher" ""))) *************** *** 4024,4037 **** (setq group (car groups) groups (cdr groups)) (gnus-group-remove-mark group) ! (let ((expirable (assq 'expire ! (nth 3 (nth 2 (gnus-gethash ! group gnus-newsrc-hashtb)))))) ! (and expirable ! (gnus-check-backend-function 'request-expire-articles group) ! (setcdr expirable ! (gnus-request-expire-articles ! (cdr expirable) group))))))) (defun gnus-group-expire-all-groups () "Expire all expirable articles in all newsgroups." --- 4050,4065 ---- (setq group (car groups) groups (cdr groups)) (gnus-group-remove-mark group) ! (if (not (gnus-check-backend-function 'request-expire-articles group)) ! () ! (let* ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) ! (expirable (if (memq 'total-expire (nth 5 info)) ! (cons nil (gnus-list-of-read-articles group)) ! (assq 'expire (nth 3 info))))) ! (and expirable ! (setcdr expirable ! (gnus-request-expire-articles ! (cdr expirable) group)))))))) (defun gnus-group-expire-all-groups () "Expire all expirable articles in all newsgroups." *************** *** 4055,4063 **** (gnus-group-remove-mark group) (message "Changed level of %s from %d to %d" group (gnus-group-group-level) level) ! (and (gnus-group-change-level group level ! (gnus-group-group-level)) ! (gnus-group-update-group-line)))) (gnus-group-position-cursor)) (defun gnus-group-unsubscribe-current-group (arg) --- 4083,4091 ---- (gnus-group-remove-mark group) (message "Changed level of %s from %d to %d" group (gnus-group-group-level) level) ! (gnus-group-change-level group level ! (gnus-group-group-level)) ! (gnus-group-update-group-line))) (gnus-group-position-cursor)) (defun gnus-group-unsubscribe-current-group (arg) *************** *** 5686,5691 **** --- 5714,5720 ---- ;; Added by Per Abrahamsen . (defvar gnus-tmp-prev-subject "") + (defvar gnus-tmp-adopt-thread nil) ;; Basic ideas by Paul Dworkin . (defun gnus-summary-prepare-threads *************** *** 5718,5724 **** ;; The header is a dummy root. (cond ((eq gnus-summary-make-false-root 'adopt) ;; We let the first article adopt the rest. ! (gnus-summary-prepare-threads (list (car (cdr thread))) 0) (setq thread (cdr (cdr thread))) (while thread (gnus-summary-prepare-threads (list (car thread)) 1 t) --- 5747,5754 ---- ;; The header is a dummy root. (cond ((eq gnus-summary-make-false-root 'adopt) ;; We let the first article adopt the rest. ! (let ((gnus-tmp-adopt-thread thread)) ! (gnus-summary-prepare-threads (list (car (cdr thread))) 0)) (setq thread (cdr (cdr thread))) (while thread (gnus-summary-prepare-threads (list (car thread)) 1 t) *************** *** 5730,5736 **** (setq clevel 1)) ((eq gnus-summary-make-false-root 'empty) ;; We print the articles with empty subject fields. ! (gnus-summary-prepare-threads (list (car (cdr thread))) 0) (setq thread (cdr (cdr thread))) (while thread (gnus-summary-prepare-threads --- 5760,5767 ---- (setq clevel 1)) ((eq gnus-summary-make-false-root 'empty) ;; We print the articles with empty subject fields. ! (let ((gnus-tmp-adopt-thread thread)) ! (gnus-summary-prepare-threads (list (car (cdr thread))) 0)) (setq thread (cdr (cdr thread))) (while thread (gnus-summary-prepare-threads *************** *** 6364,6388 **** ;; The following macros and functions were written by Felix Lee ;; . - ;; This is almost 4x faster than (string-to-int (buffer-substring ... )) - ;; primarily because of garbage collection. -jwz - (defmacro gnus-read-integer (&optional point move-p) - (` ((, (if move-p 'progn 'save-excursion)) - (,@ (if point (list (list 'goto-char point)))) - (if (and (<= (following-char) ?9) - (>= (following-char) ?0)) - (read (current-buffer)) - 0)))) - (defmacro gnus-nov-read-integer () ! '(if (and (<= (following-char) ?9) ! (>= (following-char) ?0)) ! (prog1 ! (let ((num (read (current-buffer)))) ! (if (numberp num) num 0)) ! (or (eobp) (forward-char 1))) ! (gnus-nov-skip-field) ! 0)) (defmacro gnus-nov-skip-field () '(search-forward "\t" eol 'move)) --- 6395,6407 ---- ;; The following macros and functions were written by Felix Lee ;; . (defmacro gnus-nov-read-integer () ! '(prog1 ! (if (= (following-char) ?\t) ! 0 ! (let ((num (read buffer))) ! (if (numberp num) num 0))) ! (or (eobp) (forward-char 1)))) (defmacro gnus-nov-skip-field () '(search-forward "\t" eol 'move)) *************** *** 6419,6467 **** (setq headers (nreverse headers))) headers)) (defun gnus-nov-parse-line (number dependencies) - "Point has to be after the number on the beginning of the line." (let ((none 0) ! header (eol (gnus-point-at-eol)) ref id dep) ! (forward-char) ;; overview: [num subject from date id refs chars lines misc] ! (save-restriction ! (narrow-to-region (point) eol) ! (condition-case nil ! (setq header ! (vector ! number ; number ! (gnus-nov-field) ; subject ! (gnus-nov-field) ; from ! (gnus-nov-field) ; date ! (setq id (or (gnus-nov-field) ! (concat "none+" ! (int-to-string ! (setq none (1+ none)))))) ; id ! (progn ! (save-excursion ! (let ((beg (point))) ! (search-forward "\t" eol) ! (if (search-backward ">" beg t) ! (setq ref ! (downcase ! (buffer-substring ! (1+ (point)) ! (progn ! (search-backward "<" beg t) ! (point))))) ! (setq ref nil)))) ! (gnus-nov-field)) ; refs ! (gnus-nov-read-integer) ; chars ! (gnus-nov-read-integer) ; lines ! (if (/= (following-char) ?\t) ! nil ! (forward-char 1) ! (gnus-nov-field)) ; misc ! )) ! (error (progn ! (setq header nil) ! (goto-char eol))))) ;; We build the thread tree. (and header (if (boundp (setq dep (intern (downcase id) dependencies))) --- 6438,6493 ---- (setq headers (nreverse headers))) headers)) + ;; This function has to be called with point after the article number + ;; on the beginning of the line. (defun gnus-nov-parse-line (number dependencies) (let ((none 0) ! (eol (gnus-point-at-eol)) ! (buffer (current-buffer)) ! header ref id dep) ! ;; overview: [num subject from date id refs chars lines misc] ! (narrow-to-region (point) eol) ! (forward-char) ! ! (condition-case nil ! (setq header ! (vector ! number ; number ! (gnus-nov-field) ; subject ! (gnus-nov-field) ; from ! (gnus-nov-field) ; date ! (setq id (or (gnus-nov-field) ! (concat "none+" ! (int-to-string ! (setq none (1+ none)))))) ; id ! (progn ! (save-excursion ! (let ((beg (point))) ! (search-forward "\t" eol) ! (if (search-backward ">" beg t) ! (setq ref ! (downcase ! (buffer-substring ! (1+ (point)) ! (progn ! (search-backward "<" beg t) ! (point))))) ! (setq ref nil)))) ! (gnus-nov-field)) ; refs ! (gnus-nov-read-integer) ; chars ! (gnus-nov-read-integer) ; lines ! (if (/= (following-char) ?\t) ! nil ! (forward-char 1) ! (gnus-nov-field)) ; misc ! )) ! (quit (progn ! (setq header nil) ! (goto-char eol)))) ! ! (widen) ! ;; We build the thread tree. (and header (if (boundp (setq dep (intern (downcase id) dependencies))) *************** *** 6817,6822 **** --- 6843,6855 ---- ;; Return the list of unread articles. (nreverse unread))) + (defun gnus-list-of-read-articles (group) + (let ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) + (active (gnus-gethash group gnus-active-hashtb))) + (and info active + (gnus-sorted-complement + (gnus-uncompress-range active) + (gnus-list-of-unread-articles (nth 2 info)))))) ;; Various summary commands *************** *** 6849,6860 **** The prefix argument ALL means to select all articles." (interactive "P") (gnus-set-global-variables) ! (let ((current-subject (gnus-summary-article-number))) (gnus-summary-exit t) ;; We have to adjust the point of group mode buffer because the ;; current point was moved to the next unread newsgroup by ;; exiting. ! (gnus-summary-jump-to-group gnus-newsgroup-name) (gnus-group-read-group all t) (gnus-summary-goto-subject current-subject))) --- 6882,6895 ---- The prefix argument ALL means to select all articles." (interactive "P") (gnus-set-global-variables) ! (let ((current-subject (gnus-summary-article-number)) ! (group gnus-newsgroup-name)) ! (setq gnus-newsgroup-threads nil) (gnus-summary-exit t) ;; We have to adjust the point of group mode buffer because the ;; current point was moved to the next unread newsgroup by ;; exiting. ! (gnus-summary-jump-to-group group) (gnus-group-read-group all t) (gnus-summary-goto-subject current-subject))) *************** *** 6872,6889 **** (gnus-summary-jump-to-group group) (gnus-group-read-group all))) ! (defun gnus-summary-exit (&optional temporary) ! "Exit reading current newsgroup, and then return to group selection mode. ! gnus-exit-group-hook is called with no arguments if that value is non-nil." ! (interactive) ! (gnus-set-global-variables) ! (gnus-kill-save-kill-buffer) (let* ((group gnus-newsgroup-name) ! (quit-buffer (cdr (assoc 'quit-buffer (gnus-find-method-for-group ! gnus-newsgroup-name)))) ! (mode major-mode) ! (method (car (gnus-find-method-for-group group))) ! (buf (current-buffer))) (if gnus-newsgroup-kill-headers (setq gnus-newsgroup-killed (gnus-compress-sequence --- 6907,6915 ---- (gnus-summary-jump-to-group group) (gnus-group-read-group all))) ! (defun gnus-summary-update-info () (let* ((group gnus-newsgroup-name) ! (method (car (gnus-find-method-for-group group)))) (if gnus-newsgroup-kill-headers (setq gnus-newsgroup-killed (gnus-compress-sequence *************** *** 6918,6924 **** ;; Do not switch windows but change the buffer to work. (set-buffer gnus-group-buffer) (or (eq 'nndigest method) ! (gnus-group-update-group group))) ;; Make sure where I was, and go to next newsgroup. (if (eq method 'nndigest) () --- 6944,6964 ---- ;; Do not switch windows but change the buffer to work. (set-buffer gnus-group-buffer) (or (eq 'nndigest method) ! (gnus-group-update-group group))))) ! ! (defun gnus-summary-exit (&optional temporary) ! "Exit reading current newsgroup, and then return to group selection mode. ! gnus-exit-group-hook is called with no arguments if that value is non-nil." ! (interactive) ! (gnus-set-global-variables) ! (gnus-kill-save-kill-buffer) ! (let* ((group gnus-newsgroup-name) ! (quit-buffer (cdr (assoc 'quit-buffer (gnus-find-method-for-group ! gnus-newsgroup-name)))) ! (mode major-mode) ! (method (car (gnus-find-method-for-group group))) ! (buf (current-buffer))) ! (gnus-summary-update-info) ; Make all changes in this group permanent. ;; Make sure where I was, and go to next newsgroup. (if (eq method 'nndigest) () *************** *** 7182,7188 **** (set-buffer gnus-summary-buffer) (if (or (null gnus-current-article) (null gnus-article-current) ! (/= article (cdr gnus-article-current)) (not (equal (car gnus-article-current) gnus-newsgroup-name)) force) ;; The requested article is different from the current article. --- 7222,7228 ---- (set-buffer gnus-summary-buffer) (if (or (null gnus-current-article) (null gnus-article-current) ! (not (eq article (cdr gnus-article-current))) (not (equal (car gnus-article-current) gnus-newsgroup-name)) force) ;; The requested article is different from the current article. *************** *** 7497,7502 **** --- 7537,7543 ---- (forward-line -1) (header-number header))) (let ((gnus-override-method gnus-refer-article-method) + (gnus-ancient-mark gnus-read-mark) number) (and gnus-refer-article-method (or (gnus-server-opened gnus-refer-article-method) *************** *** 8529,8535 **** (gnus-summary-remove-lines-marked-with (concat (mapconcat (lambda (char) (char-to-string (symbol-value char))) ! '(gnus-del-mark gnus-read-mark gnus-killed-mark gnus-kill-file-mark gnus-low-score-mark gnus-expirable-mark) "")))) --- 8570,8576 ---- (gnus-summary-remove-lines-marked-with (concat (mapconcat (lambda (char) (char-to-string (symbol-value char))) ! '(gnus-del-mark gnus-read-mark gnus-ancient-mark gnus-killed-mark gnus-kill-file-mark gnus-low-score-mark gnus-expirable-mark) "")))) *************** *** 8696,8702 **** (if all "Mark absolutely all articles as read? " "Mark all unread articles as read? "))) ! (if (and not-mark (not gnus-use-adaptive-scoring)) (progn (and all (setq gnus-newsgroup-marked nil gnus-newsgroup-dormant nil)) --- 8737,8744 ---- (if all "Mark absolutely all articles as read? " "Mark all unread articles as read? "))) ! (if (and not-mark (not gnus-use-adaptive-scoring) ! gnus-newsgroup-auto-expire) (progn (and all (setq gnus-newsgroup-marked nil gnus-newsgroup-dormant nil)) *************** *** 9002,9007 **** --- 9044,9050 ---- (goto-char (point-min)) (sort-subr reverse 'forward-line 'end-of-line (car predicate))) (let ((gnus-thread-sort-functions (list (cdr predicate))) + (gnus-summary-prepare-hook nil) (gnus-summary-already-sorted nil)) (gnus-summary-prepare)))))) *************** *** 9028,9053 **** save those articles instead. The variable `gnus-default-article-saver' specifies the saver function." (interactive "P") ! (let (articles process) ! (if (and n (numberp n)) ! (let ((backward (< n 0)) ! (n (abs n))) ! (save-excursion ! (while (and (> n 0) ! (setq articles (cons (gnus-summary-article-number) ! articles)) ! (gnus-summary-search-forward nil nil backward)) ! (setq n (1- n)))) ! (setq articles (sort articles (function <)))) ! (if gnus-newsgroup-processable ! (progn ! (setq articles (setq gnus-newsgroup-processable ! (nreverse gnus-newsgroup-processable))) ! (setq process t)) ! (setq articles (list (gnus-summary-article-number))))) (while articles ! (let ((header (gnus-gethash (int-to-string (car articles)) ! gnus-newsgroup-headers-hashtb-by-number))) (if (vectorp header) (progn (gnus-summary-select-article t nil nil (car articles)) --- 9071,9079 ---- save those articles instead. The variable `gnus-default-article-saver' specifies the saver function." (interactive "P") ! (let ((articles (gnus-summary-work-articles n))) (while articles ! (let ((header (gnus-get-header-by-number (car articles)))) (if (vectorp header) (progn (gnus-summary-select-article t nil nil (car articles)) *************** *** 9066,9082 **** (delete-region (point) (progn (forward-line 1) (point)))) (widen)))) ! (if gnus-default-article-saver ! (funcall gnus-default-article-saver) ! (error "No default saver is defined."))) (if (assq 'name header) (gnus-copy-file (cdr (assq 'name header))) (message "Article %d is unsaveable" (car articles))))) ! (if process ! (gnus-summary-remove-process-mark (car articles))) (setq articles (cdr articles))) - (if process (setq gnus-newsgroup-processable - (nreverse gnus-newsgroup-processable))) (gnus-summary-position-cursor) n)) --- 9092,9106 ---- (delete-region (point) (progn (forward-line 1) (point)))) (widen)))) ! (save-excursion ! (if gnus-default-article-saver ! (funcall gnus-default-article-saver) ! (error "No default saver is defined.")))) (if (assq 'name header) (gnus-copy-file (cdr (assq 'name header))) (message "Article %d is unsaveable" (car articles))))) ! (gnus-summary-remove-process-mark (car articles)) (setq articles (cdr articles))) (gnus-summary-position-cursor) n)) *************** *** 9395,9401 **** (list "#" "\M-#" "\C-c\M-#" "n" "p" "N" "P" "\M-\C-n" "\M-\C-p" "." "\M-s" "\M-r" "<" ">" "l" "j" "^" "\M-^" "-" "u" "U" "d" "D" ! "\M-u" "\M-U" "k" "\C-k" "\M-\C-k" "c" "x" "X" "\M-\C-x" "\M-\177" "b" "B" "$" "w" "\C-c\C-r" "t" "\M-t" "C" "S" "m" "o" "\C-o" "|" "\M-m" "\M-\C-m" "\M-k" "M" --- 9419,9425 ---- (list "#" "\M-#" "\C-c\M-#" "n" "p" "N" "P" "\M-\C-n" "\M-\C-p" "." "\M-s" "\M-r" "<" ">" "l" "j" "^" "\M-^" "-" "u" "U" "d" "D" ! "\M-u" "\M-U" "k" "\C-k" "\M-\C-k""x" "X" "\M-\C-x" "\M-\177" "b" "B" "$" "w" "\C-c\C-r" "t" "\M-t" "C" "S" "m" "o" "\C-o" "|" "\M-m" "\M-\C-m" "\M-k" "M" *************** *** 9405,9411 **** 'gnus-article-summary-command) (setq commands (cdr commands)))) ! (let ((commands (list "q" "Q" "r" "R" "\C-c\C-f" "m" "a" "f" "F"))) (while commands (define-key gnus-article-mode-map (car commands) 'gnus-article-summary-command-nosave) --- 9429,9435 ---- 'gnus-article-summary-command) (setq commands (cdr commands)))) ! (let ((commands (list "q" "Q" "c" "r" "R" "\C-c\C-f" "m" "a" "f" "F"))) (while commands (define-key gnus-article-mode-map (car commands) 'gnus-article-summary-command-nosave) *************** *** 9460,9465 **** --- 9484,9493 ---- (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." (setq group (or group gnus-newsgroup-name)) + + ;; Open server if it has closed. + (gnus-check-news-server (gnus-find-method-for-group group)) + ;; Using `gnus-request-article' directly will insert the article into ;; `nntp-server-buffer' - so we'll save some time by not having to ;; copy it from the server buffer into the article buffer. *************** *** 9645,9651 **** (defun gnus-article-show-all-headers () "Show all article headers in article mode buffer." (save-excursion - (setq gnus-have-all-headers t) (gnus-article-setup-buffer) (set-buffer gnus-article-buffer) (let ((buffer-read-only nil)) --- 9673,9678 ---- *************** *** 10222,10228 **** score the alt hierarchy, you'd say \"!alt.all\"." (interactive) (let* ((yes-and-no ! (gnus-parse-n-options (apply (function concat) (mapcar (lambda (g) (concat g " ")) command-line-args-left)))) --- 10249,10255 ---- score the alt hierarchy, you'd say \"!alt.all\"." (interactive) (let* ((yes-and-no ! (gnus-newsrc-parse-options (apply (function concat) (mapcar (lambda (g) (concat g " ")) command-line-args-left)))) *************** *** 10571,10577 **** (ding) nil))))) ! (defun gnus-check-news-server (method) "If the news server is down, start it up again." (let ((method (if method method gnus-select-method))) (and (stringp method) --- 10598,10604 ---- (ding) nil))))) ! (defun gnus-check-news-server (&optional method) "If the news server is down, start it up again." (let ((method (if method method gnus-select-method))) (and (stringp method) *************** *** 10903,10912 **** ;; First we check the two user variables. (cond ! ((and gnus-options-not-subscribe (string-match gnus-options-not-subscribe group)) 'subscribe) ! ((and gnus-options-subscribe (string-match gnus-options-subscribe group)) 'ignore) ;; Then we go through the list that was retrieved from the .newsrc --- 10930,10939 ---- ;; First we check the two user variables. (cond ! ((and gnus-options-subscribe (string-match gnus-options-not-subscribe group)) 'subscribe) ! ((and gnus-options-not-subscribe (string-match gnus-options-subscribe group)) 'ignore) ;; Then we go through the list that was retrieved from the .newsrc *************** *** 11732,11951 **** (setq marked (cdr marked)))) (setq newsrc (cdr newsrc))))) - ;; jwz: rewrote this function to be much more efficient, and not be - ;; subject to regexp overflow errors when it encounters very long - ;; lines -- the old behavior was to blow off the rest of the *file* - ;; when a line was encountered that was too long to match!! Now it - ;; uses only simple looking-at calls, and doesn't create as many - ;; temporary strings. It also now handles multiple consecutive - ;; options lines (before it only handled the first.) - ;; Tiny rewrite by lmi. (defun gnus-newsrc-to-gnus-format () ! "Parse current buffer as .newsrc file." ! ;; We have to re-initialize these variables (except for ! ;; gnus-killed-list) because the quick startup file may contain bogus ! ;; values. ! (setq gnus-newsrc-options nil) ! (setq gnus-newsrc-options-n nil) ! (gnus-parse-options-lines) ! (gnus-parse-newsrc-body)) ! ! (defun gnus-parse-options-lines () ! ;; newsrc.5 seems to indicate that the options line can come anywhere ! ;; in the file, and that there can be any number of them: ! ;; ! ;; An options line starts with the word options (left- ! ;; justified). Then there are the list of options just as ! ;; they would be on the readnews command line. For instance: ! ;; ! ;; options -n all !net.sf-lovers !mod.human-nets -r ! ;; options -c -r ! ;; ! ;; A string of lines beginning with a space or tab after the ! ;; initial options line will be considered continuation ! ;; lines. ! ;; ! ;; For now, we only accept it at the beginning of the file. ! ! (goto-char (point-min)) ! (skip-chars-forward " \t\n") ! (setq gnus-newsrc-options nil) ! (while (looking-at "^options[ \t]*\\(.*\\)\n") ! ;; handle consecutive options lines ! (setq gnus-newsrc-options (concat gnus-newsrc-options ! (if gnus-newsrc-options "\n\t") ! (buffer-substring (match-beginning 1) ! (match-end 1)))) ! (forward-line 1) ! (while (looking-at "[ \t]+\\(.*\\)\n") ! ;; handle subsequent continuation lines of this options line ! (setq gnus-newsrc-options (concat gnus-newsrc-options "\n\t" ! (buffer-substring (match-beginning 1) ! (match-end 1)))) ! (forward-line 1))) ! ;; Gather all "-n" options lines. ! (let ((start 0) ! (result nil)) ! (if gnus-newsrc-options ! (while (and (string-match "^[ \t]*-n\\([^\n]*\\)$" ! gnus-newsrc-options ! start) ! (setq start (match-end 0))) ! (setq result (concat result ! (and result " ") ! (substring gnus-newsrc-options ! (match-beginning 1) ! (match-end 1)))))) ! ! (and result (gnus-parse-n-options result)) ! nil)) ! (defun gnus-parse-newsrc-body () ! ;; Point has been positioned after the options lines. We shouldn't ! ;; see any more in here. ! ! (let ((subscribe nil) ! (read-list nil) ! (line (1+ (count-lines (point-min) (point)))) (already-read (> (length gnus-newsrc-alist) 1)) ! newsgroup ! p p2) ! (save-restriction ! (skip-chars-forward " \t") ! (while (not (eobp)) ! (cond ! ((= (following-char) ?\n) ! ;; skip blank lines ! nil) ! (t ! (setq p (point)) ! (skip-chars-forward "^:!\n") ! (if (= (following-char) ?\n) ! (error "line %d is unparsable in %s" line (buffer-name))) ! (setq p2 (point)) ! (skip-chars-backward " \t") ! ! ;; #### note: we could avoid consing a string here by binding obarray ! ;; and reading the newsgroup directly into the gnus-newsrc-hashtb, ! ;; then setq'ing newsgroup to symbol-name of that, like we do in ! ;; gnus-active-to-gnus-format. ! (setq newsgroup (buffer-substring p (point))) ! (goto-char p2) ! ! (setq subscribe (= (following-char) ?:)) ! (setq read-list nil) ! ! (forward-char 1) ; after : or ! ! (skip-chars-forward " \t") ! (while (not (= (following-char) ?\n)) ! (skip-chars-forward " \t") ! (or ! (and (cond ! ((looking-at "\\([0-9]+\\)-\\([0-9]+\\)") ; a range ! (setq read-list ! (cons ! (cons ! (progn ! ;; faster that buffer-substring/string-to-int ! (narrow-to-region (point-min) (match-end 1)) ! (read (current-buffer))) ! (progn ! (narrow-to-region (point-min) (match-end 2)) ! (forward-char) ; skip over "-" ! (prog1 ! (read (current-buffer)) ! (widen)))) ! read-list)) ! t) ! ((looking-at "[0-9]+") ! ;; faster that buffer-substring/string-to-int ! (narrow-to-region (point-min) (match-end 0)) ! (setq p (read (current-buffer))) ! (widen) ! (setq read-list (cons (cons p p) read-list)) ! t) ! (t ! ;; bogus chars in ranges ! nil)) (progn ! (goto-char (match-end 0)) ! (skip-chars-forward " \t") ! (cond ((= (following-char) ?,) ! (forward-char 1) ! t) ! ((= (following-char) ?\n) ! t) ! (t ! ;; bogus char after range ! nil)))) ! ;; if we get here, the parse failed ! (progn ! (end-of-line) ; give up on this line ! (ding) ! (message "Ignoring bogus line %d for %s in %s" ! line newsgroup (buffer-name)) ! (sleep-for 1)))) ! ;; We have already read .newsrc.eld, so we gently update the ! ;; data in the hash table with the information we have just ! ;; read. ! (let ((info (nth 2 (gnus-gethash newsgroup gnus-newsrc-hashtb))) level) (if info (progn ! (setcar (nthcdr 2 info) (nreverse read-list)) ;; We update the level very gently. In fact, we ;; only change it if there's been a status change ;; from subscribed to unsubscribed, or vice versa. (setq level (nth 1 info)) ! (cond ((and (<= level gnus-level-subscribed) (not subscribe)) ! (setq level (if read-list gnus-level-default-unsubscribed (1+ gnus-level-default-unsubscribed)))) ! ((and (> level gnus-level-subscribed) subscribe) (setq level gnus-level-default-subscribed))) (setcar (cdr info) level)) ! (setq gnus-newsrc-alist ! (cons (list newsgroup ! (if subscribe ! gnus-level-default-subscribed ! (if read-list ! (1+ gnus-level-subscribed) ! gnus-level-default-unsubscribed)) ! (nreverse read-list)) ! gnus-newsrc-alist)))))) ! (setq line (1+ line)) ! (forward-line 1))) ! (or already-read (setq gnus-newsrc-alist (nreverse gnus-newsrc-alist))) ! (setq gnus-newsrc-alist (cdr gnus-newsrc-alist)) (gnus-make-hashtable-from-newsrc-alist) - nil)) ! (defun gnus-parse-n-options (options) ! "Parse -n NEWSGROUPS options and return a cons of YES and NO regexps." ! (let (yes no yes-or-no out newsgroup) ! ;; Parse each newsgroup description such as "comp.all". Commas ! ;; and white spaces can be a newsgroup separator. ! (while ! (string-match "^[ \t\n,]*\\(!?\\)\\([^- \t\n,][^ \t\n,]*\\)" options) ! (setq yes-or-no ! (substring options (match-beginning 1) (match-end 1))) ! (setq newsgroup ! (regexp-quote ! (substring options ! (match-beginning 2) (match-end 2)))) ! (setq options (substring options (match-end 2))) ! ;; Rewrite "all" to ".+" not ".*". ".+" requires at least one ! ;; character. ! (while (string-match "\\(^\\|\\\\[.]\\)all\\(\\\\[.]\\|$\\)" newsgroup) ! (setq newsgroup ! (concat (substring newsgroup 0 (match-end 1)) ! ".+" ! (substring newsgroup (match-beginning 2))))) ! ;; It is yes or no. ! (setq out (cons (cons (if (string= yes-or-no "!") 'ignore 'subscribe) ! (concat "^" newsgroup "$")) ! out))) ! (setq gnus-newsrc-options-n out))) (defun gnus-save-newsrc-file () "Save .newsrc file." --- 11759,12000 ---- (setq marked (cdr marked)))) (setq newsrc (cdr newsrc))))) (defun gnus-newsrc-to-gnus-format () ! (setq gnus-newsrc-options "") ! (let ((buf (current-buffer)) (already-read (> (length gnus-newsrc-alist) 1)) ! group level subscribed info options-symbol newsrc ! symbol reads num1) ! (goto-char (point-min)) ! ;; We intern the symbol `options' in the active hashtb so that we ! ;; can `eq' against it later. ! (setq options-symbol (intern "options" gnus-active-hashtb)) ! ! (while (not (eobp)) ! ;; We first read the first word on the line by narrowing and ! ;; then reading into `gnus-active-hashtb'. Most groups will ! ;; already exist in that hashtb, so this will save some string ! ;; space. ! (narrow-to-region ! (point) ! (progn (skip-chars-forward "^ \t!:\n") (point))) ! (goto-char (point-min)) ! (setq symbol ! (and (/= (point-min) (point-max)) ! (let ((obarray gnus-active-hashtb)) (read buf)))) ! (widen) ! ;; Now, the symbol we have read is either `options' or a group ! ;; name. If it is an options line, we just add it to a string. ! (cond ! ((eq symbol options-symbol) ! (setq gnus-newsrc-options ! ;; This concatting is quite inefficient, but since our ! ;; thorough studies show that approx 99.37% of all ! ;; .newsrc files only contain a single options line, we ! ;; don't give a damn, frankly, my dear. ! (concat gnus-newsrc-options ! (buffer-substring ! (gnus-point-at-bol) ! ;; Options may continue on the next line. ! (or (and (re-search-forward "^[^ \t]" nil 'move) ! (progn (beginning-of-line) (point))) ! (point)))))) ! (symbol ! ;; It was a group name. ! (setq subscribed (= (following-char) ?:) ! group (symbol-name symbol) ! reads nil) ! (if (eolp) ! ;; If the line ends here, this is clearly a buggy line, so ! ;; we put point a the beginning of line and let the cond ! ;; below do the error handling. ! (beginning-of-line) ! ;; We skip to the beginning of the ranges. ! (skip-chars-forward "!: \t")) ! ;; We are now at the beginning of the list of read articles. ! ;; We read them range by range. ! (while ! (cond ! ((looking-at "[0-9]+") ! ;; We narrow and read a number instead of buffer-substring/ ! ;; string-to-int because it's faster. narrow/widen is ! ;; faster than save-restriction/narrow, and save-restriction ! ;; produces a garbage object. ! (setq num1 (progn ! (narrow-to-region (match-beginning 0) (match-end 0)) ! (read buf))) ! (widen) ! ;; If the next character is a dash, then this is a range. ! (if (= (following-char) ?-) (progn ! ;; We read the upper bound of the range. ! (forward-char 1) ! (if (not (looking-at "[0-9]+")) ! ;; This is a buggy line, by we pretend that ! ;; it's kinda OK. Perhaps the user should be ! ;; dinged? ! (setq reads (cons num1 reads)) ! (setq reads ! (cons ! (cons num1 (progn ! (narrow-to-region (match-beginning 0) ! (match-end 0)) ! (read buf))) ! reads)) ! (widen))) ! ;; It was just a simple number, so we add it to the ! ;; list of ranges. ! (setq reads (cons num1 reads))) ! ;; If the next char in ?\n, then we have reached the end ! ;; of the line and return nil. ! (/= (following-char) ?\n)) ! ((= (following-char) ?\n) ! ;; End of line, so we end. ! nil) ! (t ! ;; Not numbers and not eol, so this might be a buggy ! ;; line... ! (or (eobp) ; If it was eob instead of ?\n, we allow it. ! (progn ! ;; The line was buggy. ! (setq group nil) ! (message "Mangled line: %s" (buffer-substring ! (gnus-point-at-bol) ! (gnus-point-at-eol))) ! (ding) ! (sit-for 1))) ! nil)) ! ;; Skip past ", ". Spaces are illegal in these ranges, but ! ;; we allow them, because it's a common mistake to put a ! ;; space after the comma. ! (skip-chars-forward ", ")) ! ! ;; We have already read .newsrc.eld, so we gently update the ! ;; data in the hash table with the information we have just ! ;; read. ! (if (not group) ! () ! (let ((info (nth 2 (gnus-gethash group gnus-newsrc-hashtb))) level) (if info + ;; There is an entry for this file in the alist. (progn ! (setcar (nthcdr 2 info) (nreverse reads)) ;; We update the level very gently. In fact, we ;; only change it if there's been a status change ;; from subscribed to unsubscribed, or vice versa. (setq level (nth 1 info)) ! (cond ((and (<= level gnus-level-subscribed) ! (not subscribed)) ! (setq level (if reads gnus-level-default-unsubscribed (1+ gnus-level-default-unsubscribed)))) ! ((and (> level gnus-level-subscribed) subscribed) (setq level gnus-level-default-subscribed))) (setcar (cdr info) level)) ! ;; This is a new group. ! (setq info (list group ! (if subscribed ! gnus-level-default-subscribed ! (if reads ! (1+ gnus-level-subscribed) ! gnus-level-default-unsubscribed)) ! (nreverse reads)))) ! (setq newsrc (cons info newsrc)))) ! (forward-line 1)))) ! ! (setq newsrc (nreverse newsrc)) ! ! (if (not already-read) ! () ! ;; We now have two newsrc lists - `newsrc', which is what we ! ;; have read from .newsrc, and `gnus-newsrc-alist', which is ! ;; what we've read from .newsrc.eld. We have to merge these ! ;; lists. We do this by "attaching" any (foreign) groups in the ! ;; gnus-newsrc-alist to the (native) group that precedes them. ! (let ((rc (cdr gnus-newsrc-alist)) ! (prev gnus-newsrc-alist) ! entry mentry) ! (while rc ! (or (assoc (car (car rc)) newsrc) ! (if (setq entry (assoc (car (car prev)) newsrc)) ! (setcdr (setq mentry (memq entry newsrc)) ! (cons (car rc) (cdr mentry))) ! (setq newsrc (cons (car rc) newsrc)))) ! (setq prev rc ! rc (cdr rc))))) ! ! (setq gnus-newsrc-alist newsrc) ! ;; We make the newsrc hashtb. (gnus-make-hashtable-from-newsrc-alist) ! ;; Finally, if we read some options lines, we parse them. ! (or (string= gnus-newsrc-options "") ! (gnus-newsrc-parse-options gnus-newsrc-options)) ! )) ! ! ;; Parse options lines to find "options -n !all rec.all" and stuff. ! ;; The return value will be a list on the form ! ;; ((regexp1 . ignore) ! ;; (regexp2 . subscribe)...) ! ;; When handling new newsgroups, groups that match a `ignore' regexp ! ;; will be ignored, and groups that match a `subscribe' regexp will be ! ;; subscribed. A line like ! ;; options -n !all rec.all ! ;; will lead to a list that looks like ! ;; (("^rec\\..+" . subscribe) ! ;; ("^.+" . ignore)) ! ;; So all "rec.*" groups will be subscribed, while all the other ! ;; groups will be ignored. Note that "options -n !all rec.all" is very ! ;; different from "options -n rec.all !all". ! (defun gnus-newsrc-parse-options (options) ! (let (out eol) ! (save-excursion ! (gnus-set-work-buffer) ! (insert (regexp-quote options)) ! ;; First we treat all continuation lines. ! (goto-char (point-min)) ! (while (re-search-forward "\n[ \t]+" nil t) ! (replace-match " " t t)) ! ;; Then we transform all "all"s into ".+"s. ! (goto-char (point-min)) ! (while (re-search-forward "\\ball\\b" nil t) ! (replace-match ".+" t t)) ! (goto-char (point-min)) ! ;; We remove all other options than the "-n" ones. ! (while (re-search-forward "[ \t]-[^n][^-]*" nil t) ! (replace-match " ") ! (forward-char -1)) ! (goto-char (point-min)) ! ! ;; We are only interested in "options -n" lines - we ! ;; ignore the other option lines. ! (while (re-search-forward "[ \t]-n" nil t) ! (setq eol ! (or (save-excursion ! (and (re-search-forward "[ \t]-n" (gnus-point-at-eol) t) ! (- (point) 2))) ! (gnus-point-at-eol))) ! ;; Search for all "words"... ! (while (re-search-forward "[^ \t,\n-]+" eol t) ! (if (= (char-after (match-beginning 0)) ?!) ! ;; If the word begins with a bang (!), this is a "not" ! ;; spec. We put this spec (minus the bang) and the ! ;; symbol `ignore' into the list. ! (setq out (cons (cons (concat ! "^" (buffer-substring ! (1+ (match-beginning 0)) ! (match-end 0))) ! 'ignore) out)) ! ;; There was no bang, so this is a "yes" spec. ! (setq out (cons (cons (concat ! "^" (buffer-substring (match-beginning 0) ! (match-end 0))) ! 'subscribe) out))))) ! ! (setq gnus-newsrc-options-n out)))) ! (defun gnus-save-newsrc-file () "Save .newsrc file." *************** *** 12018,12024 **** (buffer-disable-undo (current-buffer)) (erase-buffer) ;; Write options. ! (if gnus-newsrc-options (insert "options " gnus-newsrc-options "\n")) ;; Write subscribed and unsubscribed. (while newsrc (setq info (car newsrc)) --- 12067,12073 ---- (buffer-disable-undo (current-buffer)) (erase-buffer) ;; Write options. ! (if gnus-newsrc-options (insert gnus-newsrc-options)) ;; Write subscribed and unsubscribed. (while newsrc (setq info (car newsrc)) *************** *** 12079,12086 **** (setq group (let ((obarray gnus-description-hashtb)) (read (current-buffer)))) (skip-chars-forward " \t") ! (set group (buffer-substring ! (point) (gnus-point-at-eol))) (forward-line 1)))) (message "Reading descriptions file...done") t)))) --- 12128,12135 ---- (setq group (let ((obarray gnus-description-hashtb)) (read (current-buffer)))) (skip-chars-forward " \t") ! (and (symbolp group) ! (set group (buffer-substring (point) (gnus-point-at-eol)))) (forward-line 1)))) (message "Reading descriptions file...done") t)))) *************** *** 12207,12214 **** (gnus-server-position-cursor)) (defun gnus-server-server-name () ! (let ((server (get-text-property ! (save-excursion (beginning-of-line) (point)) 'gnus-server))) (and server (symbol-name server)))) (defalias 'gnus-server-position-cursor 'gnus-goto-colon) --- 12256,12262 ---- (gnus-server-position-cursor)) (defun gnus-server-server-name () ! (let ((server (get-text-property (gnus-point-at-bol) 'gnus-server))) (and server (symbol-name server)))) (defalias 'gnus-server-position-cursor 'gnus-goto-colon) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/nnmh.el dgnus/lisp/nnmh.el *** pub/dgnus/lisp/nnmh.el Wed May 10 08:34:21 1995 --- dgnus/lisp/nnmh.el Wed May 10 09:20:31 1995 *************** *** 193,198 **** --- 193,199 ---- (setq dir (expand-file-name dir)) ;; Recurse down all directories. (let ((dirs (and (file-readable-p dir) + (> (nth 1 (file-attributes (file-chase-links dir))) 2) (directory-files dir t nil t)))) (while dirs (if (and (not (string-match "/\\.\\.$" (car dirs))) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/nnml.el dgnus/lisp/nnml.el *** pub/dgnus/lisp/nnml.el Wed May 10 08:34:21 1995 --- dgnus/lisp/nnml.el Sat May 13 13:10:38 1995 *************** *** 472,501 **** (defun nnml-get-new-mail () "Read new incoming mail." ! (let (incoming) ! (if (and nnml-get-new-mail nnmail-spool-file ! (file-exists-p nnmail-spool-file) ! (> (nth 7 (file-attributes nnmail-spool-file)) 0)) ! (progn ! (and gnus-verbose-backends ! (message "nnml: Reading incoming mail...")) ! (setq incoming ! (nnmail-move-inbox nnmail-spool-file ! (concat nnml-directory "Incoming"))) ! (nnml-request-list) ! (setq nnml-group-alist (nnmail-get-active)) ! (nnmail-split-incoming incoming 'nnml-save-mail) ! (nnmail-save-active nnml-group-alist nnml-active-file) ! (nnml-save-nov) ! (run-hooks 'nnmail-read-incoming-hook) ! ;; The following has been commented away, just to make sure ! ;; that nobody ever loses any mail. If you feel safe that ! ;; nnml will never do anything strange, just remove those ! ;; two semicolons, and avoid having lots of "Incoming*" ! ;; files. ! ;; (delete-file incoming) ! (and gnus-verbose-backends ! (message "nnml: Reading incoming mail...done")))))) (defun nnml-add-nov (group article line) --- 472,514 ---- (defun nnml-get-new-mail () "Read new incoming mail." ! (let ((spools (if (listp nnmail-spool-file) nnmail-spool-file ! (list nnmail-spool-file))) ! incoming) ! (if (or (not nnml-get-new-mail) (not nnmail-spool-file)) ! () ! ;; We first activate all the groups. ! (nnml-request-list) ! (setq nnml-group-alist (nnmail-get-active)) ! ;; The we go through all the existing spool files and split the ! ;; mail from each. ! (while spools ! (and ! (file-exists-p (car spools)) ! (> (nth 7 (file-attributes (car spools))) 0) ! (progn ! (and gnus-verbose-backends ! (message "nnml: Reading incoming mail...")) ! (setq incoming ! (nnmail-move-inbox ! (car spools) (concat nnml-directory "Incoming"))) ! (nnmail-split-incoming incoming 'nnml-save-mail) ! ;; The following has been commented away, just to make sure ! ;; that nobody ever loses any mail. If you feel safe that ! ;; nnml will never do anything strange, just remove those ! ;; two semicolons, and avoid having lots of "Incoming*" ! ;; files. ! ;; (delete-file incoming) ! )) ! (setq spools (cdr spools))) ! ;; If we did indeed read any incoming spools, we save all info. ! (if incoming ! (progn ! (nnmail-save-active nnml-group-alist nnml-active-file) ! (nnml-save-nov) ! (run-hooks 'nnmail-read-incoming-hook) ! (and gnus-verbose-backends ! (message "nnml: Reading incoming mail...done"))))))) (defun nnml-add-nov (group article line) diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/lisp/nnspool.el dgnus/lisp/nnspool.el *** pub/dgnus/lisp/nnspool.el Wed May 10 08:34:21 1995 --- dgnus/lisp/nnspool.el Wed May 10 09:03:51 1995 *************** *** 32,38 **** (defvar nnspool-inews-program news-inews-program "Program to post news.") ! (defvar nnspool-inews-switches '("-h") "Switches for nnspool-request-post to pass to `inews' for posting news.") (defvar nnspool-spool-directory news-path --- 32,38 ---- (defvar nnspool-inews-program news-inews-program "Program to post news.") ! (defvar nnspool-inews-switches '("-S" "-h") "Switches for nnspool-request-post to pass to `inews' for posting news.") (defvar nnspool-spool-directory news-path diff --exclude=*.elc --exclude=*~ --exclude=*-[0-9] --exclude=gnus --exclude=readme --context --recursive pub/dgnus/texi/gnus.texi dgnus/texi/gnus.texi *** pub/dgnus/texi/gnus.texi Wed May 10 08:34:25 1995 --- dgnus/texi/gnus.texi Sat May 13 15:02:19 1995 *************** *** 965,970 **** --- 965,975 ---- (@code{gnus-group-first-unread-group}). @end table + @vindex gnus-group-goto-unread + If @code{gnus-group-goto-unread} is @code{nil}, all the movement + commands will move to the next group, not the next unread group. Even + the commands that say they move to the next unread group. + @node Selecting a Group @section Selecting a Group @cindex group selection *************** *** 1834,1839 **** --- 1839,1850 ---- expire the final article in a mail newsgroup. This is to make life easier for procmail users. + By the way, that line up there about Gnus never expiring non-expirable + articles is a lies. If you put @code{total-expire} in the group + parameters, articles will not be marked as expirable, but all read + articles will be put through the expiry process. Use with extreme + caution. + @node Not Reading Mail @subsubsection Not Reading Mail *************** *** 2076,2081 **** --- 2087,2098 ---- If this symbol is present in the group parameter list, all articles that are read will be marked as expirable. For an alternative approach, @xref{Expiring Old Mail Articles}. + + @item total-expire + @cindex total-expire + If this symbol is present, all read articles will be put through the + expiry process, even if they are not marked as expirable. Use with + caution. @end table If you want to change the group parameters (or anything else of the *************** *** 4497,4502 **** --- 4514,4523 ---- @kindex V s d (Summary) @findex gnus-summary-sort-by-date Sort by date (@code{gnus-summary-sort-by-date}). + @item V s i + @kindex V s i (Summary) + @findex gnus-summary-sort-by-score + Sort by date (@code{gnus-summary-sort-by-score}). @end table These functions will work both when you use threading and when you don't *************** *** 5944,5949 **** --- 5965,5974 ---- strips you may carry on all you like in the normal fashion. The number following @code{horizontal} says what percentage of the screen is to be given to this strip. + + For each horizontal split, there @emph{must} be one element that has the + 100% tag. The splitting is never accurate, and this buffer will eat any + leftover lines from the splits. Here's a list of all possible keys: