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

9.1 Turning Gnus into a web browser!

Nnshimbun’ is a Gnus back end, but it is distributed with emacs-w3m, not Gnus, exceptionally. ‘Nnshimbun’ allows you to turn Gnus into an exceptionally useful web browser. You can skim through the articles on a newspaper’s web server without having to see all the advertisement. You can read articles in mailing list archives as if you were subscribed to the list. You can also read submissions in bulletin boards, etc... Note that if you want to followup, you still need to use emacs-w3m as Gnus can’t post via the web with ‘nnshimbun’.

See also Reading HTML mails in Gnus for rendering HTML messages with emacs-w3m if you use Gnus.

The easiest way to get started with ‘nnshimbun’ is to use something like the following in the Group buffer:

M-x gnus-group-make-shimbun-group <RET> asahi <RET> national <RET>

Replace ‘asahi’ and ‘national’ with the keyword corresponding to the server you’d like to connect to and the group you’re interested in respectively. You can complete both of those names by using <TAB> or <SPC>.

You can also bind that to a key if there’s enough room in the gnus-group-mode-map map, you can add something like the following in your ‘~/.gnus.el’ file:

 
(eval-after-load "gnus-group"
  '(define-key gnus-group-mode-map "Gn"
     'gnus-group-make-shimbun-group))

Then, you can use G n instead of M-x gnus-group-make-shimbun-group.

Could someone book this keystroke at the Gnus Tower?

Besides this, you can use the gnus-group-make-shimbun-groups command in order to make all groups for the specified server.

Nnshimbun’ simply fetches HTML contents from the web server and displays them as an article, but it will never save articles in the local file system, except if you use persistent articles (see (gnus)Persistent Articles section ‘Persistent Articles’ in The Gnus Manual). ‘Nnshimbun’ uses NOV files for each ‘nnshimbun’ group, and its back end is almost the same as ‘nnml’.

The following ‘nnshimbun’ variables can be customized:

nnshimbun-keep-backlog

This variable overrides the gnus-keep-backlog variable (see (gnus)Article Backlog section ‘Article Backlog’ in The Gnus Manual) in ‘nnshimbun’ groups. If you set nnshimbun-keep-backlog to a number n, ‘nnshimbun’ will store at most n old articles in a buffer for later re-fetching. If this variable is non-nil and is not a number, ‘nnshimbun’ will store all read articles (this is not a good idea). The default value is 300.

Note that smaller values may spoil the prefetch-articles feature (see below), since ‘nnshimbun’ uses the backlog to keep the prefetched articles.

nnshimbun-directory

Directory where ‘nnshimbun’ saves NOV and marks files. The default value is ‘~/News/shimbun/’. This is a server variable (see (gnus)Server Variables section ‘Server Variables’ in The Gnus Manual).

nnshimbun-default-group-level

The default group level overriding gnus-level-default-subscribed. It will be applied to newly created ‘nnshimbun’ groups. The default value is nil. This is a server variable (see (gnus)Server Variables section ‘Server Variables’ in The Gnus Manual).

You can use the specially made group parameter for ‘nnshimbun’ in addition to the standard group parameters provided by Gnus(5). Several parameters for ‘nnshimbun’ are collected into the single group parameter nnshimbun-group-parameters which is a property list (the values can be different for every group). Here’s an example:

 
'(index-range all prefetch-articles off encapsulate-images on
              expiry-wait 6)

Below is the documentation for those group parameters and related variables.

prefetch-articles

In a group where this group parameter is set to something else than off or nil, ‘nnshimbun’ not only checks for new articles, but also downloads them. Though it will slow checking of new articles down, you won’t be kept waiting when reading articles. In the group where this group parameter is not set or its value is nil, the value of the nnshimbun-pre-fetch-article variable (off by default) is used instead.

encapsulate-images

