@copying
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@quotation
Permission is granted to copy, distribute and/or modify this document
* Agent as Cache:: The Agent is a big cache too.
* Agent Expiry:: How to make old articles go away.
* Agent Regeneration:: How to recover from lost connections and other accidents.
+* Agent and flags:: How the Agent maintains flags.
* Agent and IMAP:: How to use the Agent with @acronym{IMAP}.
* Outgoing Messages:: What happens when you post/mail something?
* Agent Variables:: Customizing is fun.
@code{nil}. Otherwise, set it to @code{t} if you want to compare them
always in a case-insensitive manner.
+You can define different sorting to different groups via
+@code{gnus-parameters}. Here is an example to sort an @acronym{NNTP}
+group by reverse date to see the latest news at the top and an
+@acronym{RSS} group by subject. In this example, the first group is the
+Debian daily news group @code{gmane.linux.debian.user.news} from
+news.gmane.org. The @acronym{RSS} group corresponds to the Debian
+weekly news RSS feed
+@url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
+@xref{RSS}.
+
+@lisp
+(setq
+ gnus-parameters
+ '(("nntp.*gmane\\.debian\\.user\\.news"
+ (gnus-show-threads nil)
+ (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
+ (gnus-use-adaptive-scoring nil)
+ (gnus-use-scoring nil))
+ ("nnrss.*debian"
+ (gnus-show-threads nil)
+ (gnus-article-sort-functions 'gnus-article-sort-by-subject)
+ (gnus-use-adaptive-scoring nil)
+ (gnus-use-scoring t)
+ (gnus-score-find-score-files-function 'gnus-score-find-single)
+ (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
+@end lisp
+
@node Listing Groups
@section Listing Groups
@lisp
(setq gnus-thread-sort-functions
- '((lambda (t1 t2)
- (not (gnus-thread-sort-by-number t1 t2)))
+ '((not gnus-thread-sort-by-number)
gnus-thread-sort-by-score))
@end lisp
-Yet more examples. You can define different sorting to different
-groups. Here is an example for where one @acronym{NNTP} group is
-sorted by subject and the @acronym{RSS} group is sorted by date to see
-the latest news at the top.
-
-@lisp
-(require 'cl)
-
-(defun my-gnus-summary-mode-hook-group-select ()
- (flet ((lsetq (x val) ;; Local setq
- (set (make-local-variable x) val)))
- (cond
- ;; In Group buffer to make Debian daily news group press: G m
- ;; and point it to nntp server news.gmane.org and
- ;; group gmane.linux.debian.user.news
- ((string-match "nntp.*debian.user.news" gnus-newsgroup-name)
- (lsetq 'gnus-show-threads nil)
- (lsetq 'gnus-article-sort-functions 'gnus-article-sort-by-date-reverse)
- (lsetq 'gnus-use-adaptive-scoring nil)
- (lsetq 'gnus-use-scoring nil))
- ;; In Group buffer to read Debian weekly news RSS feed press: G R
- ;; and point it to url:
- ;; http://packages.debian.org/unstable/newpkg_main.en.rdf
- ((string-match "nnrss.*debian" gnus-newsgroup-name)
- (lsetq 'gnus-show-threads nil)
- (lsetq 'gnus-article-sort-functions 'gnus-article-sort-by-subject)
- (lsetq 'gnus-use-adaptive-scoring nil)
- (lsetq 'gnus-use-scoring t)
- (lsetq 'gnus-score-find-score-files-function 'gnus-score-find-single)
- (lsetq 'gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n")))))
-
-(defun my-gnus-summary-mode-hook ()
- (my-gnus-summary-mode-hook-group-select))
-@end lisp
-
@vindex gnus-thread-score-function
The function in the @code{gnus-thread-score-function} variable (default
@code{+}) is used for calculating the total score of a thread. Useful
gnus-article-sort-by-subject))
@end lisp
+You can define group specific sorting via @code{gnus-parameters},
+@xref{Group Parameters}.
@node Asynchronous Fetching
usually done automatically by Gnus if the message in question has a
@code{Content-Type} header that says that the message is @acronym{HTML}.
-If a prefix is given, a charset will be asked for.
+If a prefix is given, a charset will be asked for. If it is a number,
+the charset defined in @code{gnus-summary-show-article-charset-alist}
+(@pxref{Paging the Article}) will be used.
@vindex gnus-article-wash-function
The default is to use the function specified by
can use include:
@table @code
-@item W3
+@item w3
Use Emacs/W3.
@item w3m
Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
+@item w3m-standalone
+Use @uref{http://w3m.sourceforge.net/, w3m}.
+
@item links
Use @uref{http://links.sf.net/, Links}.
variable to @code{("multipart/signed")} and leave
@code{gnus-unbuttonized-mime-types} at the default value.
+You could also add @code{"multipart/alternative"} to this list to
+display radio buttons that allow you to choose one of two media types
+those mails include. See also @code{mm-discouraged-alternatives}
+(@pxref{Display Customization, ,Display Customization, emacs-mime, The
+Emacs MIME Manual}).
+
@item gnus-inhibit-mime-unbuttonizing
@vindex gnus-inhibit-mime-unbuttonizing
If this is non-@code{nil}, then all @acronym{MIME} parts get buttons. The
Mark all articles as read and go to the next group
(@code{gnus-summary-catchup-and-goto-next-group}).
+@item Z p
+@kindex Z p (Summary)
+@findex gnus-summary-catchup-and-goto-prev-group
+Mark all articles as read and go to the previous group
+(@code{gnus-summary-catchup-and-goto-prev-group}).
+
@item Z R
@itemx C-x C-s
@kindex Z R (Summary)
(nntp-via-rlogin-command "ssh")
@end lisp
-See also @code{nntp-via-rlogin-command-switches}.
+See also @code{nntp-via-rlogin-command-switches}. Here's an example for
+an indirect connection:
+@lisp
+(setq gnus-select-method
+ '(nntp "indirect"
+ (nntp-address "news.server.example")
+ (nntp-via-user-name "intermediate_user_name")
+ (nntp-via-address "intermediate.host.example")
+ (nntp-via-rlogin-command "ssh")
+ (nntp-end-of-line "\n")
+ (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none"))
+ (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)))
+@end lisp
If you're behind a firewall, but have direct access to the outside world
through a wrapper command like "runsocks", you could open a socksified
@item nntp-open-via-telnet-and-telnet
@findex nntp-open-via-telnet-and-telnet
-Does essentially also the same, but uses @samp{telnet} instead of
+Does essentially the same, but uses @samp{telnet} instead of
@samp{rlogin} to connect to the intermediate host.
@code{nntp-open-via-telnet-and-telnet}-specific variables:
XEmacs and want to use non-@acronym{ASCII} group names, you should set
the value for the @code{nnmail-pathname-coding-system} variable properly.
+The @code{nnrss} back end generates @samp{multipart/alternative}
+@acronym{MIME} articles in which each contains a @samp{text/plain} part
+and a @samp{text/html} part.
+
@cindex OPML
You can also use the following commands to import and export your
subscriptions from a file in @acronym{OPML} format (Outline Processor
the feeds from local files in @code{nnrss-directory}. You can use
the command @code{nnrss-generate-download-script} to generate a
download script using @command{wget}.
+
+@item nnrss-wash-html-in-text-plain-parts
+Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
+parts as @acronym{HTML}. The function specified by the
+@code{mm-text-html-renderer} variable (@pxref{Display Customization,
+,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
+to render text. If it is @code{nil}, which is the default, text will
+simply be folded. Leave it @code{nil} if you prefer to see
+@samp{text/html} parts.
@end table
The following code may be helpful, if you want to show the description in
The following code may be useful to open an nnrss url directly from the
summary buffer.
+
@lisp
(require 'browse-url)
(add-to-list 'nnmail-extra-headers nnrss-url-field)
@end lisp
+Even if you have added @code{"text/html"} to the
+@code{mm-discouraged-alternatives} variable (@pxref{Display
+Customization, ,Display Customization, emacs-mime, The Emacs MIME
+Manual}) since you don't want to see @acronym{HTML} parts, it might be
+more useful especially in @code{nnrss} groups to display
+@samp{text/html} parts. Here's an example of setting
+@code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
+Parameters}) in order to display @samp{text/html} parts only in
+@code{nnrss} groups:
+
+@lisp
+;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
+(eval-after-load "gnus-sum"
+ '(add-to-list
+ 'gnus-newsgroup-variables
+ '(mm-discouraged-alternatives
+ . '("text/html" "image/.*"))))
+
+;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
+(add-to-list
+ 'gnus-parameters
+ '("\\`nnrss:" (mm-discouraged-alternatives nil)))
+@end lisp
+
+
@node Customizing W3
@subsection Customizing W3
@cindex W3
* Agent as Cache:: The Agent is a big cache too.
* Agent Expiry:: How to make old articles go away.
* Agent Regeneration:: How to recover from lost connections and other accidents.
+* Agent and flags:: How the Agent maintains flags.
* Agent and IMAP:: How to use the Agent with @acronym{IMAP}.
* Outgoing Messages:: What happens when you post/mail something?
* Agent Variables:: Customizing is fun.
@cindex Agent Parameters
@table @code
-@item agent-cat-name
-The name of the category.
-
@item agent-groups
The list of groups that are in this category.
A predicate which (generally) gives a rough outline of which articles
are eligible for downloading; and
-@item agent-score-file
+@item agent-score
a score rule which (generally) gives you a finer granularity when
deciding what articles to download. (Note that this @dfn{download
score} is not necessarily related to normal scores.)
@item agent-high-score
an integer that overrides the value of @code{gnus-agent-high-score}.
-@item agent-length-when-short
+@item agent-short-article
an integer that overrides the value of
@code{gnus-agent-short-article}.
-@item agent-length-when-long
+@item agent-long-article
an integer that overrides the value of @code{gnus-agent-long-article}.
@item agent-enable-undownloaded-faces
@item J s
@kindex J s (Agent Summary)
-@findex gnus-agent-fetch-series
+@findex gnus-agent-summary-fetch-series
Download all processable articles in this group.
-(@code{gnus-agent-fetch-series}).
+(@code{gnus-agent-summary-fetch-series}).
@item J u
@kindex J u (Agent Summary)
are stored locally. An optional argument will mark articles in the
agent as unread.
-@node Agent and IMAP
-@subsection Agent and IMAP
-
-The Agent works with any Gnus back end, including nnimap. However,
-since there are some conceptual differences between @acronym{NNTP} and
-@acronym{IMAP}, this section (should) provide you with some information to
-make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
+@node Agent and flags
+@subsection Agent and flags
-The first thing to keep in mind is that all flags (read, ticked, etc)
-are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
-case for nntp. Thus Gnus need to remember flag changes when
-disconnected, and synchronize these flags when you plug back in.
+The Agent works with any Gnus back end including those, such as
+nnimap, that store flags (read, ticked, etc) on the server. Sadly,
+the Agent does not actually know which backends keep their flags in
+the backend server rather than in @file{.newsrc}. This means that the
+Agent, while unplugged or disconnected, will always record all changes
+to the flags in its own files.
-Gnus keeps track of flag changes when reading nnimap groups under the
-Agent. When you plug back in, Gnus will check if you have any changed
-any flags and ask if you wish to synchronize these with the server.
-The behavior is customizable by @code{gnus-agent-synchronize-flags}.
+When you plug back in, Gnus will then check to see if you have any
+changed any flags and ask if you wish to synchronize these with the
+server. This behavior is customizable by @code{gnus-agent-synchronize-flags}.
@vindex gnus-agent-synchronize-flags
If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
@code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
in the group buffer.
+Technical note: the synchronization algorithm does not work by ``pushing''
+all local flags to the server, but rather by incrementally updated the
+server view of flags by changing only those flags that were changed by
+the user. Thus, if you set one flag on an article, quit the group then
+re-select the group and remove the flag; the flag will be set and
+removed from the server when you ``synchronize''. The queued flag
+operations can be found in the per-server @code{flags} file in the Agent
+directory. It's emptied when you synchronize flags.
+
+@node Agent and IMAP
+@subsection Agent and IMAP
+
+The Agent works with any Gnus back end, including nnimap. However,
+since there are some conceptual differences between @acronym{NNTP} and
+@acronym{IMAP}, this section (should) provide you with some information to
+make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
+
Some things are currently not implemented in the Agent that you'd might
expect from a disconnected @acronym{IMAP} client, including:
@end itemize
-Technical note: the synchronization algorithm does not work by ``pushing''
-all local flags to the server, but rather incrementally update the
-server view of flags by changing only those flags that were changed by
-the user. Thus, if you set one flag on an article, quit the group and
-re-select the group and remove the flag; the flag will be set and
-removed from the server when you ``synchronize''. The queued flag
-operations can be found in the per-server @code{flags} file in the Agent
-directory. It's emptied when you synchronize flags.
-
-
@node Outgoing Messages
@subsection Outgoing Messages
thing to do as the newly downloaded article has obviously not been
read. The default is @code{t}.
+@item gnus-agent-synchronize-flags
+@vindex gnus-agent-synchronize-flags
+If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
+never automatically synchronize flags. If it is @code{ask}, which is
+the default, the Agent will check if you made any changes and if so
+ask if you wish to synchronize these when you re-connect. If it has
+any other value, all flags will be synchronized automatically.
+
@item gnus-agent-consider-all-articles
@vindex gnus-agent-consider-all-articles
If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
@item gnus-use-toolbar
@vindex gnus-use-toolbar
-If @code{nil}, don't display toolbars. If non-@code{nil}, it should be
-one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
-@code{right-toolbar}, or @code{left-toolbar}.
+This variable specifies the position to display the toolbar. If
+@code{nil}, don't display toolbars. If it is non-nil, it should be one
+of the symbols @code{default}, @code{top}, @code{bottom}, @code{right},
+and @code{left}. @code{default} means to use the default toolbar, the
+rest mean to display the toolbar on the place which those names show.
+The default is @code{default}.
+
+@item gnus-toolbar-thickness
+@vindex gnus-toolbar-thickness
+Cons of the height and the width specifying the thickness of a toolbar.
+The height is used for the toolbar displayed on the top or the bottom,
+the width is used for the toolbar displayed on the right or the left.
+The default is that of the default toolbar.
@item gnus-group-toolbar
@vindex gnus-group-toolbar
running your own news server, for instance, and the local article
numbers don't correspond to the Gmane article numbers. When
@code{spam-report-gmane-use-article-number} is @code{nil},
-@code{spam-report.el} will use the @code{X-Report-Spam} header that
-Gmane provides.
+@code{spam-report.el} will fetch the number from the article headers.
+
+@end defvar
+
+@defvar spam-report-user-mail-address
+
+Mail address exposed in the User-Agent spam reports to Gmane. It allows
+the Gmane administrators to contact you in case of misreports. The
+default is @code{user-mail-address}.
@end defvar
@item nnheader-max-head-length
@vindex nnheader-max-head-length
When the back ends read straight heads of articles, they all try to read
-as little as possible. This variable (default 4096) specifies
+as little as possible. This variable (default 8192) specifies
the absolute max length the back ends will try to read before giving up
on finding a separator line between the head and the body. If this
variable is @code{nil}, there is no upper read bound. If it is
January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
-If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
+It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
the parameters in @file{~/.newsrc.eld}, but via this variable you can
enjoy the powers of customize, and simplified backups since you set the
-variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}. The
+variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}. The
variable maps regular expressions matching group names to group
parameters, a'la:
@lisp
@item
Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
-Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
+Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
disable it.
@item
followups (see the variables @code{message-cross-post-@var{*}}).
@item
-References and X-Draft-Headers are no longer generated when you start
-composing messages and @code{message-generate-headers-first} is
+References and X-Draft-From headers are no longer generated when you
+start composing messages and @code{message-generate-headers-first} is
@code{nil}.
@item
(@code{gnus-summary-insert-cached-articles}). The new function filters
out other articles.
-@item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
+@item
+Some limiting commands accept a @kbd{C-u} prefix to negate the match.
If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
s}, @kbd{/ a}, and @kbd{/ x}
useful data is in the summary buffer, anyway. Set this variable to
@samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
-Set this hook to all the available hiding commands:
+Use the following to enable all the available hiding features:
@lisp
(setq gnus-treat-hide-headers 'head
gnus-treat-hide-signature t
certain things, it's trivial to have it do something a different way.
(Well, at least if you know how to write Lisp code.) However, that's
beyond the scope of this manual, so we are simply going to talk about
-some common constructs that you normally use in your @file{.emacs} file
-to customize Gnus.
+some common constructs that you normally use in your @file{~/.gnus.el}
+file to customize Gnus. (You can also use the @file{~/.emacs} file, but
+in order to set things of Gnus up, it is much better to use the
+@file{~/.gnus.el} file, @xref{Startup Files}.)
If you want to set the variable @code{gnus-florgbnize} to four (4), you
write the following:
This function (really ``special form'') @code{setq} is the one that can
set a variable to some value. This is really all you need to know. Now
-you can go and fill your @file{.emacs} file with lots of these to change
-how Gnus works.
+you can go and fill your @file{~/.gnus.el} file with lots of these to
+change how Gnus works.
-If you have put that thing in your @file{.emacs} file, it will be read
-and @code{eval}ed (which is lisp-ese for ``run'') the next time you
-start Emacs. If you want to change the variable right away, simply say
+If you have put that thing in your @file{~/.gnus.el} file, it will be
+read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
+start Gnus. If you want to change the variable right away, simply say
@kbd{C-x C-e} after the closing parenthesis. That will @code{eval} the
previous ``form'', which is a simple @code{setq} statement here.