If your system administrator has set things up properly, starting Gnus and reading news is extremely easy - you just type M-x gnus.
If things do not go smoothly at startup, you have to twiddle some variables.
The gnus-select-method
variable controls how Gnus finds news.
This variable should be a list where the first element says how
and the second element says where. This method is is your native
method. All groups that are not fetched with this method are foreign
groups.
For instance, if you want to get your daily dosage of news from the `news.somewhere.edu' NNTP server, you'd say:
(setq gnus-select-method '(nntp "news.somewhere.edu"))
If you want to read directly from the local spool, say:
(setq gnus-select-method '(nnspool ""))
If you can use a local spool, you probably should, as it will almost certainly be much faster.
If this variable is not set, Gnus will take a look at the
NNTPSERVER
environment variable. If that isn't set either, it
will try to use the machine that is running Emacs as an NNTP
server.
If gnus-nntp-server
is set, this variable will override
gnus-select-method
. You should therefore set
gnus-nntp-server
to nil
, which is what it is by default.
You can also make Gnus prompt you interactively for the name of an
NNTP server. If you give a non-numerical prefix to gnus
(i.e., C-u M-x gnus), Gnus will let you choose between the servers
in the gnus-secondary-servers
list (if any). You can also just
type in the name of any server you feel like visiting.
However, if you use one NNTP server regularly, and are just
interested in a couple of groups from a different server, you would be
better served by using the gnus-group-browse-foreign-server
command from the group buffer. It will let you have a look at what
groups are available, and you can subscribe to any of the groups you
want to. This also makes `.newsrc' maintenance much tidier.
See section Foreign Groups.
A slightly different approach to foreign groups is to set the
gnus-secondary-select-methods
variable. The select methods
listed in this variable are in many ways just as native as the
gnus-select-method
server. They will also be queried for active
files during startup (if that's required), and new newsgroups that
appear on these servers will be subscribed (or not) just as native
groups are.
For instance, if you use the nnmbox
backend to read you mail, you
would typically set this variable to
(setq gnus-secondary-select-methods '((nnmbox "")))
If no startup files exist, Gnus will try to determine what groups should be subscribed by default.
If the variable gnus-default-subscribed-newsgroups
is set, Gnus
will subscribe you to just those groups in that list, leaving the rest
killed. Your system administrator should have set this variable to
something useful.
Since she hasn't, Gnus will just subscribe you to a few randomly picked groups (i.e., `*.newusers'). (Random is here defined as "whatever Lars thinks you should read".)
You'll also be subscribed to the Gnus documentation group, which should help you with most common problems.
If gnus-default-subscribed-newsgroups
is t
, Gnus will just
use the normal functions for handling new groups, and not do anything
special.
If the default server is down, Gnus will understandably have some problems starting. However, if you have some mail groups in addition to the news groups, you may want to start Gnus anyway.
Gnus, being the trusting sort of program, will ask whether to proceed without a native select method if that server can't be contacted. This will happen whether the server doesn't actually exist (i.e., you have given the wrong address) or the server has just momentarily taken ill for some reason or other.
If Gnus says "nntp server on <your server> can't be opened. Continue?", you do not want to continue unless you have some foreign groups that you want to read. Even if you don't, Gnus will let you continue, but you'll find it difficult to actually do anything in the group buffer. But, hey, that's your problem. Blllrph!
What Gnus does when it encounters a new group is determined by the
gnus-subscribe-newsgroup-method
variable.
This variable should contain a function. Some handy pre-fab values are:
gnus-subscribe-randomly
gnus-subscribe-alphabetically
gnus-subscribe-hierarchically
gnus-subscribe-interactively
gnus-subscribe-zombies
A closely related variable is
gnus-subscribe-hierarchical-interactive
. (That's quite a
mouthful.) If this variable is non-nil
, Gnus will ask you in a
hierarchical fashion whether to subscribe to new groups or not. Gnus
will ask you for each sub-hierarchy whether you want to descend the
hierarchy or not.
One common way to control which new newsgroups should be subscribed or ignored is to put an options line at the start of the `.newsrc' file. Here's an example:
options -n !alt.all !rec.all sci.all
This line obviously belongs to a serious-minded intellectual scientific
person (or she may just be plain old boring), because it says that all
groups that have names beginning with `alt' and `rec' should
be ignored, and all groups with names beginning with `sci' should
be subscribed. Gnus will not use the normal subscription method for
subscribing these groups.
gnus-subscribe-options-newsgroup-method
is used instead. This
variable defaults to gnus-subscribe-alphabetically
.
If you don't want to mess with your `.newsrc' file, you can just
set the two variables gnus-options-subscribe
and
gnus-options-not-subscribe
. These two variables do exactly the
same as the `.newsrc' options -n trick. Both are regexps, and if
the the new group matches the first, it will be unconditionally
subscribed, and if it matches the latter, it will be ignored.
If you are satisfied that you really never want to see any new groups,
you could set gnus-check-new-newsgroups
to nil
. This will
also save you some time at startup. Even if this variable is
nil
, you can always subscribe to the new groups just by pressing
U in the group buffer (see section Group Maintenance).
Gnus normally determines whether a group is new or not by comparing the
list of groups from the active file(s) with the lists of subscribed and
dead groups. This isn't a particularly fast method. If
gnus-check-new-newsgroups
is ask-server
, Gnus will ask the
server for new groups since the last time. This is both faster &
cheaper. This also means that you can get rid of the list of killed
groups altogether, so you may set gnus-save-killed-list
to
nil
, which will save time both at startup, at exit, and all over.
Saves disk space, too. Why isn't this the default, then?
Unfortunately, not all servers support this function.
This variable can also be a list of select methods. If so, Gnus will
issue an ask-server
command to each of the select methods, and
subscribe them (or not) using the normal methods. This might be handy
if you are monitoring a few servers for new groups. A side effect is
that startup will take much longer, so you can meditate while waiting.
Use the mantra "dingnusdingnusdingnus" to achieve permanent happiness.
Now, you all know about the `.newsrc' file. All subscription information is traditionally stored in this file.
Things got a bit more complicated with GNUS. In addition to keeping the `.newsrc' file updated, it also used a file called `.newsrc.el' for storing all the information that didn't fit into the `.newsrc' file. (Actually, it duplicated everything in the `.newsrc' file.) GNUS would read whichever one of these files that were the most recently saved, which enabled people to swap between GNUS and other newsreaders.
That was kinda silly, so Gnus went one better: In addition to the `.newsrc' and `.newsrc.el' files, Gnus also has a file called `.newsrc.eld'. It will read whichever of these files that are most recent, but it will never write a `.newsrc.el' file.
You can also turn off writing the `.newsrc' file by setting
gnus-save-newsrc-file
to nil
, which means you can delete
the file and save some space, as well as making exit from Gnus faster.
However, this will make it impossible to use other newsreaders than
Gnus. But hey, who would want to, right?
If gnus-save-killed-list
is nil
, Gnus will not save the
list of killed groups to the startup file. This will save both time
(when starting and quitting) and space (on disk). It will also means
that Gnus has no record of what groups are new or old, so the automatic
new groups subscription methods become meaningless. You should always
set gnus-check-new-newsgroups
to nil
or ask-server
if you set this variable to nil
(see section New Groups).
The gnus-startup-file
variable says where the startup files are.
The default value is `~/.newsrc', with the Gnus (El Dingo) startup
file being whatever that one is with a `.eld' appended.
gnus-save-newsrc-hook
is called before saving the `.newsrc'
file.
Whenever you do something that changes the Gnus data (reading articles, catching up, killing/subscribing groups), the change is added to a special dribble buffer. This buffer is auto-saved the normal Emacs way. If your Emacs should crash before you have saved the `.newsrc' files, all changes you have made can be recovered from this file.
If Gnus detects this file at startup, it will ask the user whether to read it. The auto save file is deleted whenever the real startup file is saved.
If gnus-use-dribble-file
is nil
, Gnus won't create and
maintain a dribble buffer.
When Gnus starts, or indeed whenever it tries to determine whether new articles have arrived, it reads the active file. This is a very large file that lists all the active groups and articles on the NNTP server.
Before examining the active file, Gnus deletes all lines that match the
regexp gnus-ignored-newsgroups
. This is done primarily to reject
any groups with bogus names, but you can use this variable to make Gnus
ignore hierarchies you aren't ever interested in. This variable is
nil
by default, and will slow down active file handling somewhat
if you set it to anything else.
The active file can be rather Huge, so if you have a slow network, you
can set gnus-read-active-file
to nil
to prevent Gnus from
reading the active file.
Gnus will try to make do by just getting information on the groups that you actually subscribe to.
Note that if you subscribe to lots and lots of groups, setting this
variable to nil
will probably make Gnus slower, not faster. At
present, having this variable nil
will slow Gnus down
considerably, unless you read news over a 2400 baud modem.
This variable can also have the value some
. Gnus will then
attempt to read active info only on the subscribed groups. On some
servers this is quite fast (on sparkling, brand new INN servers that
support the `LIST ACTIVE group' command), on others this is not
fast at all. In any case, some
should be faster than nil
,
and is certainly faster than t
over slow lines.
If this variable is nil
, Gnus will as for group info in total
lock-step, which isn't very fast. If it is some
and you use an
NNTP server, Gnus will pump out commands as fast as it can, and read all
the replies in one swoop. This will normally result in better
performance, but if the server does not support the aforementioned
`LIST ACTIVE group' command, this isn't very nice to the server.
In any case, if you use some
or nil
, you should kill all
groups that you aren't interested in.
gnus-load-hook
gnus-startup-hook
gnus-check-bogus-newsgroups
nil
, Gnus will check for and delete all bogus groups at
startup. A bogus group is a group that you have in your
`.newsrc' file, but doesn't exist on the news server. Checking for
bogus groups isn't very quick, so to save time and resources, it's best
to leave this option off, and instead do the checking for bogus groups
once in a while from the group buffer (see section Group Maintenance).
gnus-inhibit-startup-message
nil
, the startup message won't be displayed. That way,
your boss might not notice that you are reading news instead of doing
your job.
gnus-no-groups-message