xref: /386bsd/usr/local/info/gnus-2 (revision a2142627)
1This is Info file ../info/gnus, produced by Makeinfo-1.55 from the
2input file gnus.texi.
3
4   This file documents GNUS, the GNU Emacs newsreader.
5
6   Copyright (C) 1989, 1990, 1993 Free Software Foundation, Inc.
7
8   Permission is granted to make and distribute verbatim copies of this
9manual provided the copyright notice and this permission notice are
10preserved on all copies.
11
12   Permission is granted to copy and distribute modified versions of
13this manual under the conditions for verbatim copying, provided also
14that the entire resulting derived work is distributed under the terms
15of a permission notice identical to this one.
16
17   Permission is granted to copy and distribute translations of this
18manual into another language, under the above conditions for modified
19versions.
20
21
22File: gnus,  Node: Names of Kill Files,  Next: Background Kills,  Prev: Kill File Example,  Up: Kill File
23
24Names of Kill Files
25===================
26
27   Kill files are kept in the directory specified by the variable
28`gnus-article-save-directory'; its default value is `~/News'.  The
29variable `gnus-kill-file-name' specifies the global kill file's name
30within that directory; the default is `KILL'.
31
32   The name of a local kill file is based on the newsgroup's name.  If
33the variable `gnus-use-long-file-name' is non-`nil', then the file name
34is `NEWSGROUP.KILL'.  Otherwise, it is `NEWS/GROUP/KILL', where the
35subdirectory name is made from the newsgroup name by changing all
36periods to slashes.
37
38
39File: gnus,  Node: Background Kills,  Next: Advanced Kills,  Prev: Names of Kill Files,  Up: Kill File
40
41Background Kill Processing
42==========================
43
44   Kill processing can take a long time.  If you don't want to wait for
45it, try background kill processing using the following shell command:
46
47     emacs -batch -l gnus -f gnus-batch-kill NEWSGROUPS...
48
49where NEWSGROUPS are newsgroup names separated by whitespace.  `!'
50preceding a newsgroup name means negation, and `all' specifies all
51newsgroups not yet decided.  These interpretations are the same as the
52options line of the startup file (*note Startup File::.).
53
54
55File: gnus,  Node: Advanced Kills,  Prev: Background Kills,  Up: Kill File
56
57Advanced Kill Processing
58========================
59
60   Internally, applying kills means to run the hook
61`gnus-apply-kill-hook'.  It is called after the Summary buffer is
62prepared for a selected newsgroup.  The default hook is the function
63`gnus-apply-kill-file' which loads a global kill file and a local kill
64file in this order.  A different style of the kill processing can be
65implemented by customizing this hook.
66
67   For example, if you don't have a global kill file, you can use the
68following hook which applies only a local kill file.  This change can
69save the time for checking the existence of a global kill file.
70
71     ;; Get rid of the default hook.
72     (setq gnus-apply-kill-hook nil)
73     (add-hook 'gnus-apply-kill-hook
74       '(lambda ()
75          ;; Apply a local kill file.
76          (load (gnus-newsgroup-kill-file gnus-newsgroup-name) t nil t)))
77
78(As usual, you can put as many functions as you wish into this hook.
79What is not usual is the fact that the hook is not initially empty.
80Therefore, if you don't want the default hook value, you must set the
81hook variable to `nil'.)
82
83   In contrast, the following example enables only a global kill file.
84
85     ;; Get rid of the default hook.
86     (setq gnus-apply-kill-hook nil)
87     (add-hook 'gnus-apply-kill-hook
88       '(lambda ()
89          ;; Apply a global kill file.
90          (load (gnus-newsgroup-kill-file nil) t nil t)))
91
92   Here is an advanced example that drastically reduces the time for
93applying kill files.  This hook does the kill processing directly
94without loading the kill files.
95
96     ;; Get rid of the default hook.
97     (setq gnus-apply-kill-hook nil)
98     (add-hook 'gnus-apply-kill-hook
99       '(lambda ()
100          ;; Apply to the newsgroup `control'
101          ;; if the NNTP server is flab.
102          (and (string-equal gnus-nntp-server "flab")
103               (string-equal gnus-newsgroup-name "control")
104               (progn
105                 (gnus-kill "Subject" "ihave flab\\|sendme")
106                 (gnus-kill "Subject" "cancel\\|newgroup\\|rmgroup" "d")
107                 (gnus-expunge "X")))))
108
109
110File: gnus,  Node: Customization,  Next: Reporting Bugs,  Prev: Troubleshooting,  Up: Top
111
112Customizing GNUS
113****************
114
115   Appendix A describes the variables and hooks for simple customization
116and the variables for localization.
117
118* Menu:
119
120* Variables::           Variables for customizing GNUS.
121
122* NNTP Variables::      Variables for localizing NNTP environment.
123* Spool Variables::     Variables for localizing news spool environment.
124* Directory Variables:: Variables for localizing private directory environment.
125
126* Hooks::               Function hooks for customizing GNUS.
127
128
129File: gnus,  Node: Variables,  Next: NNTP Variables,  Up: Customization
130
131Common Variables
132================
133
134`gnus-nntp-server'
135     Specifies the name of the host running the NNTP server.  The
136     variable is initialized from the `NNTPSERVER' environment
137     variable.  If the server name is preceded by a colon such as
138     `:Mail', the user's private directory `~/Mail' is used as a news
139     spool.  *Note Finding the News::, for more information.
140
141`gnus-nntp-service'
142     Specifies a service name of NNTP, usually a string `"nntp"'.  In a
143     few instances, it must be the number `119'.  To use a local news
144     spool of your machine rather than NNTP, set the variable to `nil'.
145     *Note Finding the News::, for more information.
146
147`gnus-local-domain'
148     Specifies the domain which is the domain part of your mail address
149     excluding the local host name of your machine.  The environment
150     variable `DOMAINNAME' is used instead if defined.  If the function
151     `system-name' returns the full Internet name, there is no need to
152     define the domain.
153
154`gnus-local-organization'
155     Specifies the organization you belong to.  The environment variable
156     `ORGANIZATION' is used instead if defined.  If the value begins
157     with a slash, it is taken as the name of a file whose contents are
158     read for the value.
159
160`gnus-local-timezone'
161     Specifies the local time zone you belong to.  The value can be
162     either a time zone name such as `"JST"' or a difference in hour
163     from GMT such as `+0900'.  If the variable is non-`nil', a general
164     time zone handling package `timezone.el' is used to generate a
165     valid date for `Date:' field in terms of RFC822.  Otherwise, if it
166     is nil, GNUS generate a date ignoring the local time zone.  If you
167     are using Bnews, it is okay since `inews' will rewrite the invalid
168     date.  However, if you are using Cnews or INN, you must set the
169     variable to the correct time zone or remove `Date' from the
170     variable `gnus-required-headers' since their `inews' do not
171     rewrite the wrong `Date:' field.
172
173     If you want to display the time of articles in your local time
174     zone, call the function `gnus-gmt-to-local' from the hook
175     `gnus-article-prepare-hook'.
176
177`gnus-local-distributions'
178     Specifies a list of distributions.  The head of the list is used as
179     default.  Each element of the list must be a string.  If
180     distributions file is available, its content is also used as
181     distributions.
182
183`gnus-use-generic-from'
184     Non-`nil' means the local host name of your machine will not appear
185     in the `From:' field of article headers.  If the variable is a
186     string, it is used as your domain instead of the definition by the
187     variable `gnus-local-domain' or the environment variable
188     `DOMAINNAME'.
189
190`gnus-use-generic-path'
191     Non-`nil' means the NNTP server name will not appear in the
192     `Path:' field of article headers.  If the variable is a string, it
193     is used in the `Path:' field as the NNTP server name instead of the
194     definition by the variable `gnus-nntp-server'.
195
196`gnus-ignored-newsgroups'
197     Specify a regular expression used to ignore uninterested
198     newsgroups in the active file.  Any lines in the active file
199     matching this regular expression are removed from the newsgroup
200     list before anything else is done to it, thus making them
201     effectively invisible.  There is no way to know what newsgroups
202     there are if they are ignored.
203
204`gnus-ignored-headers'
205     Specifies header fields which should be ignored in an article.
206
207`gnus-required-headers'
208     Specifies header fields which should be included in an article you
209     will post.  RFC977 and RFC1036 require From, Date, Newsgroups,
210     Subject, Message-ID and Path fields.  Organization, Distribution
211     and Lines are optional.  If you want GNUS not to generate some
212     fields, remove them from the variable.  If news system is Cnews,
213     you may have to remove Date and to add Lines.
214
215`gnus-startup-file'
216     Specifies a startup file of the Bnews system, usually `.newsrc'.
217     If there is a file named `.newsrc-SERVER', it is used instead when
218     talking to SERVER.  *Note Startup File::, for more information.
219
220`gnus-signature-file'
221     Specifies a signature file of the Bnews system, usually
222     `.signature'.  The signature file is processed by the function
223     `gnus-inews-insert-signature' called from the hook
224     `gnus-prepare-article-hook' by default.  If there is a file named
225     `.signature-DISTRIBUTION', it is used instead when the
226     distribution of the article is DISTRIBUTION.  Set the variable to
227     `nil' to prevent appending the signature file automatically.
228
229`gnus-use-cross-reference'
230     Specifies what to do with cross references (`Xref:' field).  If it
231     is `nil', cross references are ignored.  If it is `t', articles in
232     subscribed newsgroups are only marked as read.  Otherwise, if it
233     is not `nil' nor `t', articles in all newsgroups are marked as
234     read.
235
236`gnus-use-followup-to'
237     Specifies what to do with `Followup-To:' field.  If it is `nil',
238     its value is ignored.  If it is non-`nil', its value is used as
239     followup newsgroups.  Especially, if it is `t' and you are going
240     to followup to an article in which `poster' is specified, your
241     confirmation is required.
242
243`gnus-use-full-window'
244     Non-`nil' means to take up the entire screen of Emacs.  If the
245     variable is `nil', the windows used by GNUS will be restricted to
246     the bounds of the original window.  This is very useful if you
247     want to read articles while you do other work in other windows.
248
249`gnus-window-configuration'
250     Specifies the configuration of the Group Mode window, the Summary
251     Mode window, and the Article Mode window.  The window
252     configuration can be specified for each action of GNUS (e.g.
253     selecting a newsgroup or selecting an article).  This is quite
254     useful if you are using a slow terminal since the update of Emacs
255     windows can be minimized by displaying these three windows same
256     time.
257
258     The variable must be a list of `(ACTION (G S A))', where ACTION is
259     an action being performed, and G, S, and A are the relative
260     heights of the Group Mode window, the Summary Mode window, and the
261     Article Mode window, respectively.  ACTION is `summary',
262     `newsgroups', or `article'.
263
264     The following example is the default window configuration:
265
266          (setq gnus-window-configuration
267                '((summary        (0 1 0))
268                  (newsgroups     (1 0 0))
269                  (article        (0 3 10))))
270
271     The following is an example of yet another two windows mode.
272     Article buffer is always displayed on a screen.  This is useful on
273     a slow terminal.
274
275          (setq gnus-window-configuration
276                '((summary        (0 1 0))
277                  (newsgroups     (1 0 3))
278                  (article        (0 1 3))))
279
280     The following is an example of three windows mode.  Three buffers
281     are always displayed on a screen.  This is also useful on a slow
282     terminal.
283
284          (setq gnus-window-configuration
285                '((summary        (1 4 0))
286                  (newsgroups     (1 1 3))
287                  (article        (1 1 3))))
288
289`gnus-large-newsgroup'
290     Specifies the number of the articles which indicates a large
291     newsgroup.  If the number of articles in a newsgroup is greater
292     than this value, the number of articles to be selected is asked
293     for.  If the given value N is positive, the last N articles are
294     selected.  If N is negative, the first N articles are selected.
295     An empty string means to select all articles.
296
297`gnus-author-copy'
298     Specifies a file name saving a copy of an article posted using
299     `FCC:' field.  The variable is initialized from the `AUTHORCOPY'
300     environment variable.  The specified file name is inserted in
301     `FCC:' field, so you have a chance to change the file name or
302     disable saving a copy by editing this field.
303
304     The `FCC:' field is processed by the function `gnus-inews-do-fcc'
305     called from the hook `gnus-inews-article-hook' by default.  Unless
306     the first character of the field is ``|'', the article is saved to
307     the specified file using the function specified by the variable
308     `gnus-author-copy-saver'.  The default function `rmail-output'
309     saves in Unix mailbox format.  Instead, if the first character is
310     ``|'', the contents of the article is send to a program specified
311     by the rest of the value.  For example, articles can be saved in
312     an MH folder by the following:
313
314          (setq gnus-author-copy
315                "|/usr/local/lib/mh/rcvstore +Article")
316
317`gnus-author-copy-saver'
318     Specifies a function to save an author copy to.  The function is
319     called with a file name to save a copy to.  The default function
320     `rmail-output' saves in Unix mailbox format.
321
322`gnus-use-long-file-name'
323     Non-`nil' means that a newsgroup name is used as a default file
324     name to save articles to.  If it is `nil', the directory form of a
325     newsgroup name is used instead.  It is set to nil by default if the
326     variable `system-type' is either `usg-unix-v' or `xenix'.
327
328`gnus-mail-save-name'
329`gnus-rmail-save-name'
330`gnus-folder-save-name'
331`gnus-file-save-name'
332     Specifies a function generating a file name to save articles to.
333     The function is called with NEWSGROUP, HEADERS, and optional
334     LAST-NAME.  NEWSGROUP is a string representing the current
335     newsgroup name.  HEADERS is a vector containing headers of the
336     current article.  Macros and functions accessing contents of the
337     HEADERS are defined as `nntp-header-FIELD' and
338     `gnus-header-FIELD', respectively.  The following functions are
339     provided as file name generators by default:
340
341    `gnus-numeric-save-name'
342          Return a file name like `NEWS.GROUP/NUMBER' or
343          `NEWS/GROUP/NUMBER' according to the variable
344          `gnus-use-long-file-name'.
345
346    `gnus-Numeric-save-name'
347          Return a file name like `NEWS.GROUP/NUMBER' or
348          `NEWS/GROUP/NUMBER' according to the variable
349          `gnus-use-long-file-name'.
350
351    `gnus-plain-save-name'
352          Return a file name like `NEWS.GROUP' or `NEWS/GROUP/news'
353          according to the variable `gnus-use-long-file-name'.
354
355    `gnus-Plain-save-name'
356          Return a file name like `NEWS.GROUP' or `NEWS/GROUP/news'
357          according to the variable `gnus-use-long-file-name'.
358
359    `gnus-folder-save-name'
360          Return a folder name like `+NEWS.GROUP' or `+NEWS/GROUP'
361          according to the variable `gnus-use-long-file-name'.
362
363    `gnus-Folder-save-name'
364          Return a folder name like `+NEWS.GROUP' or `+NEWS/GROUP'
365          according to the variable `gnus-use-long-file-name'.
366
367`gnus-default-article-saver'
368     Specifies a function to save articles in your favorite format
369     using the command `gnus-summary-save-article'.  The function must
370     be interactively funcallable.  In other words, it must be an Emacs
371     command.  The functions currently provided are as follows:
372
373    `gnus-summary-save-in-mail'
374          Save articles in Unix mailbox format.
375
376    `gnus-summary-save-in-rmail'
377          Save articles in Rmail format.
378
379    `gnus-summary-save-in-folder'
380          Save articles in an MH folder.
381
382    `gnus-summary-save-in-file'
383          Save articles in article format.
384
385`gnus-article-save-directory'
386     Specifies a directory name to save articles in using the commands
387     `gnus-summary-save-in-mail', `gnus-summary-save-in-rmail', and
388     `gnus-summary-save-in-file'.  The variable is initialized from the
389     `SAVEDIR' environment variable.  Its default value is `~/News'.
390
391`gnus-kill-file-name'
392     Specifies a file name of kill file (*note Kill File::.).  Its
393     default value is `KILL'.
394
395`gnus-novice-user'
396     Non-`nil' means you are a novice to USENET.  If it is non-`nil',
397     verbose messages may be displayed or your confirmations may be
398     required.
399
400`gnus-interactive-catchup'
401     Non-`nil' means that your confirmation is required when catching up
402     a newsgroup in Group mode.
403
404`gnus-interactive-post'
405     Non-`nil' means that newsgroup, subject, and distribution are asked
406     for interactively when composing a new article.
407
408`gnus-interactive-exit'
409     Non-`nil' means that your confirmation is required when exiting
410     GNUS.
411
412`gnus-user-login-name'
413     Specifies your login name.  The login name is got from the
414     `LOGNAME' and `USER' environment variables and the function
415     `user-login-name', if undefined.
416
417`gnus-user-full-name'
418     Specifies your full name.  The full name is got from the `NAME'
419     environment variable and the function `user-full-name', if
420     undefined.
421
422`gnus-show-all-headers'
423     Non-`nil' means all headers of an article are shown.
424
425`gnus-save-all-headers'
426     Non-`nil' means all headers of an article are saved in a file.
427
428`gnus-show-mime'
429     Non-`nil' means process a MIME message.  The message is processed
430     by the function specified by the variable `gnus-show-mime-method'.
431
432`gnus-show-threads'
433     Non-`nil' means conversation threads are displayed in a tree
434     structured form according to references in Summary Mode.
435
436`gnus-thread-hide-subject'
437     Non-`nil' means subjects of lower level threads are hidden if the
438     thread-based reading is turned on.
439
440`gnus-thread-hide-subtree'
441     Non-`nil' means thread subtrees are hidden initially.  If thread
442     subtrees are hidden, you have to run the command
443     `gnus-summary-show-thread' by hand or by using
444     `gnus-select-article-hook' to show them.
445
446`gnus-thread-hide-killed'
447     Non-`nil' means killed thread subtrees are hidden automatically.
448
449`gnus-thread-ignore-subject'
450     Non-`nil' means subject differences are ignored but only references
451     are taken into account in constructing threads trees.  If it is
452     non-`nil' and thread subtrees are hidden, some commands that work
453     with subjects may not work properly.
454
455`gnus-thread-indent-level'
456     Specifies indentation level of thread subtrees.
457
458`gnus-auto-extend-newsgroup'
459     Non-`nil' means visible articles are automatically extended to
460     forward and backward if possible when the commands `N' and `P'
461     (`gnus-summary-next-article' and `gnus-summary-prev-article') are
462     executed in Summary Mode.
463
464`gnus-auto-select-first'
465     Non-`nil' means the first unread article is selected automatically
466     when a newsgroup is selected.  If you'd like to prevent automatic
467     selection of the first unread article in some newsgroups, set the
468     variable to `nil' in the hook `gnus-select-group-hook' or
469     `gnus-apply-kill-hook' (*note Hooks::.).
470
471`gnus-auto-select-next'
472     Non-`nil' means the next newsgroup is selected automatically at the
473     end of the newsgroup.  If the value is `t' and the next newsgroup
474     is empty (no unread articles), GNUS will exit Summary Mode and go
475     back to Group Mode.  If the value is neither `nil' nor `t', GNUS
476     won't exit Summary Mode but will select the following unread
477     newsgroup.  If the value is `quietly', the next unread newsgroup
478     will be selected without any confirmations.
479
480`gnus-auto-select-same'
481     Non-`nil' means an article with the same subject as the current
482     article is selected automatically like `rn -S'.
483
484`gnus-auto-center-summary'
485     Non-`nil' means that the cursor is always kept centered in the
486     Summary Mode window.
487
488`gnus-auto-mail-to-author'
489     Non-`nil' means that inserts `To:' field which is filled with the
490     author of the article when followuping.  Mail is sent using the
491     function specified by the variable `gnus-mail-send-method'.
492
493`gnus-break-pages'
494     Non-`nil' means an article is broken into pages at page delimiters.
495     The page delimiter is specified by the variable
496     `gnus-page-delimiter'.  This may not work with some versions of GNU
497     Emacs earlier than version 18.50.
498
499`gnus-page-delimiter'
500     Specifies regexp describing line-beginnings that separate pages of
501     articles.  Its default value is `"^\^L"'.
502
503`gnus-digest-show-summary'
504     Non-`nil' means that a summary of digest messages is shown when
505     reading a digest article using the command
506     `gnus-summary-rmail-digest'.
507
508`gnus-digest-separator'
509     Specifies a regexp which separates messages in a digest article.
510     Changes to this variable only affect the commands
511     `gnus-summary-next-digest' and `gnus-summary-prev-digest', but not
512     the command `gnus-summary-rmail-digest'.
513
514`gnus-optional-headers'
515     Specifies a function which generates an optional string displayed
516     in the Summary buffer.  The function is called with an article
517     HEADERS, and must return a string excluding `[' and `]'.  HEADERS
518     is a vector containing headers of the current article.  Macros and
519     functions accessing contents of the HEADERS are defined as
520     `nntp-header-FIELD' and `gnus-header-FIELD', respectively.
521
522     GNUS provides two functions as follows:
523
524    `gnus-optional-lines-and-from'
525          Return a string like "NNN:AUTHOR", where NNN is the number of
526          lines in an article and AUTHOR is the name of the author.
527
528    `gnus-optional-lines'
529          Return a string like "NNN", where NNN is the number of lines
530          in an article.
531
532     *Note Hooks::, to change optional headers according to selected
533     newsgroups.
534
535`gnus-show-mime-method'
536     Specifies a function to process a MIME message in current buffer.
537     The function `metamail-buffer' which process the buffer through
538     `metamail' is called by default.
539
540`gnus-mail-reply-method'
541     Specifies a function to begin composing reply mail messages.  The
542     function will be called with an optional argument which means yank
543     original article automatically if non-`nil'.  To use Mail Mode, set
544     the variable to `gnus-mail-reply-using-mail'.  To use mh-e letter
545     Mode, set the variable to `gnus-mail-reply-using-mhe'.
546
547`gnus-mail-forward-method'
548     Specifies a function to forward the current message to another
549     user.  To use Mail Mode, set the variable to
550     `gnus-mail-forward-using-mail'.  To use mh-e letter Mode, set the
551     variable to `gnus-mail-forward-using-mhe'.
552
553`gnus-mail-other-window-method'
554     Specifies a function to begin composing mail messages in other
555     window.  To use Mail Mode, set the variable to
556     `gnus-mail-other-window-using-mail'.  To use mh-e letter Mode, set
557     the variable to `gnus-mail-other-window-using-mhe'.
558
559`gnus-mail-send-method'
560     Specifies a function to mail a message too which is being posted
561     as an article.  The message must have `To:' or `Cc:' field.  The
562     value of the variable `send-mail-function' is the default function
563     which uses sendmail mail program.
564
565`gnus-subscribe-newsgroup-method'
566     Specifies a function called with a newsgroup name when a new
567     newsgroup is found.  GNUS provides the following three functions:
568
569    `gnus-subscribe-randomly'
570          Inserts a new newsgroup at the beginning of newsgroups.  Thus,
571          newsgroups are in random order.
572
573    `gnus-subscribe-alphabetically'
574          Inserts a new newsgroup in strict alphabetic order.
575
576    `gnus-subscribe-hierarchically'
577          Inserts a new newsgroup in hierarchical newsgroup order.
578
579    `gnus-subscribe-interactively'
580          Asks for your decision about a new newsgroup subscription,
581          and inserts it in hierarchical newsgroup order if it is
582          subscribed.  Unless, it is killed.
583
584     The following two definitions illustrate how to write your favorite
585     subscribing method.  The following definition (is the definition
586     of the function gnus-subscribe-randomly) adds new newsgroup at the
587     beginning of newsgroups:
588
589          (setq gnus-subscribe-newsgroup-method
590                '(lambda (newsgroup)
591                   (gnus-subscribe-newsgroup newsgroup
592                                             (car (car gnus-newsrc-assoc)))))
593
594     Instead, if you want to add new newsgroup at the end of
595     newsgroups, use the following:
596
597          (setq gnus-subscribe-newsgroup-method
598                '(lambda (newsgroup)
599                   (gnus-subscribe-newsgroup newsgroup nil)))
600
601     If you want to prevent adding new newsgroups automatically and
602     want to subscribe them later using the command `U'
603     (`gnus-group-unsubscribe-group') in the Newsgroup buffer, use the
604     following:
605
606          (setq gnus-subscribe-newsgroup-method
607                '(lambda (newsgroup) nil))        ;Do nothing.
608
609     The following final example must be the most useful for you who
610     want not to add new newsgroups automatically.  This definition
611     subscribes a new newsgroup first, and then kills it.  The killed
612     newsgroups can be added to the subscription list interactively
613     using Browse-Killed Mode (*note Maintaining Subscriptions::.).
614
615          (setq gnus-subscribe-newsgroup-method
616                '(lambda (newsgroup)
617                   (gnus-subscribe-newsgroup newsgroup)
618                   (gnus-kill-newsgroup newsgroup)))
619
620
621File: gnus,  Node: NNTP Variables,  Next: Spool Variables,  Prev: Variables,  Up: Customization
622
623NNTP Specific Variables
624=======================
625
626`nntp-buggy-select'
627     Non-`nil' means the select routine of your operating system is
628     buggy.  GNUS may hang up while waiting for NNTP server responses.
629     The problem may be solved by setting the variable to `t'.
630
631`nntp-maximum-request'
632     Specifies the maximum number of requests to be sent to the NNTP
633     server at one time.  GNUS may hang up while retrieving headers of
634     a large newsgroup because sending many requests to the NNTP server
635     without reading replies to them causes deadlock.  In this case,
636     set the variable to a lower number.
637
638`nntp-large-newsgroup'
639     Specifies the number of articles which indicates a large
640     newsgroup.  If the number of articles is greater than the value,
641     verbose messages will be shown to indicate the current status.
642
643`nntp-debug-read'
644     Non-`nil' means display dots "..." every 10000 bytes of a message
645     being received.  If it is a number, dots are displayed per the
646     number.  Set the variable to `nil' if you are annoyed about
647     verbose messages while reading news from slow terminal.
648
649`tcp-program-name'
650     This variable specifies the name of the program which establishes
651     communications between Emacs and the NNTP server.  Its default
652     value is `"tcp"'.  (the program `tcp' comes with GNU Emacs.)  This
653     variable is relevant only if you load the library `tcp.el', which
654     you should do only if your Emacs does not have the function
655     `open-network-stream'.
656
657
658File: gnus,  Node: Spool Variables,  Next: Directory Variables,  Prev: NNTP Variables,  Up: Customization
659
660Local News Spool Specific Variables
661===================================
662
663`nnspool-inews-program'
664     Specifies a program to post news.  This is default to the variable
665     `news-inews-program' which is default to `inews'.
666
667`nnspool-inews-switches'
668     Specifies switches for the function `nnspool-request-post' to pass
669     to the command `inews' for posting news.  Its default value is
670     `("-h")'.
671
672`nnspool-spool-directory'
673     Specifies a directory of a local news spool.  This is default to
674     the variable `news-path' which is default to `/usr/spool/news'.
675
676`nnspool-active-file'
677     Specifies an active file of the system for a local news spool.  Its
678     default value is `/usr/lib/news/active'.
679
680`nnspool-newsgroups-file'
681     Specifies an newsgroups file of the system for a local news spool.
682     Its default value is `/usr/lib/news/newsgroups'.
683
684`nnspool-distributions-file'
685     Specifies an distributions file of the system for a local news
686     spool.  Its default value is `/usr/lib/news/distributions'.
687
688`nnspool-history-file'
689     Specifies a history file of the system for a local news spool.  Its
690     default value is `/usr/lib/news/history'.  Some machines may not
691     have this file.  In this case, commands to refer to articles by
692     Message-IDs will not work at all (*note Referencing Articles::.).
693
694
695File: gnus,  Node: Directory Variables,  Next: Hooks,  Prev: Spool Variables,  Up: Customization
696
697Private Directory Specific Variables
698====================================
699
700`mhspool-list-folders-method'
701     Specifies a function to fill the current buffer with file and
702     directory names for a given directory name.  The output format
703     must be the same as that of the Unix command `ls -R1'.  Two
704     functions `mhspool-list-folders-using-ls' and
705     `mhspool-list-folders-using-sh' are provided now.
706
707`mhspool-list-directory-switches'
708     Specifies switches for the function `mhspool-list-folders-using-ls'
709     to pass to the command `ls' for getting file listings in a private
710     directory.  There should be one entry for each line.  Its default
711     value is `("-R")'.  Some machines may require the `("-R1")' switch.
712
713
714File: gnus,  Node: Hooks,  Prev: Directory Variables,  Up: Customization
715
716Function Hooks
717==============
718
719`gnus-group-mode-hook'
720     Called with no arguments after initializing Group Mode if its
721     value is non-`nil'.  This hook is intended to customize Group Mode
722     only once.  It is possible to define or change the NNTP server as
723     you like in this hook since the hook is called before GNUS is
724     connected to an NNTP server.
725
726`gnus-summary-mode-hook'
727     Called with no arguments after initializing Summary Mode if its
728     value is non-`nil'.  This hook is intended to customize Summary
729     Mode only once.  All sorts of searches in Summary Mode normally
730     ignore the case of the text they are searching through.  If you do
731     not want to ignore the case, set the variable `case-fold-search'
732     to `nil' in this hook.
733
734     The following example shows how to assign the functions
735     `gnus-summary-next-group' and `gnus-summary-prev-group' to keys in
736     Summary Mode.
737
738          (setq gnus-summary-mode-hook
739                '(lambda ()
740                   (local-set-key "\C-cn" 'gnus-summary-next-group)
741                   (local-set-key "\C-cp" 'gnus-summary-prev-group)))
742
743`gnus-article-mode-hook'
744     Called with no arguments after initializing Article Mode if its
745     value is non-`nil'.  This hook is intended to customize Article
746     Mode only once.
747
748`gnus-kill-file-mode-hook'
749     Called with no arguments after initializing Kill-File Mode if its
750     value is non-`nil'.
751
752`gnus-browse-killed-mode-hook'
753     Called with no arguments after initializing Browse-Killed Mode if
754     its value is non-`nil'.
755
756`gnus-open-server-hook'
757     Called with no arguments just before opening a connection to NNTP
758     server if its value is non-`nil'.
759
760`gnus-startup-hook'
761     Called with no arguments after an NNTP server is successfully
762     connected to if its value is non-`nil'.  It is possible to change
763     the behavior of GNUS according to the server.
764
765`gnus-group-prepare-hook'
766     Called with no arguments after a list of newsgroups is prepared in
767     the Newsgroup buffer.  This hook is intended to modify the buffer.
768
769`gnus-summary-prepare-hook'
770     Called with no arguments after list of subjects is prepared in the
771     Summary buffer.  This hook is intended to modify the buffer.
772
773`gnus-article-prepare-hook'
774     Called with no arguments after an article is prepared in the
775     Article buffer.  This hook is intended to modify the buffer.  For
776     example, kanji code conversion or un-ROT13/47-ing can be done in
777     this hook.
778
779`gnus-select-group-hook'
780     Called with no arguments when a newsgroup is selected.  This hook
781     is intended to change the behavior of GNUS according to the
782     selected newsgroup.
783
784     The following is an example of sorting the headers listed in the
785     Summary buffer by date and then by subject.  Preceding `Re:' of
786     subjects is ignored while comparing subjects.
787
788          (setq gnus-select-group-hook
789                '(lambda ()
790                   ;; First of all, sort by date.
791                   (gnus-keysort-headers
792                    (function string-lessp)
793                    (function
794                     (lambda (a)
795                       (gnus-sortable-date (gnus-header-date a)))))
796                   ;; Then sort by subject ignoring `Re:'.
797                   (gnus-keysort-headers
798                    (function string-lessp)
799                    (function
800                     (lambda (a)
801                       (if case-fold-search
802                           (downcase (gnus-simplify-subject (gnus-header-subject a) t))
803                         (gnus-simplify-subject (gnus-header-subject a) t)))))
804                  ))
805
806     The following is an example of simplifying subjects like the
807     `gnus-summary-next-same-subject' command does:
808
809          (setq gnus-select-group-hook
810                '(lambda ()
811                   (mapcar (function
812                            (lambda (header)
813                              (nntp-set-header-subject
814                               header
815                               (gnus-simplify-subject
816                                (gnus-header-subject header) 're-only))))
817                           gnus-newsgroup-headers)))
818
819     In some newsgroups, author names are meaningless.  It is possible
820     to prevent listing author names in the Summary buffer as follows:
821
822          (setq gnus-select-group-hook
823                '(lambda ()
824                   (cond ((string-equal "comp.sources.unix"
825                                        gnus-newsgroup-name)
826                          (setq gnus-optional-headers
827                                (function gnus-optional-lines)))
828                         (t
829                          (setq gnus-optional-headers
830                                (function
831                                   gnus-optional-lines-and-from))))))
832
833`gnus-select-article-hook'
834     Called with no arguments when an article is selected if its value
835     is non-`nil'.
836
837     The default hook definition shows conversation thread subtrees of
838     the selected article automatically as follows:
839
840          (setq gnus-select-article-hook
841                '(lambda ()
842                   (gnus-summary-show-thread)))
843
844     It is possible to run Rmail on a digest article automatically as
845     follows:
846
847          (setq gnus-select-article-hook
848                '(lambda ()
849                   (gnus-summary-show-thread)
850                   (cond ((string-equal "comp.sys.sun"
851                                        gnus-newsgroup-name)
852                          (gnus-summary-rmail-digest))
853                         ((and (string-equal "comp.text"
854                                             gnus-newsgroup-name)
855                               (string-match "^TeXhax Digest"
856                                             (gnus-header-subject
857                                                gnus-current-headers)))
858                          (gnus-summary-rmail-digest)
859                          ))))
860
861`gnus-select-digest-hook'
862     Called with no arguments when reading digest messages using Rmail
863     if its value is non-`nil'.  This hook is intended to modify an
864     article so that Rmail can work with it.  *Note Digest Articles::,
865     for more information on digest articles.
866
867     The following example is the default hook definition to modify
868     incomplete digest articles:
869
870          (setq gnus-select-digest-hook
871                '(lambda ()
872                   ;; Reply-To: is required by
873                   ;; `undigestify-rmail-message'.
874                   (or (mail-position-on-field "Reply-to" t)
875                       (progn
876                         (mail-position-on-field "Reply-to")
877                         (insert (gnus-fetch-field "From"))))))
878
879`gnus-rmail-digest-hook'
880     Called with no arguments when reading digest messages using Rmail
881     if its value is non-`nil'.  This hook is intended to customize
882     Rmail Mode for reading digest articles.
883
884`gnus-apply-kill-hook'
885     Called with no arguments when a newsgroup is selected and the
886     Summary buffer is prepared if its value is non-`nil'.  This hook
887     is intended to apply kill files to the selected newsgroup.  It is
888     set to the function `gnus-apply-kill-file' by default.
889
890     Since a general kill file is too heavy to use only for a few
891     newsgroups, a lighter hook function is recommended.  For example,
892     if you'd like to apply kills to articles which contain the string
893     `rmgroup' in subject in newsgroup `control', you can use the
894     following hook:
895
896          (setq gnus-apply-kill-hook
897                '(lambda ()
898                   (cond ((string-match "control" gnus-newsgroup-name)
899                          (gnus-kill "Subject" "rmgroup")
900                          (gnus-expunge "X")))))
901
902     *Note Kill File::, for more information on kill files.
903
904`gnus-mark-article-hook'
905     Called with no arguments when an article is selected for the first
906     time if its value is non-`nil'.  The hook is intended to mark an
907     article as read (or saved) automatically when it is selected.
908
909     The following example is the default definition of the hook:
910
911          (setq gnus-mark-article-hook
912                '(lambda ()
913                   ;; Mark the selected article as read.
914                   (or (memq gnus-current-article gnus-newsgroup-marked)
915                       (gnus-summary-mark-as-read gnus-current-article))
916                   ;; Put "+" on the current subject.
917                   (gnus-summary-set-current-mark "+")
918                   ))
919
920     It is possible to mark as saved (`-') instead when an article is
921     selected as follows:
922
923          (setq gnus-mark-article-hook
924                '(lambda ()
925                   ;; Mark the selected article as saved.
926                   (gnus-summary-mark-as-unread gnus-current-article)
927                   ;; Put "+" on the current subject.
928                   (gnus-summary-set-current-mark "+")
929                   ))
930
931`gnus-prepare-article-hook'
932     Called with no arguments after preparing message body, but before
933     preparing header fields which is automatically generated if its
934     value is non-`nil'.  Text changes made by this hook does not
935     affect on the editing text.  The default hook inserts a signature
936     file by calling the function `gnus-inews-insert-signature'.
937
938`gnus-inews-article-hook'
939     Called with no arguments before posting an article if its value is
940     non-`nil'.  This hook is called just before sending an article to
941     the NNTP server or calling the `inews' program.  Text changes made
942     by this hook does not affect on the editing text.  It is no
943     recommended to alter the number of lines of the article since
944     `Lines:' field may be already there.  The default hook does FCC
945     (save an article to the specified file) by calling the function
946     `gnus-inews-do-fcc'.
947
948`gnus-exit-group-hook'
949     Called with no arguments when exiting the current newsgroup if its
950     value is non-`nil'.  If your machine is so slow that exiting from
951     Summary Mode takes a long time, you can inhibit marking articles
952     as read by using cross-reference information in the `Xref:' field
953     by setting the variable `gnus-newsgroup-headers' to `nil' in this
954     hook.
955
956`gnus-exit-gnus-hook'
957     Called with no arguments when exiting GNUS if its value is
958     non-`nil'.  If you want to clear out Emacs buffers which were
959     created by GNUS and remain afterwards, you can use this hook.
960
961     The following example shows how to kill a buffer which was used for
962     posting news.
963
964          (setq gnus-exit-gnus-hook
965                '(lambda ()
966                   ;; Kill a buffer used for posting news.
967                   (and (get-buffer "*post-news*")
968                        (kill-buffer "*post-news*"))))
969
970`gnus-suspend-gnus-hook'
971     Called with no arguments when suspending GNUS if its value is
972     non-`nil'.  The purpose is the same as the hook
973     `gnus-exit-gnus-hook'.
974
975`gnus-save-newsrc-hook'
976     Called with no arguments before saving the startup file `.newsrc'
977     if its value is non-`nil'.  This hook is intended to change the way
978     of backing up the startup file.
979
980
981File: gnus,  Node: Troubleshooting,  Next: Customization,  Prev: Kill File,  Up: Top
982
983Troubleshooting GNUS
984********************
985
986   Emacs may hang up while waiting for NNTP server responses.  This may
987be caused by a buggy select routine of your operating system.  If so,
988the problem may be solved by loading the source code for the library
989`nntp.el' instead of running the byte-compiled version.  If you still
990have problems with it, set the variable `nntp-buggy-select' to `t'.
991
992   Emacs may hang up while retrieving headers of a large newsgroup.  The
993reason is that too many requests have been sent to the NNTP server
994without reading replies to them.  This causes a deadlock of Emacs and
995the server.  In this case, the number of requests sent to the server at
996one time must be reduced.  Set the variable `nntp-maximum-request' to a
997lower value than the default.  The optimal value depends on your
998computing environment.
999
1000
1001File: gnus,  Node: Reporting Bugs,  Next: Index,  Prev: Customization,  Up: Top
1002
1003Reporting Bugs
1004**************
1005
1006Mailing Lists and USENET Newsgroup
1007==================================
1008
1009   There are two mailing lists and one USENET newsgroup for discussing
1010GNUS related topics.  These are intended for exchanging useful
1011information about GNUS, such as bug reports, useful hooks, and
1012extensions of GNUS.  If you have any questions or problems, feel free to
1013ask about them.  Suggestions are also welcome.
1014
1015`gnu.emacs.gnus'
1016     This is a USENET newsgroup under the gnu.all hierarchy which is
1017     concerned with the GNU Project of the Free Software Foundation.
1018
1019`info-gnus-english@tut.cis.ohio-state.edu'
1020     This is an Internet mailing list which is gated bi-directionally
1021     with the gnu.emacs.gnus newsgroup.  English is the official
1022     language of the list.  Please send subscription requests to:
1023
1024          info-gnus-english-request@tut.cis.ohio-state.edu
1025
1026`info-gnus@flab.Fujitsu.CO.JP'
1027     This is a JUNET mailing list.  Messages of info-gnus-english and
1028     gnu.emacs.gnus are forwarded to this list.  English and Japanese
1029     are the official languages of the list.  Please send subscription
1030     requests to:
1031
1032          info-gnus-request@flab.Fujitsu.CO.JP
1033
1034   The major difference between info-gnus-english/gnu.emacs.gnus and
1035info-gnus is the official language.  There is no need to subscribe to
1036info-gnus if you cannot read messages written in Japanese since most
1037discussions and important announcements will be sent to
1038info-gnus-english.
1039
1040How to Report a Bug
1041===================
1042
1043   If you find a bug, it is important to report it and to report it in a
1044way which is useful.  If it is a bug of a lisp program, what is the most
1045useful is an exact backtrace information of the lisp program together
1046with the version number of GNUS that you are using.
1047
1048   To make the backtrace information, you must set the Emacs variable
1049`debug-on-error' to `t' before the error happens.  A backtrace obtained
1050from a byte-compiled lisp program is not usually understandable.  To
1051make a human readable backtrace, load the source program which is not
1052byte-compiled yet and then produce the error.
1053
1054   *note Reporting Bugs: (emacs)Bugs, for more information.
1055
1056