From 93c4d14a76977c0b62e659c88cfef895fdb1b5ed Mon Sep 17 00:00:00 2001 From: yamaoka Date: Sun, 5 Jan 2003 12:09:44 +0000 Subject: [PATCH] Synch with Oort Gnus. --- lisp/ChangeLog | 12 ++++++++++++ lisp/gnus-group.el | 14 ++++++++++++++ lisp/gnus-msg.el | 2 +- lisp/gnus-sum.el | 3 ++- lisp/message.el | 16 +++++++++++++++- texi/ChangeLog | 1 + texi/gnus-ja.texi | 3 +++ texi/gnus.texi | 3 +++ 8 files changed, 51 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 11fbe7a..c7d2524 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,18 @@ 2003-01-05 Lars Magne Ingebrigtsen + * gnus-msg.el (gnus-inews-make-draft): Quote article-reply. + + * gnus-group.el (gnus-number-of-unseen-articles-in-group): + Protect against unactive groups. + + * message.el (message-check-news-header-syntax): Check long + header lines. + (message-check-news-header-syntax): Update `start'. + * gnus-group.el (gnus-group-expire-articles): Doc fix. + (gnus-group-line-format): %U. + (gnus-group-line-format-alist): ?U. + (gnus-number-of-unseen-articles-in-group): New function. * nntp.el (nntp-accept-process-output): Use a 0.1 second timeout. diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index e1a5caf..a1b7b42 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -156,6 +156,7 @@ with some simple extensions. %i Number of ticked and dormant (integer) %T Number of ticked articles (integer) %R Number of read articles (integer) +%U Number of unseen articles (integer) %t Estimated total number of articles (integer) %y Number of unread, unticked articles (integer) %G Group name (string) @@ -471,6 +472,7 @@ simple manner.") (gnus-range-length (cdr (assq 'tick gnus-tmp-marked)))))) (t number)) ?s) (?R gnus-tmp-number-of-read ?s) + (?U (gnus-number-of-unseen-articles-in-group gnus-tmp-group) ?s) (?t gnus-tmp-number-total ?d) (?y gnus-tmp-number-of-unread ?s) (?I (gnus-range-length (cdr (assq 'dormant gnus-tmp-marked))) ?d) @@ -1348,6 +1350,18 @@ if it is a string, only list groups matching REGEXP." nil) (gnus-method-simplify (gnus-find-method-for-group group)))))) +(defun gnus-number-of-unseen-articles-in-group (group) + (let* ((info (nth 2 (gnus-group-entry group))) + (marked (gnus-info-marks info)) + (seen (cdr (assq 'seen marked))) + (active (gnus-active group))) + (if (not active) + 0 + (length (gnus-uncompress-range + (gnus-range-difference + (gnus-range-difference (list active) (gnus-info-read info)) + seen)))))) + (defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level gnus-tmp-marked number gnus-tmp-method) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index ca39927..80a455c 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -388,7 +388,7 @@ Thank you for your help in stamping out bugs. (defun gnus-inews-make-draft () `(lambda () (gnus-inews-make-draft-meta-information - ,gnus-newsgroup-name ,gnus-article-reply))) + ,gnus-newsgroup-name ',gnus-article-reply))) (defvar gnus-article-reply nil) (defmacro gnus-setup-message (config &rest forms) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 9ea1efc..6dace4b 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -6708,7 +6708,8 @@ Returns the article selected or nil if there are no unread articles." (let ((data gnus-newsgroup-data)) (while (and data (and (not (and undownloaded - (memq (car data) gnus-newsgroup-undownloaded))) + (memq (car data) + gnus-newsgroup-undownloaded))) (if unseen (or (not (memq (gnus-data-number (car data)) diff --git a/lisp/message.el b/lisp/message.el index 025dc5f..9a8245e 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -342,7 +342,7 @@ Checks include `subject-cmsg', `multiple-headers', `sendsys', `approved', `sender', `empty', `empty-headers', `message-id', `from', `subject', `shorten-followup-to', `existing-newsgroups', `buffer-file-name', `unchanged', `newsgroups', `reply-to', -'continuation-headers'." +'continuation-headers', and `long-header-lines'." :group 'message-news :type '(repeat sexp)) ; Fixme: improve this @@ -4315,6 +4315,20 @@ Otherwise, generate and save a value for `canlock-password' first." (y-or-n-p "The control code \"cmsg\" is in the subject. Really post? ") t)) + ;; Check long header lines. + (message-check 'long-header-lines + (let ((start (point)) + found) + (while (and (not found) + (re-search-forward "^\\([^ \t:]+\\): " nil t)) + (when (> (- (point) start) 998) + (setq found t)) + (setq start (match-beginning 0)) + (forward-line 1)) + (if found + (y-or-n-p (format "Your %s header is too long. Really post? " + (match-string 1))) + t))) ;; Check for multiple identical headers. (message-check 'multiple-headers (let (found) diff --git a/texi/ChangeLog b/texi/ChangeLog index 85ceef1..a80552d 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,6 +1,7 @@ 2003-01-05 Lars Magne Ingebrigtsen * gnus.texi (Setting Process Marks): Addition. + (Group Line Specification): Addition. 2003-01-04 Lars Magne Ingebrigtsen diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index 036dd2e..bba744c 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -1913,6 +1913,9 @@ Gnus の起動に成功した後に、一番最後に実行されるフックです。 @item R 既読記事の数。 +@item U +まだ読まれたことが無い記事の数。 + @item t 推定全記事数 (これは実際は @var{max-number} - @var{min-number} + 1)。 diff --git a/texi/gnus.texi b/texi/gnus.texi index a09c285..c19e56e 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -1785,6 +1785,9 @@ Number of ticked articles. @item R Number of read articles. +@item U +Number of unseen articles. + @item t Estimated total number of articles. (This is really @var{max-number} minus @var{min-number} plus 1.) -- 1.7.10.4