Path: utzoo!attcan!uunet!kddlab!titcca!fgw!flab!umerin From: umerin@flab.flab.fujitsu.JUNET (Masanobu UMEDA) Newsgroups: comp.emacs,fj.editor.emacs Subject: GNUS 3.11: A GNU Emacs newsreader (9 of 9) Message-ID: <4808@flab.flab.fujitsu.JUNET> Date: 23 Feb 89 07:27:50 GMT Reply-To: umerin@flab.flab.fujitsu.JUNET (Masanobu UMEDA) Followup-To: comp.emacs Organization: Fujitsu Laboratories Ltd., Kawasaki, Japan. Lines: 364 ---- Cut Here and unpack ---- #!/bin/sh # this is part 9 of a multipart archive # do not concatenate these parts, unpack them in order with /bin/sh # file gnus.texinfo continued # CurArch=9 if test ! -r s2_seq_.tmp then echo "Please unpack part 1 first!" exit 1; fi ( read Scheck if test "$Scheck" != $CurArch then echo "Please unpack part $Scheck next!" exit 1; else exit 0; fi ) < s2_seq_.tmp || exit 1 sed 's/^X//' << 'SHAR_EOF' >> gnus.texinfo X XSince a general KILL file is too heavy to use only for a few newsgroups, Xa lighter hook function is recommended. For example, if you'd like to Xapply kills to articles which contain the string @samp{rmgroup} in Xsubject in newsgroup @samp{control}, you can use the following Xhook:@refill X X@findex gnus-kill X@vindex gnus-newsgroup-name (Internal) X@example X(setq gnus-Apply-kill-hook X '(lambda () X (cond ((string-match "control" gnus-newsgroup-name) X (gnus-kill "Subject" "rmgroup" "d"))))) X@end example X X@xref{KILL File}, for more information on KILL files.@refill X X@vindex gnus-Mark-article-hook X@cindex article marks X@cindex mark articles X@item gnus-Mark-article-hook X XCalled with no arguments when an article is selected for the first time Xif its value is non-@code{nil}. The hook is intended to mark an article Xas read (or unread) automatically when it is selected.@refill X XThe following example is the default definition of the hook: X X@vindex gnus-current-article (Internal) X@vindex gnus-newsgroup-marked (Internal) X@vindex gnus-current-article (Internal) X@findex gnus-Subject-mark-as-read X@findex gnus-Subject-set-current-mark X@example X(setq gnus-Mark-article-hook X '(lambda () X ;; Mark the selected article as read. X (or (memq gnus-current-article gnus-newsgroup-marked) X (gnus-Subject-mark-as-read gnus-current-article)) X ;; Put "+" on the current subject. X (gnus-Subject-set-current-mark "+") X )) X@end example X XIt is possible to mark as unread (@samp{-}) instead when an article is Xselected as follows:@refill X X@vindex gnus-current-article (Internal) X@findex gnus-Subject-mark-as-unread X@findex gnus-Subject-set-current-mark X@example X(setq gnus-Mark-article-hook X '(lambda () X ;; Mark the selected article as unread. X (gnus-Subject-mark-as-unread gnus-current-article) X ;; Put "+" on the current subject. X (gnus-Subject-set-current-mark "+") X )) X@end example X X@vindex gnus-Inews-article-hook X@cindex post articles X@item gnus-Inews-article-hook X X@pindex inews XCalled with no arguments before posting an article if its value is Xnon-@code{nil}. This hook is called just before sending an article to Xthe NNTP server or calling the @file{inews} program, while the hook X@code{news-inews-hook} is called before preparing article headers. This Xhook is intended to run special encoding programs such as kanji code Xconversion on the article.@refill X X@vindex gnus-Exit-group-hook X@item gnus-Exit-group-hook X X@vindex gnus-newsgroup-headers (Internal) X@cindex cross-references X@cindex disable cross-references X@cindex Xref field XCalled with no arguments when exiting the current newsgroup if its value Xis non-@code{nil}. If your machine is so slow that exiting from Subject XMode takes a long time, you can inhibit marking articles as read by Xusing cross-reference information in the @samp{Xref:} field by setting Xthe variable @code{gnus-newsgroup-headers} to @code{nil} in this Xhook.@refill X X@vindex gnus-Exit-gnus-hook X@item gnus-Exit-gnus-hook X XCalled with no arguments when exiting or suspending GNUS if its value is Xnon-@code{nil}. If you want to clear out Emacs buffers which were Xcreated by GNUS and remain afterwards, you can use this hook.@refill X XThe following example shows how to kill a buffer which was used for Xposting news.@refill X X@example X(setq gnus-Exit-gnus-hook X '(lambda () X ;; Kill a buffer used for posting news. X (and (get-buffer "*post-news*") X (kill-buffer "*post-news*")))) X@end example X X@vindex gnus-Save-newsrc-hook X@cindex startup file X@cindex .newsrc X@item gnus-Save-newsrc-hook X XCalled with no arguments before saving the startup file @file{.newsrc} Xif its value is non-@code{nil}. This hook is intended to change the way Xof backing up the startup file.@refill X X@vindex nntp-server-hook X@vindex nntp-server-name X@cindex NNTP server X@item nntp-server-hook X XCalled with no arguments when the connection between Emacs and the NNTP Xserver is established if its value is non-@code{nil}. This hook is Xintended to change the kanji code of a buffer associated with the Xstream. Use the variable @code{nntp-server-name} to refer to the name Xof the NNTP server in this hook. @xref{Kanji Handling}, for more Xinformation.@refill X X@end table X X@node Problems, Reporting Bugs, Customization, Top X@appendix Troubleshooting X X Some common problems and their solutions are described. If you have Xany other problems which are not described here and cannot solve them by Xyourself, @pxref{Reporting Bugs}.@refill X X@menu X* NNTP Problems:: Problems with NNTP. X* Kanji Handling:: Problems with kanji handling. X@end menu X X@node NNTP Problems, Kanji Handling, Problems, Problems X@appendixsec NNTP Problems X@cindex NNTP X@cindex hang up X@cindex deadlock X@appendixsubsec Infinite Loop Caused by Buggy Select Routine X@cindex select error X X@vindex nntp-buggy-select X@cindex select error X Emacs may hang up while waiting for NNTP server responses. This may Xbe caused by a buggy select routine of your operating system. If so, Xthe problem may be solved by using source codes of @file{nntp.el} Xinstead of byte-compiled codes. If you still have problems with it, set Xthe variable @code{nntp-buggy-select} to @code{t}.@refill X X@appendixsubsec Deadlock Caused by Packet Overflow X@cindex packet overflow X X@vindex nntp-maximum-request X@cindex large newsgroup X Emacs may hang up while retrieving headers of a large newsgroup. The Xreason is that too many requests have been sent to the NNTP server Xwithout reading replies to them. This causes a deadlock of Emacs and Xthe server. In this case, the number of requests sent to the server at Xone time must be reduced. Set the variable @code{nntp-maximum-request} Xto a lower value than the default. The optimal value depends on your Xcomputing environment.@refill X X@node Kanji Handling,, NNTP Problems, Problems X@appendixsec Kanji Handling X@cindex kanji handling X@cindex Japanese X@appendixsubsec Kanji Handling In NEmacs X@cindex NEmacs X X@vindex nntp-server-hook X If the kanji code of articles stored in the NNTP server is different Xfrom your standard file kanji code, the correct kanji code of the buffer Xassociated with the NNTP stream must be specified using the hook X@code{nntp-server-hook} as follows:@refill X X@cindex EUC X@example X(setq nntp-server-hook X '(lambda () X ;; Server's Kanji code is EUC (NEmacs hack). X (make-local-variable 'kanji-fileio-code) X (setq kanji-fileio-code 0))) X@end example X X@vindex nntp-server-name X The variable @code{nntp-server-name} is a buffer local variable Xholding a host name running an NNTP server. Use this variable to change Xthe kanji code according to the server. The following example shows how Xto change the kanji code using this variable.@refill X X@cindex EUC X@cindex JIS X@cindex SJIS X@example X(setq nntp-server-hook X '(lambda () X (make-local-variable 'kanji-fileio-code) X (cond ((string-equal nntp-server-name "foo") X (setq kanji-fileio-code 0)) ;EUC X ((string-equal nntp-server-name "bar") X (setq kanji-fileio-code 1)) ;Shift-JIS X (t X (setq kanji-fileio-code 2)) ;JIS X ))) X@end example X X@appendixsubsec Kanji Handling In SX/A Emacs X@cindex SX/A Emacs X X@vindex gnus-Article-prepare-hook X@vindex gnus-Inews-article-hook X If the kanji code of articles stored in the NNTP server is not EUC, it Xmust be converted to EUC in an Emacs buffer after being read into the Xbuffer. The kanji code of articles being posted must be also converted Xto the server specific kanji code in an Emacs buffer before actually Xbeing sent to the server. The following examples show how to do these Xusing hooks:@refill X X@cindex EUC X@cindex JIS X@example X(setq gnus-Article-prepare-hook X '(lambda () X (call-process-region (point-min) (point-max) X "nkf" t t nil "-e" ;-e stands for EUC. X ))) X(setq gnus-Inews-article-hook X '(lambda () X (call-process-region (point-min) (point-max) X "nkf" t t nil "-j" ;-j stands for JIS. X ))) X@end example X X@pindex nkf X@noindent XIn this example, @file{nkf} (Network Kanji Filter) is used as a kanji Xcode converter, and the kanji code of the NNTP server is JIS.@refill X X@node Reporting Bugs, Key Index, Problems, Top X@appendix Reporting Bugs X@appendixsec Mailing Lists and USENET Newsgroup X@cindex mailing list X@cindex info-gnus X@cindex info-gnus-english X@cindex gnu.emacs.gnus X X There are two mailing lists and one USENET newsgroup for discussing XGNUS related topics. These are intended for exchanging useful Xinformation about GNUS, such as bug reports, useful hooks, and Xextensions of GNUS. If you have any questions or problems, feel free to Xask about them. Suggestions are also welcome.@refill X X@table @code X@item gnu.emacs.gnus X XThis is a USENET newsgroup under the gnu.all hierarchy which is Xconcerned with the GNU Project of the Free Software Foundation.@refill X X@item info-gnus-english@@tut.cis.ohio-state.edu X XThis is an Internet mailing list which is gated bi-directionally with Xthe gnu.emacs.gnus newsgroup. English is the official language of the Xlist. Please send subscription requests to:@refill X X@display Xinfo-gnus-english-request@@tut.cis.ohio-state.edu X@end display X X@item info-gnus@@flab.Fujitsu.JUNET X XThis is a JUNET mailing list. Messages of info-gnus-english and Xgnu.emacs.gnus are forwarded to this list. English and Japanese are the Xofficial languages of the list. Please send subscription requests Xto:@refill X X@display Xinfo-gnus-request@@flab.Fujitsu.JUNET X@end display X@end table X X The major difference between info-gnus-english/gnu.emacs.gnus and Xinfo-gnus is the official language. There is no need to subscribe to Xinfo-gnus if you cannot read messages written in Japanese since most Xdiscussions and important announcements will be sent to Xinfo-gnus-english.@refill X X@appendixsec How to Report a Bug X@cindex report a bug X@cindex bug report X X If you find a bug, it is important to report it and to report it in a Xway which is useful. If it is a bug of a lisp program, what is the most Xuseful is an exact backtrace information of the lisp program with the Xversion number of GNUS that you are using.@refill X X To make the backtrace information, you must set the Emacs variable X@code{debug-on-error} to @code{t} before the error happens. A backtrace Xobtained from a byte-compiled lisp program is not usually Xunderstandable. To make a human readable backtrace, load the source Xprogram which is not byte-compiled yet and then produce the Xerror.@refill X X @inforef{Bugs, Reporting Bugs, emacs}, for more information. X X@node Key Index, Command Index, Reporting Bugs, Top X@unnumbered Key (Character) Index X@printindex ky X X@node Command Index, Variable Index, Key Index, Top X@unnumbered Command and Function Index X@printindex fn X X@node Variable Index, Program Index, Command Index, Top X@unnumbered Variable Index X@printindex vr X X@node Program Index, Concept Index, Variable Index, Top X@unnumbered Program Index X@printindex pg X X@node Concept Index,, Program Index, Top X@unnumbered Concept Index X@printindex cp X X@summarycontents X@contents X@bye X X X@c Local Variables: X@c outline-regexp: "@chap\\|@\\(sub\\)*section\\|@appendix \\|@appendix\\(sub\\)*sec\\|\^L" X@c End: SHAR_EOF chmod 0444 gnus.texinfo || echo "restore of gnus.texinfo fails" set `wc -c gnus.texinfo`;Sum=$1 if test "$Sum" != "129731" then echo original size 129731, current size $Sum;fi rm -f s2_seq_.tmp echo "You have unpacked the last part" exit 0