From 451bee687df1058fa11668e7c2f467e2cee7bb57 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 25 Aug 2000 13:13:14 +0000 Subject: [PATCH] Synch with `t-gnus-6_14'. --- ChangeLog | 12 ++++++++++ lisp/gnus-vers.el | 2 +- lisp/nntp.el | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++- texi/gnus-ja.texi | 43 +++++++++++++++++++++++++++++++++ texi/gnus.texi | 43 +++++++++++++++++++++++++++++++++ 5 files changed, 166 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7105510..9245f36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2000-08-25 Katsumi Yamaoka + + * lisp/gnus-vers.el (gnus-revision-number): Increment to 04. + +2000-08-25 Yagi Tatsuya + Katsumi Yamaoka + + * lisp/nntp.el (nntp-list-options, nntp-options-subscribe, + nntp-options-not-subscribe): New server variables. + (nntp-request-list): Use them. + * text/gnus.texi, texi/gnus-ja.texi: Update for them. + 2000-08-23 Katsumi Yamaoka * lisp/gnus.el (gnus-group-startup-message): Use `image-size' to diff --git a/lisp/gnus-vers.el b/lisp/gnus-vers.el index d56fe67..a3a888f 100644 --- a/lisp/gnus-vers.el +++ b/lisp/gnus-vers.el @@ -31,7 +31,7 @@ (require 'product) (provide 'gnus-vers) -(defconst gnus-revision-number "03" +(defconst gnus-revision-number "04" "Revision number for this version of gnus.") ;; Product information of this gnus. diff --git a/lisp/nntp.el b/lisp/nntp.el index 846b61f..046c785 100644 --- a/lisp/nntp.el +++ b/lisp/nntp.el @@ -42,6 +42,40 @@ (defvoo nntp-port-number "nntp" "Port number on the physical nntp server.") +(defvoo nntp-list-options nil + "List of newsgroup name used for a option of the LIST command to +restrict the listing output to only the specified newsgroups. +Each newsgroup name can be a shell-style wildcard, for instance, +\"fj.*\", \"japan.*\", etc. Fortunately, if the server can accept +such a option, it will probably make gnus run faster. You may +use it as a server variable as follows: + +\(setq gnus-select-method + '(nntp \"news.somewhere.edu\" + (nntp-list-options (\"fj.*\" \"japan.*\"))))") + +(defvoo nntp-options-subscribe nil + "Regexp matching the newsgroup names which will be subscribed +unconditionally. It may be effective as well as `nntp-list-options' +even though the server could not accept a shell-style wildcard as a +option of the LIST command. You may use it as a server variable as +follows: + +\(setq gnus-select-method + '(nntp \"news.somewhere.edu\" + (nntp-options-subscribe \"^fj\\\\.\\\\|^japan\\\\.\")))") + +(defvoo nntp-options-not-subscribe nil + "Regexp matching the newsgroup names which will not be subscribed +unconditionally. It may be effective as well as `nntp-list-options' +even though the server could not accept a shell-style wildcard as a +option of the LIST command. You may use it as a server variable as +follows: + +\(setq gnus-select-method + '(nntp \"news.somewhere.edu\" + (nntp-options-not-subscribe \"\\\\.binaries\\\\.\")))") + (defvoo nntp-server-opened-hook '(nntp-send-mode-reader) "*Hook used for sending commands to the server at startup. The default value is `nntp-send-mode-reader', which makes an innd @@ -742,8 +776,40 @@ noticing asynchronous data.") (nntp-kill-buffer (process-buffer process))))) (deffoo nntp-request-list (&optional server) + "List active groups. If `nntp-list-options' is non-nil, the listing +output from the server will be restricted to the specified newsgroups. +If `nntp-options-subscribe' is non-nil, remove newsgroups that do not +match the regexp. If `nntp-options-not-subscribe' is non-nil, remove +newsgroups that match the regexp." (nntp-possibly-change-group nil server) - (nntp-send-command-and-decode "\r?\n\\.\r?\n" "LIST")) + (with-current-buffer nntp-server-buffer + (prog1 + (if (not nntp-list-options) + (nntp-send-command-and-decode "\r?\n\\.\r?\n" "LIST") + (let ((options (if (consp nntp-list-options) + nntp-list-options + (list nntp-list-options))) + (ret t)) + (erase-buffer) + (while options + (goto-char (point-max)) + (narrow-to-region (point) (point)) + (setq ret (and ret + (nntp-send-command-nodelete + "\r?\n\\.\r?\n" + (format "LIST ACTIVE %s" (car options)))) + options (cdr options)) + (nntp-decode-text)) + (widen) + ret)) + (when (and (stringp nntp-options-subscribe) + (not (string-equal "" nntp-options-subscribe))) + (goto-char (point-min)) + (keep-lines nntp-options-subscribe)) + (when (and (stringp nntp-options-not-subscribe) + (not (string-equal "" nntp-options-not-subscribe))) + (goto-char (point-min)) + (flush-lines nntp-options-subscribe))))) (deffoo nntp-request-list-newsgroups (&optional server) (nntp-possibly-change-group nil server) diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index c881b2c..d150f12 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -10107,6 +10107,49 @@ default force yes @code{nntp-open-network-stream} 接続関数を使っているときの接続するポート 番号です。 +@item nntp-list-options +@vindex nntp-list-options +LIST コマンドのオプションに使って、(サーバーの) リスト出力を設定したニュー +スグループだけに制限するための、ニュースグループ名のリストです。それぞれ +のニュースグループ名には @dfn{fj.*} や @dfn{japan.*} のような、シェル形 +式のワイルドカードを使うことができます。もし幸運にもサーバーがそのような +オプションを受け付けてくれれば、gnus を速く動作させることができるかもし +れません。これは、以下のようにサーバー変数として使うことができます。 + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-list-options ("fj.*" "japan.*")))) +@end lisp + +@item nntp-options-subscribe +@vindex nntp-options-subscribe +合致したら無条件で講読するニュースグループ名の正規表現です。正規表現の文 +字列では @dfn{$} の代わりに @dfn{ } を使って下さい。サーバーが LIST コマ +ンドのオプションにシェル形式のワイルドカードを受け付けてくれない場合でも、 +@code{nntp-list-options} と同様の効果があるでしょう。これは、以下のよう +にサーバー変数として使うことができます。 + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-options-subscribe "^fj\\.\\|^japan\\."))) +@end lisp + +@item nntp-options-not-subscribe +@vindex nntp-options-not-subscribe +合致しなかったら無条件で講読するニュースグループ名の正規表現です。正規表 +現の文字列では @dfn{$} の代わりに @dfn{ } を使って下さい。サーバー +が LIST コマンドのオプションにシェル形式のワイルドカードを受け付けてくれ +ない場合でも、@code{nntp-list-options} と同様の効果があるでしょう。これ +は、以下のようにサーバー変数として使うことができます。 + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-options-not-subscribe "\\.binaries\\."))) +@end lisp + @item nntp-buggy-select @vindex nntp-buggy-select あなたの選択の一連の作業が故障がちであるときにこれを @code{nil} でない値 diff --git a/texi/gnus.texi b/texi/gnus.texi index ada0a4e..65ff5a2 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -10617,6 +10617,49 @@ The address of the remote system running the @sc{nntp} server. Port number to connect to when using the @code{nntp-open-network-stream} connect function. +@item nntp-list-options +@vindex nntp-list-options +List of newsgroup name used for a option of the LIST command to restrict +the listing output to only the specified newsgroups. Each newsgroup name +can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*}, +etc. Fortunately, if the server can accept such a option, it will +probably make gnus run faster. You may use it as a server variable as +follows: + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-list-options ("fj.*" "japan.*")))) +@end lisp + +@item nntp-options-subscribe +@vindex nntp-options-subscribe +Regexp matching the newsgroup names which will be subscribed +unconditionally. Use @dfn{ } instead of @dfn{$} for a regexp string. +It may be effective as well as @code{nntp-list-options} even though the +server could not accept a shell-style wildcard as a option of the LIST +command. You may use it as a server variable as follows: + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-options-subscribe "^fj\\.\\|^japan\\."))) +@end lisp + +@item nntp-options-not-subscribe +@vindex nntp-options-not-subscribe +Regexp matching the newsgroup names which will not be subscribed +unconditionally. Use @dfn{ } instead of @dfn{$} for a regexp string. +It may be effective as well as @code{nntp-list-options} even though the +server could not accept a shell-style wildcard as a option of the LIST +command. You may use it as a server variable as follows: + +@lisp +(setq gnus-select-method + '(nntp "news.somewhere.edu" + (nntp-options-not-subscribe "\\.binaries\\."))) +@end lisp + @item nntp-buggy-select @vindex nntp-buggy-select Set this to non-@code{nil} if your select routine is buggy. -- 1.7.10.4