From 8907a52807b0667253c0da9307d9ebca62e7e23d Mon Sep 17 00:00:00 2001 From: shuhei-k Date: Tue, 28 Jul 1998 17:41:51 +0000 Subject: [PATCH] Sync up with Gnus 5.6.27. --- lisp/ChangeLog | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lisp/gnus-agent.el | 22 ++++++-- lisp/gnus-art.el | 9 +-- lisp/gnus-group.el | 19 +++---- lisp/gnus-msg.el | 24 ++++---- lisp/gnus-salt.el | 5 +- lisp/gnus-score.el | 10 +++- lisp/gnus-soup.el | 3 +- lisp/gnus-start.el | 6 +- lisp/gnus-sum.el | 44 +++++++++------ lisp/gnus-topic.el | 16 ++++-- lisp/gnus-util.el | 7 +++ lisp/gnus-uu.el | 50 ++++++++--------- lisp/gnus.el | 14 ++++- lisp/message.el | 11 +++- lisp/nnagent.el | 13 +++-- lisp/nndir.el | 2 +- lisp/nnmail.el | 7 ++- lisp/nntp.el | 31 ++++++----- lisp/nnvirtual.el | 11 +++- make.bat | 6 +- texi/ChangeLog | 18 ++++++ texi/gnus.texi | 36 ++++++++---- texi/message.texi | 6 +- 24 files changed, 388 insertions(+), 140 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 252c5dc..7b41fcb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,161 @@ +Mon Jul 27 03:26:00 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.27 is released. + +1998-07-27 02:27:11 Lars Magne Ingebrigtsen + + * gnus-topic.el (gnus-topic-update-unreads): New function. + + * gnus-sum.el (gnus-summary-limit): Update mode line. + + * gnus-soup.el (gnus-soup-add-article): Update mode line. + + * gnus-group.el (gnus-group-make-menu-bar): Bug. + + * gnus-art.el (gnus-article-make-menu-bar): Menu. + + * gnus-sum.el (gnus-summary-make-menu-bar): Bug reports. + + * gnus-topic.el (gnus-topic-mode-map): h -> H. + +1998-07-19 16:59 Simon Josefsson + + * gnus-util.el (gnus-netrc-syntax-table): @ is whitespace + +1998-07-17 Gordon Matzigkeit + + * gnus-uu.el (gnus-uu-reginize-string): Simplify by looking + from back to front for part numbers, rather than skipping + leading ``version numbers.'' + + (gnus-uu-part-number): Make consistent with + gnus-uu-reginize-string. + +1998-07-26 19:01:58 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-request-article-this-buffer): Pass along + header. + + * gnus-sum.el (gnus-summary-update-article): Don't pass along + iheader to regeneration routine. + +1998-07-26 17:33:03 KOSEKI Yoshinori + + * nnmail.el (nnmail-move-inbox): Nix out password on errors. + +Sat Jul 25 19:31:36 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.26 is released. + +1998-07-25 14:53:24 Lars Magne Ingebrigtsen + + * gnus-salt.el (gnus-pick-mouse-pick-region): Use + gnus-read-event-char. + +Sat Jul 25 02:43:35 1998 Lars Magne Ingebrigtsen + + * gnus.el: Gnus v5.6.25 is released. + +1998-07-25 00:03:24 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-read-ephemeral-group): Ditto. + + * gnus-sum.el (gnus-summary-read-group-1): Ditto. + + * gnus-group.el (gnus-group-read-group): Accept article list. + +1998-07-24 14:35:02 Lars Magne Ingebrigtsen + + * gnus-msg.el (gnus-configure-posting-styles): Quote some. + + * message.el (message-ignored-supersedes-headers): Added X-Trace + and X-Complaints-To. + + * nnmail.el (gnus-util): Required. + +1998-07-21 23:03:13 Lars Magne Ingebrigtsen + + * gnus.el (gnus-news-group-p): Bogosity in params. + +1998-07-21 16:14:32 Robert Bihlmeyer + + * gnus-util.el (gnus-globalify-regexp): New function. + +1998-07-18 21:49:01 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-list-of-unread-articles): Peel off articles + outside active range. + +1998-07-15 10:47:39 Lars Magne Ingebrigtsen + + * nnvirtual.el (nnvirtual-request-type): Handle non-numerical + articles. + + * gnus.el (gnus-news-group-p): Do something sensible with negative + articlies. + +Wed Jul 15 10:27:05 1998 Lars Magne Ingebrigtsen + + * gnus-salt.el (gnus-tree-minimize-window): Allow numbers. + +Wed Jul 15 10:25:29 1998 Lars Magne Ingebrigtsen + + * gnus-agent.el (gnus-agent-expire): Ignored ticks. + +Wed Jul 15 10:15:28 1998 Hallvard B. Furuseth + + * nntp.el (nntp-send-authinfo): Message better and stuff. + +Wed Jul 15 10:10:07 1998 Lars Magne Ingebrigtsen + + * gnus.el (gnus-message-archive-group): Allow sexp. + +Wed Jul 15 09:56:47 1998 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-select-newsgroup): Accept select-articles + para, + +1998-07-13 Mike McEwan + + * gnus-sum.el (gnus-select-newsgroup): Don't call the Agent to + mark articles as read until *all* headers have been retrieved. + +Wed Jul 15 09:06:18 1998 Lars Magne Ingebrigtsen + + * nndir.el (nndir): Use nnml to request article. + +1998-07-11 SL Baur + + * gnus-topic.el (gnus-topic-mode-map): Use modern key syntax. + +Sun Jul 12 04:01:22 1998 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-current-home-score-file): New function. + +1998-07-11 Mike McEwan + + * gnus-agent.el (gnus-agent-fetch-headers): Note last fetched + headers per sesion to aid expiry in `headers only' groups. + + * gnus-agent.el (gnus-agent-expire): Update group info to add + expired articles to list of read articles and prevent + re-fetching. + +1998-07-12 Lars Magne Ingebrigtsen + + * nnmail.el (nnmail-active-file-coding-system): Changed to + binary. + +Sun Jul 12 03:16:18 1998 Lars Magne Ingebrigtsen + + * gnus-score.el (gnus-score-load-file): Specify which alist to + decay. + +1998-07-12 Lars Magne Ingebrigtsen + + * gnus-start.el (gnus-startup-file-coding-system): New variable. + (gnus-read-newsrc-el-file): Use it. + Sat Jul 11 03:03:53 1998 Lars Magne Ingebrigtsen * gnus.el: Gnus v5.6.24 is released. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 2a01d85..a525a0e 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -780,8 +780,11 @@ the actual number of articles toggled is returned." (gnus-make-directory (nnheader-translate-file-chars (file-name-directory file))) (write-region (point-min) (point-max) file nil 'silent) - (gnus-agent-save-alist group articles nil)) - t)))) + (gnus-agent-save-alist group articles nil) + (gnus-agent-enter-history "last-header-fetched-for-session" + (list (cons group (nth (- (length articles) 1) articles))) + (gnus-time-to-day (current-time))) + t))))) (defsubst gnus-agent-copy-nov-line (article) (let (b e) @@ -1303,7 +1306,7 @@ The following commands are available: info (gnus-get-info group) unreads (ignore-errors (gnus-list-of-unread-articles group)) marked (nconc (gnus-uncompress-range - (cdr (assq 'ticked (gnus-info-marks info)))) + (cdr (assq 'tick (gnus-info-marks info)))) (gnus-uncompress-range (cdr (assq 'dormant (gnus-info-marks info))))) @@ -1363,8 +1366,17 @@ The following commands are available: (setcdr prev (setq alist (cdr alist))) (setq prev alist alist (cdr alist)))) - (setq gnus-agent-article-alist (cdr first))) - (gnus-agent-save-alist group)) + (setq gnus-agent-article-alist (cdr first)) + ;;; Mark all articles up to the first article + ;;; in `gnus-article-alist' as read. + (setcar (nthcdr 2 info) + (gnus-range-add + (nth 2 info) (cons 1 (- (caar gnus-agent-article-alist) 1)))) + (gnus-dribble-enter + (concat "(gnus-group-set-info '" + (gnus-prin1-to-string info) + ")")) + (gnus-agent-save-alist group))) expiry-hashtb) (set-buffer history) (setq histories (nreverse (sort histories '<))) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index f2d2b4e..4d26303 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -1843,7 +1843,8 @@ If variable `gnus-use-long-file-name' is non-nil, it is ["Scroll backwards" gnus-article-goto-prev-page t] ["Show summary" gnus-article-show-summary t] ["Fetch Message-ID at point" gnus-article-refer-article t] - ["Mail to address at point" gnus-article-mail t])) + ["Mail to address at point" gnus-article-mail t] + ["Send a bug report" gnus-bug t])) (easy-menu-define gnus-article-treatment-menu gnus-article-mode-map "" @@ -2399,7 +2400,7 @@ If given a prefix, show the hidden text instead." (defun gnus-request-article-this-buffer (article group) "Get an article and insert it into this buffer." - (let (do-update-line) + (let (do-update-line sparse-header) (prog1 (save-excursion (erase-buffer) @@ -2433,7 +2434,7 @@ If given a prefix, show the hidden text instead." (setq do-update-line article) (setq article (mail-header-id header)) (let ((gnus-override-method gnus-refer-article-method)) - (gnus-read-header article)) + (setq sparse-header (gnus-read-header article))) (setq gnus-newsgroup-sparse (delq article gnus-newsgroup-sparse))) ((vectorp header) @@ -2504,7 +2505,7 @@ If given a prefix, show the hidden text instead." (stringp article))) (let ((buf (current-buffer))) (set-buffer gnus-summary-buffer) - (gnus-summary-update-article do-update-line) + (gnus-summary-update-article do-update-line sparse-header) (gnus-summary-goto-subject do-update-line nil t) (set-window-point (get-buffer-window (current-buffer) t) (point)) diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 3d9fc88..a7c0328 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -730,6 +730,7 @@ ticked: The number of ticked articles." ["Read manual" gnus-info-find-node t] ["Flush score cache" gnus-score-flush-cache t] ["Toggle topics" gnus-topic-mode t] + ["Send a bug report" gnus-bug t] ["Exit from Gnus" gnus-group-exit t] ["Exit without saving" gnus-group-quit t])) @@ -1476,7 +1477,7 @@ and with point over the group in question." ;; Selecting groups. -(defun gnus-group-read-group (&optional all no-article group) +(defun gnus-group-read-group (&optional all no-article group select-articles) "Read news in this newsgroup. If the prefix argument ALL is non-nil, already read articles become readable. IF ALL is a number, fetch this number of articles. If the @@ -1507,7 +1508,7 @@ group." (cdr (assq 'tick marked))) (gnus-range-length (cdr (assq 'dormant marked))))))) - no-article nil no-display))) + no-article nil no-display nil select-articles))) (defun gnus-group-select-group (&optional all) "Select this newsgroup. @@ -1574,25 +1575,19 @@ Returns whether the fetching was successful or not." ;; Enter a group that is not in the group buffer. Non-nil is returned ;; if selection was successful. (defun gnus-group-read-ephemeral-group (group method &optional activate - quit-config request-only) + quit-config request-only + select-articles) "Read GROUP from METHOD as an ephemeral group. If ACTIVATE, request the group first. If QUIT-CONFIG, use that window configuration when exiting from the ephemeral group. If REQUEST-ONLY, don't actually read the group; just request it. +If SELECT-ARTICLES, only select those articles. Return the name of the group is selection was successful." ;; Transform the select method into a unique server. (when (stringp method) (setq method (gnus-server-to-method method))) -;;; (let ((saddr (intern (format "%s-address" (car method))))) -;;; (setq method (gnus-copy-sequence method)) -;;; (require (car method)) -;;; (when (boundp saddr) -;;; (unless (assq saddr method) -;;; (nconc method `((,saddr ,(cadr method)))) -;;; (setf (cadr method) (format "%s-%d" (cadr method) -;;; (incf gnus-ephemeral-group-server)))))) (let ((group (if (gnus-group-foreign-p group) group (gnus-group-prefixed-name group method)))) (gnus-sethash @@ -1616,7 +1611,7 @@ Return the name of the group is selection was successful." (if request-only group (condition-case () - (when (gnus-group-read-group t t group) + (when (gnus-group-read-group t t group select-articles) group) ;;(error nil) (quit nil))))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 7d1de92..08a85bd 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -524,7 +524,8 @@ If SILENT, don't prompt the user." ;; Dummy to avoid byte-compile warning. (defvar nnspool-rejected-article-hook) (defvar mule-version) -(defvar xemacs-betaname) +;; (defvar xemacs-betaname) +(defvar emacs-beta-version) (defvar xemacs-codename) (defun gnus-extended-version () @@ -537,23 +538,20 @@ If SILENT, don't prompt the user." (if (featurep 'xemacs) ;; XEmacs (concat - (format " XEmacs/%d.%d%s" emacs-major-version emacs-minor-version - (if (and (boundp 'xemacs-betaname) xemacs-betaname) - (if (string-match "\\`(\\(.*\\))\\'" xemacs-betaname) - (match-string 1 xemacs-betaname) - "") ; unknown format - "")) ; not beta - (if (boundp 'xemacs-codename) + (format " XEmacs/%d.%d" emacs-major-version emacs-minor-version) + (if (and (boundp 'emacs-beta-version) emacs-beta-version) + (format "beta%d" emacs-beta-version) + "") + (if (and (boundp 'xemacs-codename) xemacs-codename) (concat " (" xemacs-codename ")") - "") ; no codename + "") ) ;; not XEmacs (concat (format " Emacs/%d.%d" emacs-major-version emacs-minor-version) (if (and (boundp 'enable-multibyte-characters) enable-multibyte-characters) - ;; Should return " (multibyte)" ? - "" + "" ; Should return " (multibyte)"? " (unibyte)") )) ;; MULE[/VERSION] @@ -1112,8 +1110,8 @@ this is a reply." ;; This is a header to be added to the headers when ;; posting. (when value-value - (make-local-variable message-required-mail-headers) - (make-local-variable message-required-news-headers) + (make-local-variable 'message-required-mail-headers) + (make-local-variable 'message-required-news-headers) (push (cons (car attribute) value-value) message-required-mail-headers) (push (cons (car attribute) value-value) diff --git a/lisp/gnus-salt.el b/lisp/gnus-salt.el index 00ca021..1f881cf 100644 --- a/lisp/gnus-salt.el +++ b/lisp/gnus-salt.el @@ -242,7 +242,7 @@ This must be bound to a button-down mouse event." (let (event end end-point last-end-point (end-of-range (point))) (track-mouse (while (progn - (setq event (read-event)) + (setq event (gnus-read-event-char)) (or (mouse-movement-p event) (eq (car-safe event) 'switch-frame))) (if (eq (car-safe event) 'switch-frame) @@ -379,7 +379,8 @@ This must be bound to a button-down mouse event." "If non-nil, minimize the tree buffer window. If a number, never let the tree buffer grow taller than that number of lines." - :type 'boolean + :type '(choice boolean + integer) :group 'gnus-summary-tree) (defcustom gnus-selected-tree-face 'modeline diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 68f9c69..b7b203d 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1121,7 +1121,7 @@ SCORE is the score to add." (or (not decay) (gnus-decay-scores alist decay))) (gnus-score-set 'touched '(t) alist) - (gnus-score-set 'decay (list (gnus-time-to-day (current-time))))) + (gnus-score-set 'decay (list (gnus-time-to-day (current-time))) alist)) ;; We do not respect eval and files atoms from global score ;; files. (when (and files (not global)) @@ -2792,8 +2792,8 @@ If ADAPT, return the home adaptive file instead." (funcall elem group)) ;; Regexp-file cons ((consp elem) - (when (string-match (car elem) group) - (cadr elem)))))) + (when (string-match (gnus-globalify-regexp (car elem)) group) + (replace-match (cadr elem) t nil group )))))) (when found (nnheader-concat gnus-kill-files-directory found)))) @@ -2813,6 +2813,10 @@ If ADAPT, return the home adaptive file instead." (concat group (if (gnus-use-long-file-name 'not-score) "." "/") gnus-adaptive-file-suffix))) +(defun gnus-current-home-score-file (group) + "Return the \"current\" regular score file." + (car (nreverse (gnus-score-find-alist group)))) + ;;; ;;; Score decays ;;; diff --git a/lisp/gnus-soup.el b/lisp/gnus-soup.el index 0b9b337..fe78c9d 100644 --- a/lisp/gnus-soup.el +++ b/lisp/gnus-soup.el @@ -161,7 +161,8 @@ move those articles instead." (gnus-summary-mark-as-read (car articles) gnus-souped-mark) (setq articles (cdr articles))) (kill-buffer tmp-buf)) - (gnus-soup-save-areas))) + (gnus-soup-save-areas) + (gnus-set-mode-line 'summary))) (defun gnus-soup-pack-packet () "Make a SOUP packet from the SOUP areas." diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 29b6b04..07f2a9a 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -388,6 +388,9 @@ Can be used to turn version control on or off." :group 'gnus-newsrc :type 'boolean) +(defvar gnus-startup-file-coding-system 'binary + "*Coding system for startup file.") + ;;; Internal variables (defvar gnus-newsrc-file-version nil) @@ -1899,7 +1902,8 @@ If FORCE is non-nil, the .newsrc file is read." (gnus-message 5 "Reading %s..." ding-file) (let (gnus-newsrc-assoc) (condition-case nil - (load ding-file t t t) + (let ((coding-system-for-read gnus-startup-file-coding-system)) + (load ding-file t t t)) (error (ding) (unless (gnus-yes-or-no-p diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index a713715..e036b1e 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -1742,6 +1742,7 @@ increase the score of each group you read." ["Edit local kill file" gnus-summary-edit-local-kill t] ["Edit main kill file" gnus-summary-edit-global-kill t] ["Edit group parameters" gnus-summary-edit-parameters t] + ["Send a bug report" gnus-bug t] ("Exit" ["Catchup and exit" gnus-summary-catchup-and-exit t] ["Catchup all and exit" gnus-summary-catchup-and-exit t] @@ -2026,12 +2027,14 @@ The following commands are available: (defun gnus-data-update-list (data offset) "Add OFFSET to the POS of all data entries in DATA." + (setq gnus-newsgroup-data-reverse nil) (while data (setcar (nthcdr 2 (car data)) (+ offset (nth 2 (car data)))) (setq data (cdr data)))) (defun gnus-data-compute-positions () "Compute the positions of all articles." + (setq gnus-newsgroup-data-reverse nil) (let ((data gnus-newsgroup-data) pos) (while data @@ -2514,7 +2517,8 @@ the thread are to be displayed." (set (car elem) (eval (nth 1 elem)))))))) (defun gnus-summary-read-group (group &optional show-all no-article - kill-buffer no-display backward) + kill-buffer no-display backward + select-article) "Start reading news in newsgroup GROUP. If SHOW-ALL is non-nil, already read articles are also listed. If NO-ARTICLE is non-nil, no article is selected initially. @@ -2526,7 +2530,8 @@ If NO-DISPLAY, don't generate a summary buffer." (or (gnus-summary-read-group-1 group show-all no-article kill-buffer no-display) - (setq show-all nil))))) + (setq show-all nil) + select-article)))) (eq gnus-auto-select-next 'quietly)) (set-buffer gnus-group-buffer) ;; The entry function called above goes to the next @@ -2540,7 +2545,8 @@ If NO-DISPLAY, don't generate a summary buffer." result)) (defun gnus-summary-read-group-1 (group show-all no-article - kill-buffer no-display) + kill-buffer no-display + &optional select-articles) ;; Killed foreign groups can't be entered. (when (and (not (gnus-group-native-p group)) (not (gnus-gethash group gnus-newsrc-hashtb))) @@ -2548,7 +2554,8 @@ If NO-DISPLAY, don't generate a summary buffer." (gnus-message 5 "Retrieving newsgroup: %s..." group) (let* ((new-group (gnus-summary-setup-buffer group)) (quit-config (gnus-group-quit-config group)) - (did-select (and new-group (gnus-select-newsgroup group show-all)))) + (did-select (and new-group (gnus-select-newsgroup + group show-all select-articles)))) (cond ;; This summary buffer exists already, so we just select it. ((not new-group) @@ -3189,7 +3196,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (defun gnus-summary-update-article (article &optional iheader) "Update ARTICLE in the summary buffer." (set-buffer gnus-summary-buffer) - (let* ((header (or iheader (gnus-summary-article-header article))) + (let* ((header (gnus-summary-article-header article)) (id (mail-header-id header)) (data (gnus-data-find article)) (thread (gnus-id-to-thread id)) @@ -3206,12 +3213,11 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise." (number (mail-header-number header)) pos) (when thread - ;; !!! Should this be in or not? (unless iheader - (setcar thread nil)) - (when parent - (delq thread parent)) - (if (gnus-summary-insert-subject id header iheader) + (setcar thread nil) + (when parent + (delq thread parent))) + (if (gnus-summary-insert-subject id header) ;; Set the (possibly) new article number in the data structure. (gnus-data-set-number data (gnus-id-to-article id)) (setcar thread old) @@ -3833,9 +3839,10 @@ or a straight list of headers." (cdr (assq number gnus-newsgroup-scored)) (memq number gnus-newsgroup-processable)))))) -(defun gnus-select-newsgroup (group &optional read-all) +(defun gnus-select-newsgroup (group &optional read-all select-articles) "Select newsgroup GROUP. -If READ-ALL is non-nil, all articles in the group are selected." +If READ-ALL is non-nil, all articles in the group are selected. +If SELECT-ARTICLES, only select those articles from GROUP." (let* ((entry (gnus-gethash group gnus-newsrc-hashtb)) ;;!!! Dirty hack; should be removed. (gnus-summary-ignore-duplicates @@ -3887,7 +3894,7 @@ If READ-ALL is non-nil, all articles in the group are selected." (unless (gnus-ephemeral-group-p gnus-newsgroup-name) (gnus-group-update-group group)) - (setq articles (gnus-articles-to-read group read-all)) + (setq articles (or select-articles (gnus-articles-to-read group read-all))) (cond ((null articles) @@ -3937,15 +3944,15 @@ If READ-ALL is non-nil, all articles in the group are selected." ;; Removed marked articles that do not exist. (gnus-update-missing-marks (gnus-sorted-complement fetched-articles articles)) - ;; Let the Gnus agent mark articles as read. - (when gnus-agent - (gnus-agent-get-undownloaded-list)) ;; We might want to build some more threads first. (when (and gnus-fetch-old-headers (eq gnus-headers-retrieved-by 'nov)) (if (eq gnus-fetch-old-headers 'invisible) (gnus-build-all-threads) (gnus-build-old-threads))) + ;; Let the Gnus agent mark articles as read. + (when gnus-agent + (gnus-agent-get-undownloaded-list)) ;; Check whether auto-expire is to be done in this group. (setq gnus-newsgroup-auto-expire (gnus-group-auto-expirable-p group)) @@ -4901,12 +4908,12 @@ displayed, no centering will be performed." ;; first unread article is the article after the last read ;; article. Sounds logical, doesn't it? (if (not (listp (cdr read))) - (setq first (1+ (cdr read))) + (setq first (max (car active) (1+ (cdr read)))) ;; `read' is a list of ranges. (when (/= (setq nlast (or (and (numberp (car read)) (car read)) (caar read))) 1) - (setq first 1)) + (setq first (car active))) (while read (when first (while (< first nlast) @@ -6152,6 +6159,7 @@ If ALL, mark even excluded ticked and dormants as read." ;; after the current one. (goto-char (point-max)) (gnus-summary-find-prev)) + (gnus-set-mode-line 'summary) ;; We return how many articles were removed from the summary ;; buffer as a result of the new limit. (- total (length gnus-newsgroup-data)))) diff --git a/lisp/gnus-topic.el b/lisp/gnus-topic.el index e9f7ee5..108f3bc 100644 --- a/lisp/gnus-topic.el +++ b/lisp/gnus-topic.el @@ -74,6 +74,7 @@ with some simple extensions. (defvar gnus-topic-active-topology nil) (defvar gnus-topic-active-alist nil) +(defvar gnus-topic-unreads nil) (defvar gnus-topology-checked-p nil "Whether the topology has been checked in this session.") @@ -109,9 +110,7 @@ with some simple extensions. (defun gnus-topic-unread (topic) "Return the number of unread articles in TOPIC." - (or (save-excursion - (and (gnus-topic-goto-topic topic) - (gnus-group-topic-unread))) + (or (cdr (assoc topic gnus-topic-unreads)) 0)) (defun gnus-group-topic-p () @@ -472,6 +471,7 @@ articles in the topic and its subtopics." (car type) visiblep (not (eq (nth 2 type) 'hidden)) level all-entries unread)) + (gnus-topic-update-unreads (car type) unread) (goto-char end) unread)) @@ -528,6 +528,7 @@ articles in the topic and its subtopics." (number-of-groups (length entries)) (active-topic (eq gnus-topic-alist gnus-topic-active-alist)) gnus-tmp-header) + (gnus-topic-update-unreads name unread) (beginning-of-line) ;; Insert the text. (gnus-add-text-properties @@ -540,6 +541,11 @@ articles in the topic and its subtopics." 'gnus-active active-topic 'gnus-topic-visible visiblep)))) +(defun gnus-topic-update-unreads (topic unreads) + (setq gnus-topic-unreads (delq (assoc topic gnus-topic-unreads) + gnus-topic-unreads)) + (push (cons topic unreads) gnus-topic-unreads)) + (defun gnus-topic-update-topics-containing-group (group) "Update all topics that have GROUP as a member." (when (and (eq major-mode 'gnus-group-mode) @@ -905,7 +911,7 @@ articles in the topic and its subtopics." "#" gnus-topic-mark-topic "\M-#" gnus-topic-unmark-topic [tab] gnus-topic-indent - [M-tab] gnus-topic-unindent + [(meta tab)] gnus-topic-unindent gnus-mouse-2 gnus-mouse-pick-topic) ;; Define a new submap. @@ -925,7 +931,7 @@ articles in the topic and its subtopics." "r" gnus-topic-rename "\177" gnus-topic-delete [delete] gnus-topic-delete - "h" gnus-topic-toggle-display-empty-topics) + "H" gnus-topic-toggle-display-empty-topics) (gnus-define-keys (gnus-topic-sort-map "S" gnus-group-topic-map) "s" gnus-topic-sort-groups diff --git a/lisp/gnus-util.el b/lisp/gnus-util.el index 23dd313..826c8ec 100644 --- a/lisp/gnus-util.el +++ b/lisp/gnus-util.el @@ -857,6 +857,7 @@ ARG is passed to the first function." (defvar gnus-netrc-syntax-table (let ((table (copy-syntax-table text-mode-syntax-table))) + (modify-syntax-entry ?@ "w" table) (modify-syntax-entry ?- "w" table) (modify-syntax-entry ?_ "w" table) (modify-syntax-entry ?! "w" table) @@ -977,6 +978,12 @@ ARG is passed to the first function." (error "Not a symbol: %s" alist)) `(setq ,alist (delq (assq ,key ,alist) ,alist))) +(defun gnus-globalify-regexp (re) + "Returns a regexp that matches a whole line, iff RE matches a part of it." + (concat (unless (string-match "^\\^" re) "^.*") + re + (unless (string-match "\\$$" re) ".*$"))) + (provide 'gnus-util) ;;; gnus-util.el ends here diff --git a/lisp/gnus-uu.el b/lisp/gnus-uu.el index 3a0bf91..7d7cc8a 100644 --- a/lisp/gnus-uu.el +++ b/lisp/gnus-uu.el @@ -1020,43 +1020,34 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-uu-reginize-string (string) ;; Takes a string and puts a \ in front of every special character; - ;; ignores any leading "version numbers" thingies that they use in - ;; the comp.binaries groups, and either replaces anything that looks - ;; like "2/3" with "[0-9]+/[0-9]+" or, if it can't find something - ;; like that, replaces the last two numbers with "[0-9]+". This, in - ;; my experience, should get most postings of a series. - (let ((count 2) - (vernum "v[0-9]+[a-z][0-9]+:") - beg) + ;; replaces the last thing that looks like "2/3" with "[0-9]+/[0-9]+" + ;; or, if it can't find something like that, tries "2 of 3", then + ;; finally just replaces the last two numbers with "[0-9]+". + (let ((count 2)) (save-excursion (set-buffer (get-buffer-create gnus-uu-output-buffer-name)) (buffer-disable-undo (current-buffer)) (erase-buffer) (insert (regexp-quote string)) - (setq beg 1) (setq case-fold-search nil) - (goto-char (point-min)) - (when (looking-at vernum) - (replace-match vernum t t) - (setq beg (length vernum))) - (goto-char beg) - (if (re-search-forward "[ \t]*[0-9]+/[0-9]+" nil t) - (replace-match " [0-9]+/[0-9]+") + (end-of-line) + (if (re-search-backward "\\([^0-9]\\)[0-9]+/[0-9]+" nil t) + (replace-match "\\1[0-9]+/[0-9]+") - (goto-char beg) - (if (re-search-forward "[0-9]+[ \t]*of[ \t]*[0-9]+" nil t) - (replace-match "[0-9]+ of [0-9]+") + (end-of-line) + (if (re-search-backward "\\([^0-9]\\)[0-9]+[ \t]*of[ \t]*[0-9]+" nil t) + (replace-match "\\1[0-9]+ of [0-9]+") (end-of-line) (if (re-search-backward "\\([^0-9]\\)[0-9]+\\([^0-9]+\\)[0-9]+" nil t) (replace-match "\\1[0-9]+\\2[0-9]+" t nil nil nil)))) - (goto-char beg) + (goto-char 1) (while (re-search-forward "[ \t]+" nil t) - (replace-match "[ \t]*" t t)) + (replace-match "[ \t]+" t t)) (buffer-substring 1 (point-max))))) @@ -1357,11 +1348,18 @@ didn't work, and overwrite existing files. Otherwise, ask each time." (defun gnus-uu-part-number (article) (let* ((header (gnus-summary-article-header article)) - (subject (and header (mail-header-subject header)))) - (if (and subject - (string-match "[0-9]+ */[0-9]+\\|[0-9]+ * of *[0-9]+" subject)) - (match-string 0 subject) - ""))) + (subject (and header (mail-header-subject header))) + (part nil)) + (if subject + (while (string-match "[0-9]+/[0-9]+\\|[0-9]+[ \t]+of[ \t]+[0-9]+" + subject) + (setq part (match-string 0 subject)) + (setq subject (substring subject (match-end 0))))) + (or part + (while (string-match "\\([0-9]+\\)[^0-9]+\\([0-9]+\\)" subject) + (setq part (match-string 0 subject)) + (setq subject (substring subject (match-end 0))))) + (or part ""))) (defun gnus-uu-uudecode-sentinel (process event) (delete-process (get-process process))) diff --git a/lisp/gnus.el b/lisp/gnus.el index 5cbfa6a..008f69a 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -253,11 +253,11 @@ is restarted, and sometimes reloaded." (defconst gnus-product-name "Shoe-gnus" "Product name of this version of gnus.") -(defconst gnus-version-number "6.8.2" +(defconst gnus-version-number "6.8.3" "Version number for this version of gnus.") (defconst gnus-version - (format "%s %s (based on Gnus 5.6.24; for SEMI 1.8, FLIM 1.8/1.9)" + (format "%s %s (based on Gnus 5.6.27; for SEMI 1.8, FLIM 1.8/1.9)" gnus-product-name gnus-version-number) "Version string for this version of gnus.") @@ -843,6 +843,7 @@ that case, just return a fully prefixed name of the group -- \"nnml+private:mail.misc\", for instance." :group 'gnus-message :type '(choice (const :tag "none" nil) + sexp string)) (defcustom gnus-secondary-servers nil @@ -2178,7 +2179,14 @@ that that variable is buffer-local to the summary buffers." "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) 'news)))) + (if (or (null article) + (not (< article 0))) + (eq (gnus-request-type group article) 'news) + (if (not (vectorp article)) + nil + ;; It's a real article. + (eq (gnus-request-type group (mail-header-id article)) + 'news)))))) ;; Returns a list of writable groups. (defun gnus-writable-groups () diff --git a/lisp/message.el b/lisp/message.el index 69a8593..a30d68e 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -3027,7 +3027,13 @@ Headers already prepared in the buffer are not modified." (setq header (car elem))) (setq header elem)) (when (or (not (re-search-forward - (concat "^" (downcase (symbol-name header)) ":") + (concat "^" + (regexp-quote + (downcase + (if (stringp header) + header + (symbol-name header)))) + ":") nil t)) (progn ;; The header was found. We insert a space after the @@ -3069,7 +3075,8 @@ Headers already prepared in the buffer are not modified." (progn ;; This header didn't exist, so we insert it. (goto-char (point-max)) - (insert (symbol-name header) ": " value "\n") + (insert (if (stringp header) header (symbol-name header)) + ": " value "\n") (forward-line -1)) ;; The value of this header was empty, so we clear ;; totally and insert the new value. diff --git a/lisp/nnagent.el b/lisp/nnagent.el index b42ddf9..714a07a 100644 --- a/lisp/nnagent.el +++ b/lisp/nnagent.el @@ -94,12 +94,13 @@ (t nil)))) (defun nnagent-request-type (group article) - (let ((gnus-plugged t)) - (if (not (gnus-check-backend-function - 'request-type (car gnus-command-method))) - 'unknown - (funcall (gnus-get-function gnus-command-method 'request-type) - (gnus-group-real-name group) article)))) + (unless (stringp article) + (let ((gnus-plugged t)) + (if (not (gnus-check-backend-function + 'request-type (car gnus-command-method))) + 'unknown + (funcall (gnus-get-function gnus-command-method 'request-type) + (gnus-group-real-name group) article))))) (deffoo nnagent-request-newgroups (date server) nil) diff --git a/lisp/nndir.el b/lisp/nndir.el index d9e5c56..5a32cbd 100644 --- a/lisp/nndir.el +++ b/lisp/nndir.el @@ -88,7 +88,7 @@ (nnoo-map-functions nndir (nnml-retrieve-headers 0 nndir-current-group 0 0) - (nnmh-request-article 0 nndir-current-group 0 0) + (nnml-request-article 0 nndir-current-group 0 0) (nnmh-request-group nndir-current-group 0 0) (nnml-close-group nndir-current-group 0) (nnmh-request-list (nnoo-current-server 'nndir) nndir-directory) diff --git a/lisp/nnmail.el b/lisp/nnmail.el index e70b065..4888255 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -31,6 +31,7 @@ (require 'timezone) (require 'message) (require 'custom) +(require 'gnus-util) (eval-and-compile (autoload 'gnus-error "gnus-util") @@ -658,6 +659,9 @@ parameter. It should return nil, `warn' or `delete'." (set-file-modes tofile nnmail-default-file-modes)))) ;; Probably a real error. + ;; We nix out the password in case the error + ;; was because of a wrong password being given. + (setq nnmail-internal-password nil) (subst-char-in-region (point-min) (point-max) ?\n ?\ ) (goto-char (point-max)) (skip-chars-backward " \t") @@ -693,8 +697,7 @@ nn*-request-list should have been called before calling this function." group-assoc))) group-assoc)) -(defvar nnmail-active-file-coding-system - 'iso-8859-1 +(defvar nnmail-active-file-coding-system 'binary "*Coding system for active file.") (defun nnmail-save-active (group-assoc file-name) diff --git a/lisp/nntp.el b/lisp/nntp.el index 970f56b..cb06d09 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -754,32 +754,33 @@ If SEND-IF-FORCE, only send authinfo to the server if the (let* ((list (gnus-parse-netrc nntp-authinfo-file)) (alist (gnus-netrc-machine list nntp-address)) (force (gnus-netrc-get alist "force")) - (user (gnus-netrc-get alist "login")) + (user (or (gnus-netrc-get alist "login") nntp-authinfo-user)) (passwd (gnus-netrc-get alist "password"))) (when (or (not send-if-force) force) - (nntp-send-command - "^3.*\r?\n" "AUTHINFO USER" - (or user - nntp-authinfo-user - (setq nntp-authinfo-user - (read-string (format "NNTP (%s) user name: " nntp-address))))) + (unless user + (setq user (read-string (format "NNTP (%s) user name: " nntp-address)) + nntp-authinfo-user user)) + (unless (member user '(nil "")) + (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user) + (when t ;???Should check if AUTHINFO succeeded (nntp-send-command "^2.*\r?\n" "AUTHINFO PASS" (or passwd nntp-authinfo-password (setq nntp-authinfo-password - (nnmail-read-passwd (format "NNTP (%s) password: " - nntp-address)))))))) + (nnmail-read-passwd (format "NNTP (%s@%s) password: " + user nntp-address)))))))))) (defun nntp-send-nosy-authinfo () "Send the AUTHINFO to the nntp server." - (nntp-send-command - "^3.*\r?\n" "AUTHINFO USER" - (read-string (format "NNTP (%s) user name: " nntp-address))) - (nntp-send-command - "^2.*\r?\n" "AUTHINFO PASS" - (nnmail-read-passwd "NNTP (%s) password: " nntp-address))) + (let ((user (read-string (format "NNTP (%s) user name: " nntp-address)))) + (unless (member user '(nil "")) + (nntp-send-command "^3.*\r?\n" "AUTHINFO USER" user) + (when t ;???Should check if AUTHINFO succeeded + (nntp-send-command "^2.*\r?\n" "AUTHINFO PASS" + (nnmail-read-passwd "NNTP (%s@%s) password: " + user nntp-address)))))) (defun nntp-send-authinfo-from-file () "Send the AUTHINFO to the nntp server. diff --git a/lisp/nnvirtual.el b/lisp/nnvirtual.el index d83356d..cc86c1a 100644 --- a/lisp/nnvirtual.el +++ b/lisp/nnvirtual.el @@ -272,9 +272,14 @@ to virtual article number.") (deffoo nnvirtual-request-type (group &optional article) (if (not article) 'unknown - (let ((mart (nnvirtual-map-article article))) - (when mart - (gnus-request-type (car mart) (cdr mart)))))) + (if (numberp article) + (let ((mart (nnvirtual-map-article article))) + (if mart + (gnus-request-type (car mart) (cdr mart)))) + (let ((method (gnus-find-method-for-group + nnvirtual-last-accessed-component-group))) + (gnus-request-type + nnvirtual-last-accessed-component-group nil))))) (deffoo nnvirtual-request-update-mark (group article mark) (let* ((nart (nnvirtual-map-article article)) diff --git a/make.bat b/make.bat index 6f422da..d183af9 100755 --- a/make.bat +++ b/make.bat @@ -31,8 +31,8 @@ copy *.el* %1\lisp :info cd ..\texi -call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -fsave-buffer -call %1\bin\emacs.bat -batch -q -no-site-file message.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -fsave-buffer +call %1\bin\emacs.bat -batch -q -no-site-file gnus.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer +call %1\bin\emacs.bat -batch -q -no-site-file message.texi -l texinfmt -f texinfo-every-node-update -f texinfo-format-buffer -f save-buffer if not "%2" == "copy" goto done copy gnus %1\info copy gnus-?? %1\info @@ -47,7 +47,7 @@ cd .. goto end :usage -echo Usage: install ^ [copy] +echo Usage: make ^ [copy] echo. echo where: ^ is the directory you installed emacs in echo eg. d:\emacs\19.34 diff --git a/texi/ChangeLog b/texi/ChangeLog index f54aabe..386b9b1 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,21 @@ +1998-07-21 17:51 Simon Josefsson + + * gnus.texi (Splitting Mail): junk is fancy splitting only + + * gnus.texi (Fancy Mail Splitting): warn about junk + +1998-07-27 02:28:33 Lars Magne Ingebrigtsen + + * gnus.texi (Topic Commands): Fix. + +1998-07-27 02:23:17 Robert Bihlmeyer + + * gnus.texi (Score Decays): Fix. + +Sun Jul 12 04:03:27 1998 Lars Magne Ingebrigtsen + + * gnus.texi (Home Score File): Addition. + Fri Jul 10 04:26:23 1998 Lars Magne Ingebrigtsen * gnus.texi (NNTP): Addition. diff --git a/texi/gnus.texi b/texi/gnus.texi index 1a46d94..962f2a2 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -2683,8 +2683,8 @@ Move all groups that match some regular expression to a topic Copy all groups that match some regular expression to a topic (@code{gnus-topic-copy-matching}). -@item T h -@kindex T h (Topic) +@item T H +@kindex T H (Topic) @findex gnus-topic-toggle-display-empty-topics Toggle hiding empty topics (@code{gnus-topic-toggle-display-empty-topics}). @@ -9369,10 +9369,6 @@ insert sub-expressions from the matched text. For instance: ("list.\\1" "From:.*\\(.*\\)-list@@majordomo.com") @end lisp -If the first element is the special symbol @code{junk}, then messages -that match the regexp will disappear into the aether. Use with -extreme caution. - The second element can also be a function. In that case, it will be called narrowed to the headers with the first element of the rule as the argument. It should return a non-@code{nil} value if it thinks that the @@ -9644,7 +9640,7 @@ be stored in one or more groups. @item @code{junk}: If the split is the symbol @code{junk}, then don't save -this message. +this message. Use with extreme caution. @item @var{(: function arg1 arg2 ...)}: If the split is a list, and the first @@ -11120,6 +11116,7 @@ groups. @subsection Virtual Groups @cindex nnvirtual @cindex virtual groups +@cindex merging groups An @dfn{nnvirtual group} is really nothing more than a collection of other groups. @@ -12785,12 +12782,22 @@ So, if you want to use just a single score file, you could say: If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say: +@findex gnus-hierarchial-home-score-file @lisp (setq gnus-home-score-file 'gnus-hierarchial-home-score-file) @end lisp This is a ready-made function provided for your convenience. +Other functions include + +@table @code +@item gnus-current-home-score-file +@findex gnus-current-home-score-file +Return the ``current'' regular score file. This will make scoring +commands add entry to the ``innermost'' matching score file. + +@end table If you want to have one score file for the @samp{emacs} groups and another for the @samp{comp} groups, while letting all other groups use @@ -13498,12 +13505,12 @@ use them in any sensible way. @vindex gnus-decay-scores @findex gnus-decay-score -@vindex gnus-score-decay-function +@vindex gnus-decay-score-function Gnus provides a mechanism for decaying scores to help with this problem. When score files are loaded and @code{gnus-decay-scores} is non-@code{nil}, Gnus will run the score files through the decaying mechanism thereby lowering the scores of all non-permanent score rules. -The decay itself if performed by the @code{gnus-score-decay-function} +The decay itself if performed by the @code{gnus-decay-score-function} function, which is @code{gnus-decay-score} by default. Here's the definition of that function: @@ -15378,7 +15385,7 @@ On July 28th 1996 work on Red Gnus was begun, and it was released on January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases). On September 13th 1997, Quassia Gnus was started and lasted 37 -releases. If was released as ``Gnus 5.6.24' on March 8th 1998. +releases. If was released as ``Gnus 5.6.27' on March 8th 1998. If you happen upon a version of Gnus that has a prefixed name -- ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'' -- @@ -15855,7 +15862,7 @@ actually are people who are using Gnus. Who'd'a thunk it! * ding Gnus:: New things in Gnus 5.0/5.1, the first new Gnus. * September Gnus:: The Thing Formally Known As Gnus 5.3/5.3. * Red Gnus:: Third time best---Gnus 5.4/5.5. -* Quassia Gnus:: Two times two is four, or Gnus 5.6.24. +* Quassia Gnus:: Two times two is four, or Gnus 5.6.27. @end menu These lists are, of course, just @emph{short} overviews of the @@ -16390,7 +16397,7 @@ Emphasized text can be properly fontisized: @node Quassia Gnus @subsubsection Quassia Gnus -New features in Gnus 5.6.24: +New features in Gnus 5.6.27: @itemize @bullet @@ -17706,6 +17713,11 @@ with unread articles, even if that group is hidden in a topic. gnus-posting-styles doesn't work in drafts. @item +gnus-summary-limit-include-cached is slow when there are +many articles in the cache, since it regenerates big parts of the +summary buffer for each article. + +@item Solve the halting problem. @c TODO diff --git a/texi/message.texi b/texi/message.texi index 9aa2df7..cb8a914 100644 --- a/texi/message.texi +++ b/texi/message.texi @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @setfilename message -@settitle Message 5.6.24 Manual +@settitle Message 5.6.27 Manual @synindex fn cp @synindex vr cp @synindex pg cp @@ -42,7 +42,7 @@ into another language, under the above conditions for modified versions. @tex @titlepage -@title Message 5.6.24 Manual +@title Message 5.6.27 Manual @author by Lars Magne Ingebrigtsen @page @@ -83,7 +83,7 @@ Message mode buffers. * Key Index:: List of Message mode keys. @end menu -This manual corresponds to Message 5.6.24. Message is distributed with +This manual corresponds to Message 5.6.27. Message is distributed with the Gnus distribution bearing the same version number as this manual has. -- 1.7.10.4