In a group where this group parameter is set to something else than off or nil, ‘nnshimbun’ will put image data embedded in the original contents into an article as ‘multipart/related’ parts of the MIME format. In the group where this group parameter is not set or its value is nil, the value of the nnshimbun-encapsulate-images variable is used instead. The default value for the nnshimbun-encapsulate-images variable is the value of the shimbun-encapsulate-images variable which is provided in the ‘shimbun’ library (the default value is probably t).

index-range

You can specify the range of articles to be fetched from the web server using the index-range group parameter. To specify the range, use the following values:

nil
all

all pages

last

only the latest page

integer N

the latest N pages

Nnshimbun’ checks whether there are new articles by parsing the index page of the server. It is possible that there are two or more index pages on the server. For instance, in the case of the mailing list servers, index pages are generally classified according to the date on which the article was posted. It would take a considerable amount of time to check all those huge index pages especially if you are connecting via a slow line.

If it is possible, ‘nnshimbun’ won’t check index pages which have already been checked at the last connection. If you want to save even more time, use last. It makes ‘nnshimbun’ refer to only the latest index page for checking new articles.

In the group where the index-range group parameter is not set or its value is nil, the value of the nnshimbun-index-range variable (2 by default) is used.

nnshimbun-group-parameters-alist

This is an Emacs Lisp variable, an alist of regexp of group names and ‘nnshimbun’ group parameters. The default value is nil. Each element may have the form ‘(REGEXP KEYWORD VALUE KEYWORD VALUE...)’, for example:

 
'("^nnshimbun\\+asahi:" index-range all prefetch-articles off
  encapsulate-images on expiry-wait 6)

Since you can use this variable to specify the same ‘nnshimbun’ group parameters for two or more groups which have similar names (i.e., those groups are likely to have similar characteristics each other), it is useful that it can be used instead of specifying the ‘nnshimbun’ group parameters to several groups respectively. If the group parameter has already been set in a group, that takes precedence over this variable.

You can instruct ‘nnshimbun’ to expire articles(6). Keep in mind that when an article is expired, it is not deleted from the remote server, it’s still available there. What is deleted is the line in your own NOV file for ‘nnshimbun(7) corresponding to the article to be expired. Then the article won’t appear in the Summary buffer, forever and ever.

If you don’t expire articles in ‘nnshimbun’ groups, the NOV files will continue to grow fat indefinitely and you may see very old articles in the Summary buffer as if they were existing (in fact, they might have expired three years ago on the remote server!). Even if you try to read such an article, nothing will appear in the article buffer. On the other hand, most mailing list servers generally offer all the past articles. You may not feel like expiring articles in such groups in order to look back with nostalgia to the good old days and to be able to read, eyes filled with tears, articles which you thought long gone.

You can mark ‘nnshimbun’ articles as expirable and specify the expiry period in each ‘nnshimbun’ group as well as the other mail back ends. However, there are a little differences between ‘nnshimbun’ and the other mail back ends:

The group parameters and the variables related to expiring ‘nnshimbun’ articles are:

expiry-wait

Don’t be confused, please. The expiry-wait group parameter is provided as one of the elements of nnshimbun-group-parameters, the specially made group parameter for ‘nnshimbun’. It has the same name and the same meaning as the standard group parameter. You may use whichever you like. If nnshimbun’s one is set to non-nil value, it takes precedence over the standard one. It is provided in order to concentrate things related to ‘nnshimbun’ at one place of the “Gnus Customize” buffer (which will appear by typing G c in the group buffer) and to realize managing collectively by the nnshimbun-group-parameters-alist variable(8). The values which can be used are a number of expiry period, never or immediate as well as the standard group parameter.

nnshimbun-keep-unparsable-dated-articles

If this variable is non-nil, the articles of which the time of creation (or the time of arrival) is unknown will never be expired, since their age is unknown. The default is t. If you set this variable to nil, the articles of which the time is unknown will also be expired unconditionally when the time to expire has come. Well, it might prove useful for a general cleaning at the end of a year.


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

This document was generated by TSUCHIYA Masatoshi on January 30, 2019 using texi2html 1.82.