Gnus Manual. Node: Startup Files

PREVChanging Servers UPStarting Up NEXTAuto Save

1.8: Startup Files

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 also duplicated everything in the `.newsrc' file.) GNUS would read whichever one of these files was 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 should never delete the `.newsrc.eld' file---it contains much information not stored in the `.newsrc' file.

You can 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 exiting 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 (default t) 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 mean 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 New Groups). This variable can also be a regular expression. If that's the case, remove all groups that do not match this regexp before saving. This can be useful in certain obscure situations that involve several servers where not all servers support ask-server.

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 any of the newsrc files, while gnus-save-quick-newsrc-hook is called just before saving the `.newsrc.eld' file, and gnus-save-standard-newsrc-hook is called just before saving the `.newsrc' file. The latter two are commonly used to turn version control on or off. Version control is on by default when saving the startup files. If you want to turn backup creation off, say something like:

(defun turn-off-backup ()
  (set (make-local-variable 'backup-inhibited) t))

(add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
(add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)

When Gnus starts, it will read the gnus-site-init-file (`.../site-lisp/gnus' by default) and gnus-init-file (`~/.gnus' by default) files. These are normal Emacs Lisp files and can be used to avoid cluttering your `~/.emacs' and `site-init' files with Gnus stuff. Gnus will also check for files with the same names as these, but with `.elc' and `.el' suffixes. In other words, if you have set gnus-init-file to `~/.gnus', it will look for `~/.gnus.elc', `~/.gnus.el', and finally `~/.gnus' (in this order).

PREVChanging Servers UPStarting Up NEXTAuto Save