+2000-08-25 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * lisp/gnus-vers.el (gnus-revision-number): Increment to 04.
+
+2000-08-25 Yagi Tatsuya <yagi@is.titech.ac.jp>
+ Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * 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 <yamaoka@jpl.org>
* lisp/gnus.el (gnus-group-startup-message): Use `image-size' to
(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.
(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
(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)
@code{nntp-open-network-stream} \e$B@\B34X?t$r;H$C$F$$$k$H$-$N@\B3$9$k%]!<%H\e(B
\e$BHV9f$G$9!#\e(B
+@item nntp-list-options
+@vindex nntp-list-options
+LIST \e$B%3%^%s%I$N%*%W%7%g%s$K;H$C$F!"\e(B(\e$B%5!<%P!<$N\e(B) \e$B%j%9%H=PNO$r@_Dj$7$?%K%e!<\e(B
+\e$B%9%0%k!<%W$@$1$K@)8B$9$k$?$a$N!"%K%e!<%9%0%k!<%WL>$N%j%9%H$G$9!#$=$l$>$l\e(B
+\e$B$N%K%e!<%9%0%k!<%WL>$K$O\e(B @dfn{fj.*} \e$B$d\e(B @dfn{japan.*} \e$B$N$h$&$J!"%7%'%k7A\e(B
+\e$B<0$N%o%$%k%I%+!<%I$r;H$&$3$H$,$G$-$^$9!#$b$79,1?$K$b%5!<%P!<$,$=$N$h$&$J\e(B
+\e$B%*%W%7%g%s$r<u$1IU$1$F$/$l$l$P!"\e(Bgnus \e$B$rB.$/F0:n$5$;$k$3$H$,$G$-$k$+$b$7\e(B
+\e$B$l$^$;$s!#$3$l$O!"0J2<$N$h$&$K%5!<%P!<JQ?t$H$7$F;H$&$3$H$,$G$-$^$9!#\e(B
+
+@lisp
+(setq gnus-select-method
+ '(nntp "news.somewhere.edu"
+ (nntp-list-options ("fj.*" "japan.*"))))
+@end lisp
+
+@item nntp-options-subscribe
+@vindex nntp-options-subscribe
+\e$B9gCW$7$?$iL5>r7o$G9VFI$9$k%K%e!<%9%0%k!<%WL>$N@55,I=8=$G$9!#@55,I=8=$NJ8\e(B
+\e$B;zNs$G$O\e(B @dfn{$} \e$B$NBe$o$j$K\e(B @dfn{ } \e$B$r;H$C$F2<$5$$!#%5!<%P!<$,\e(B LIST \e$B%3%^\e(B
+\e$B%s%I$N%*%W%7%g%s$K%7%'%k7A<0$N%o%$%k%I%+!<%I$r<u$1IU$1$F$/$l$J$$>l9g$G$b!"\e(B
+@code{nntp-list-options} \e$B$HF1MM$N8z2L$,$"$k$G$7$g$&!#$3$l$O!"0J2<$N$h$&\e(B
+\e$B$K%5!<%P!<JQ?t$H$7$F;H$&$3$H$,$G$-$^$9!#\e(B
+
+@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
+\e$B9gCW$7$J$+$C$?$iL5>r7o$G9VFI$9$k%K%e!<%9%0%k!<%WL>$N@55,I=8=$G$9!#@55,I=\e(B
+\e$B8=$NJ8;zNs$G$O\e(B @dfn{$} \e$B$NBe$o$j$K\e(B @dfn{ } \e$B$r;H$C$F2<$5$$!#%5!<%P!<\e(B
+\e$B$,\e(B LIST \e$B%3%^%s%I$N%*%W%7%g%s$K%7%'%k7A<0$N%o%$%k%I%+!<%I$r<u$1IU$1$F$/$l\e(B
+\e$B$J$$>l9g$G$b!"\e(B@code{nntp-list-options} \e$B$HF1MM$N8z2L$,$"$k$G$7$g$&!#$3$l\e(B
+\e$B$O!"0J2<$N$h$&$K%5!<%P!<JQ?t$H$7$F;H$&$3$H$,$G$-$^$9!#\e(B
+
+@lisp
+(setq gnus-select-method
+ '(nntp "news.somewhere.edu"
+ (nntp-options-not-subscribe "\\.binaries\\.")))
+@end lisp
+
@item nntp-buggy-select
@vindex nntp-buggy-select
\e$B$"$J$?$NA*Br$N0lO"$N:n6H$,8N>c$,$A$G$"$k$H$-$K$3$l$r\e(B @code{nil} \e$B$G$J$$CM\e(B
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.