[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17 Decoding Articles

Sometime users post articles (or series of articles) that have been encoded in some way or other. Gnus can decode them for you.

All these functions use the process/prefix convention (see section Process/Prefix) for finding out what articles to work on, with the extension that a “single article” means “a single series”. Gnus can find out by itself what articles belong to a series, decode all the articles and unpack/view/save the resulting file(s).

Gnus guesses what articles are in the series according to the following simplish rule: The subjects must be (nearly) identical, except for the last two numbers of the line. (Spaces are largely ignored, however.)

For example: If you choose a subject called ‘cat.gif (2/3)’, Gnus will find all the articles that match the regexp ‘^cat.gif ([0-9]+/[0-9]+).*$’.

Subjects that are non-standard, like ‘cat.gif (2/3) Part 6 of a series’, will not be properly recognized by any of the automatic viewing commands, and you have to mark the articles manually with #.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.1 Uuencoded Articles

X u

Uudecodes the current series (gnus-uu-decode-uu).

X U

Uudecodes and saves the current series (gnus-uu-decode-uu-and-save).

X v u

Uudecodes and views the current series (gnus-uu-decode-uu-view).

X v U

Uudecodes, views and saves the current series (gnus-uu-decode-uu-and-save-view).

Remember that these all react to the presence of articles marked with the process mark. If, for instance, you’d like to decode and save an entire newsgroup, you’d typically do M P a (gnus-uu-mark-all) and then X U (gnus-uu-decode-uu-and-save).

All this is very much different from how gnus-uu worked with GNUS 4.1, where you had explicit keystrokes for everything under the sun. This version of gnus-uu generally assumes that you mark articles in some way (see section Setting Process Marks) and then press X u.

Note: When trying to decode articles that have names matching gnus-uu-notify-files, which is hard-coded to ‘[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)’, gnus-uu will automatically post an article on ‘comp.unix.wizards’ saying that you have just viewed the file in question. This feature can’t be turned off.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.2 Shell Archives

Shell archives (“shar files”) used to be a popular way to distribute sources, but it isn’t used all that much today. In any case, we have some commands to deal with these:

X s

Unshars the current series (gnus-uu-decode-unshar).

X S

Unshars and saves the current series (gnus-uu-decode-unshar-and-save).

X v s

Unshars and views the current series (gnus-uu-decode-unshar-view).

X v S

Unshars, views and saves the current series (gnus-uu-decode-unshar-and-save-view).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.3 PostScript Files

X p

Unpack the current PostScript series (gnus-uu-decode-postscript).

X P

Unpack and save the current PostScript series (gnus-uu-decode-postscript-and-save).

X v p

View the current PostScript series (gnus-uu-decode-postscript-view).

X v P

View and save the current PostScript series (gnus-uu-decode-postscript-and-save-view).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.4 Other Files

X o

Save the current series (gnus-uu-decode-save).

X b

Unbinhex the current series (gnus-uu-decode-binhex). This doesn’t really work yet.

X Y

yEnc-decode the current series and save it (gnus-uu-decode-yenc).


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.5 Decoding Variables

Adjective, not verb.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.5.1 Rule Variables

Gnus uses rule variables to decide how to view a file. All these variables are of the form

 
      (list '(regexp1 command2)
            '(regexp2 command2)
            ...)
gnus-uu-user-view-rules

This variable is consulted first when viewing files. If you wish to use, for instance, sox to convert an ‘.au’ sound file, you could say something like:

 
(setq gnus-uu-user-view-rules
      (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
gnus-uu-user-view-rules-end

This variable is consulted if Gnus couldn’t make any matches from the user and default view rules.

gnus-uu-user-archive-rules

This variable can be used to say what commands should be used to unpack archives.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.5.2 Other Decode Variables

gnus-uu-grabbed-file-functions

All functions in this list will be called right after each file has been successfully decoded—so that you can move or view files right away, and don’t have to wait for all files to be decoded before you can do anything. Ready-made functions you can put in this list are:

gnus-uu-grab-view

View the file.

gnus-uu-grab-move

Move the file (if you’re using a saving function.)

gnus-uu-be-dangerous

Specifies what to do if unusual situations arise during decoding. If nil, be as conservative as possible. If t, ignore things that didn’t work, and overwrite existing files. Otherwise, ask each time.

gnus-uu-ignore-files-by-name

Files with name matching this regular expression won’t be viewed.

gnus-uu-ignore-files-by-type

Files with a MIME type matching this variable won’t be viewed. Note that Gnus tries to guess what type the file is based on the name. gnus-uu is not a MIME package (yet), so this is slightly kludgy.

gnus-uu-tmp-dir

Where gnus-uu does its work.

gnus-uu-do-not-unpack-archives

Non-nil means that gnus-uu won’t peek inside archives looking for files to display.

gnus-uu-view-and-save

Non-nil means that the user will always be asked to save a file after viewing it.

gnus-uu-ignore-default-view-rules

Non-nil means that gnus-uu will ignore the default viewing rules.

gnus-uu-ignore-default-archive-rules

Non-nil means that gnus-uu will ignore the default archive unpacking commands.

gnus-uu-kill-carriage-return

Non-nil means that gnus-uu will strip all carriage returns from articles.

gnus-uu-unmark-articles-not-decoded

Non-nil means that gnus-uu will mark unsuccessfully decoded articles as unread.

gnus-uu-correct-stripped-uucode

Non-nil means that gnus-uu will try to fix uuencoded files that have had trailing spaces deleted.

gnus-uu-pre-uudecode-hook

Hook run before sending a message to uudecode.

gnus-uu-view-with-metamail

Non-nil means that gnus-uu will ignore the viewing commands defined by the rule variables and just fudge a MIME content type based on the file name. The result will be fed to metamail for viewing.

gnus-uu-save-in-digest

Non-nil means that gnus-uu, when asked to save without decoding, will save in digests. If this variable is nil, gnus-uu will just save everything in a file without any embellishments. The digesting almost conforms to RFC 1153—no easy way to specify any meaningful volume and issue numbers were found, so I simply dropped them.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.5.3 Uuencoding and Posting

gnus-uu-post-include-before-composing

Non-nil means that gnus-uu will ask for a file to encode before you compose the article. If this variable is t, you can either include an encoded file with C-c C-i or have one included for you when you post the article.

gnus-uu-post-length

Maximum length of an article. The encoded file will be split into how many articles it takes to post the entire file.

gnus-uu-post-threaded

Non-nil means that gnus-uu will post the encoded file in a thread. This may not be smart, as no other decoder I have seen is able to follow threads when collecting uuencoded articles. (Well, I have seen one package that does that—gnus-uu, but somehow, I don’t think that counts…) Default is nil.

gnus-uu-post-separate-description

Non-nil means that the description will be posted in a separate article. The first article will typically be numbered (0/x). If this variable is nil, the description the user enters will be included at the beginning of the first article, which will be numbered (1/x). Default is t.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.17.6 Viewing Files

After decoding, if the file is some sort of archive, Gnus will attempt to unpack the archive and see if any of the files in the archive can be viewed. For instance, if you have a gzipped tar file ‘pics.tar.gz’ containing the files ‘pic1.jpg’ and ‘pic2.gif’, Gnus will uncompress and de-tar the main file, and then view the two pictures. This unpacking process is recursive, so if the archive contains archives of archives, it’ll all be unpacked.

Finally, Gnus will normally insert a pseudo-article for each extracted file into the summary buffer. If you go to these “articles”, you will be prompted for a command to run (usually Gnus will make a suggestion), and then the command will be run.

If gnus-view-pseudo-asynchronously is nil, Emacs will wait until the viewing is done before proceeding.

If gnus-view-pseudos is automatic, Gnus will not insert the pseudo-articles into the summary buffer, but view them immediately. If this variable is not-confirm, the user won’t even be asked for a confirmation before viewing is done.

If gnus-view-pseudos-separately is non-nil, one pseudo-article will be created for each file to be viewed. If nil, all files that use the same viewing command will be given as a list of parameters to that command.

If gnus-insert-pseudo-articles is non-nil, insert pseudo-articles when decoding. It is t by default.

So; there you are, reading your pseudo-articles in your virtual newsgroup from the virtual server; and you think: Why isn’t anything real anymore? How did we get here?


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on January 25, 2015 using texi2html 1.82.