[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Gnus can save articles in a number of ways. Below is the documentation
for saving articles in a fairly straight-forward fashion (i.e., little
processing of the article is done before it is saved). For a different
approach (uudecoding, unsharing) you should use gnus-uu
(see section 3.16 Decoding Articles).
For the commands listed here, the target is a file. If you want to
save to a group, see the B c (gnus-summary-copy-article
)
command (see section 3.25 Mail Group Commands).
If gnus-save-all-headers
is non-nil
, Gnus will not delete
unwanted headers before saving the article.
If the preceding variable is nil
, all headers that match the
gnus-saved-headers
regexp will be kept, while the rest will be
deleted before saving.
gnus-summary-save-article
).
gnus-summary-save-article-mail
).
gnus-summary-save-article-rmail
).
gnus-summary-save-article-file
).
gnus-summary-write-article-file
).
gnus-summary-save-article-body-file
).
gnus-summary-save-article-folder
).
gnus-summary-save-article-vm
).
gnus-summary-pipe-output
).
If given a symbolic prefix (see section 8.3 Symbolic Prefixes), include the
complete headers in the piped output.
gnus-summary-muttprint-program
.
(gnus-summary-muttprint
).
All these commands use the process/prefix convention
(see section 8.1 Process/Prefix). If you save bunches of articles using these
functions, you might get tired of being prompted for files to save each
and every article in. The prompting action is controlled by
the gnus-prompt-before-saving
variable, which is always
by
default, giving you that excessive prompting action you know and
loathe. If you set this variable to t
instead, you'll be prompted
just once for each series of articles you save. If you like to really
have Gnus do all your thinking for you, you can even set this variable
to nil
, which means that you will never be prompted for files to
save articles in. Gnus will simply save all the articles in the default
files.
You can customize the gnus-default-article-saver
variable to make
Gnus do what you want it to. You can use any of the six ready-made
functions below, or you can create your own.
gnus-summary-save-in-rmail
gnus-rmail-save-name
variable to get a file name to save the
article in. The default is gnus-plain-save-name
.
gnus-summary-save-in-mail
gnus-mail-save-name
variable to get a file name to save the
article in. The default is gnus-plain-save-name
.
gnus-summary-save-in-file
gnus-file-save-name
variable to get a file name to save the
article in. The default is gnus-numeric-save-name
.
gnus-summary-write-to-file
gnus-file-save-name
variable to get a file name to save the
article in. The default is gnus-numeric-save-name
.
gnus-summary-save-body-in-file
gnus-file-save-name
variable to get a file name to save the
article in. The default is gnus-numeric-save-name
.
gnus-summary-save-in-folder
rcvstore
from the MH
library. Uses the function in the gnus-folder-save-name
variable
to get a file name to save the article in. The default is
gnus-folder-save-name
, but you can also use
gnus-Folder-save-name
, which creates capitalized names.
gnus-summary-save-in-vm
All of these functions, except for the last one, will save the article
in the gnus-article-save-directory
, which is initialized from the
SAVEDIR
environment variable. This is `~/News/' by
default.
As you can see above, the functions use different functions to find a suitable name of a file to save the article in. Below is a list of available functions that generate names:
gnus-Numeric-save-name
gnus-numeric-save-name
gnus-Plain-save-name
gnus-plain-save-name
gnus-sender-save-name
You can have Gnus suggest where to save articles by plonking a regexp into
the gnus-split-methods
alist. For instance, if you would like to
save articles related to Gnus in the file `gnus-stuff', and articles
related to VM in `vm-stuff', you could set this variable to something
like:
(("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff") ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff") (my-choosing-function "../other-dir/my-stuff") ((equal gnus-newsgroup-name "mail.misc") "mail-stuff")) |
We see that this is a list where each element is a list that has two
elements--the match and the file. The match can either be
a string (in which case it is used as a regexp to match on the article
head); it can be a symbol (which will be called as a function with the
group name as a parameter); or it can be a list (which will be
eval
ed). If any of these actions have a non-nil
result,
the file will be used as a default prompt. In addition, the
result of the operation itself will be used if the function or form
called returns a string or a list of strings.
You basically end up with a list of file names that might be used when saving the current article. (All "matches" will be used.) You will then be prompted for what you really want to use as a name, with file name completion over the results from applying this variable.
This variable is ((gnus-article-archive-name))
by default, which
means that Gnus will look at the articles it saves for an
Archive-name
line and use that as a suggestion for the file
name.
Here's an example function to clean up file names somewhat. If you have lots of mail groups called things like `nnml:mail.whatever', you may want to chop off the beginning of these group names before creating the file name to save to. The following will do just that:
(defun my-save-name (group) (when (string-match "^nnml:mail." group) (substring group (match-end 0)))) (setq gnus-split-methods '((gnus-article-archive-name) (my-save-name))) |
Finally, you have the gnus-use-long-file-name
variable. If it is
nil
, all the preceding functions will replace all periods
(`.') in the group names with slashes (`/')---which means that
the functions will generate hierarchies of directories instead of having
all the files in the top level directory
(`~/News/alt/andrea-dworkin' instead of
`~/News/alt.andrea-dworkin'.) This variable is t
by default
on most systems. However, for historical reasons, this is nil
on
Xenix and usg-unix-v machines by default.
This function also affects kill and score file names. If this variable
is a list, and the list contains the element not-score
, long file
names will not be used for score files, if it contains the element
not-save
, long file names will not be used for saving, and if it
contains the element not-kill
, long file names will not be used
for kill files.
If you'd like to save articles in a hierarchy that looks something like a spool, you could
(setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy (setq gnus-default-article-saver 'gnus-summary-save-in-file) ; no encoding |
Then just save with o. You'd then read this hierarchy with
ephemeral nneething
groups---G D in the group buffer, and
the top level directory as the argument (`~/News/'). Then just walk
around to the groups/directories with nneething
.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |