aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBasil L. Contovounesios2019-08-02 15:54:09 +0300
committerBasil L. Contovounesios2019-08-03 15:29:12 +0300
commite7818cb73ff042cb557332c7ea954fd512c87f69 (patch)
treef2fb21db93031c5714eb7f6d47b8e9d0f7244167 /doc
parent8b7c7762da516faea40ba761ee5f114e839dfd33 (diff)
downloademacs-e7818cb73ff042cb557332c7ea954fd512c87f69.tar.gz
emacs-e7818cb73ff042cb557332c7ea954fd512c87f69.zip
Fix nnmail-expiry-wait docs and custom :types
* doc/misc/gnus.texi (Group Parameters, Expiring Mail): * lisp/gnus/gnus-cus.el (gnus-group-parameters): Clarify descriptions of nnmail-expiry, nnmail-expiry-wait, and nnmail-expiry-wait-function. * lisp/gnus/nnmail.el (nnmail-expiry-wait) (nnmail-expiry-wait-function): Clarify docstrings and fix custom :types (bug#36850).
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/gnus.texi50
1 files changed, 28 insertions, 22 deletions
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index f0458847295..9c3ec41462d 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -2917,9 +2917,9 @@ See also @code{gnus-total-expirable-newsgroups}.
2917If the group parameter has an element that looks like 2917If the group parameter has an element that looks like
2918@code{(expiry-wait . 10)}, this value will override any 2918@code{(expiry-wait . 10)}, this value will override any
2919@code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function} 2919@code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2920(@pxref{Expiring Mail}) when expiring expirable messages. The value 2920settings (@pxref{Expiring Mail}) when expiring expirable messages.
2921can either be a number of days (not necessarily an integer) or the 2921The value can be either a number of days (not necessarily an integer),
2922symbols @code{never} or @code{immediate}. 2922or one of the symbols @code{never} or @code{immediate}.
2923 2923
2924@item expiry-target 2924@item expiry-target
2925@cindex expiry-target 2925@cindex expiry-target
@@ -15826,40 +15826,46 @@ don't really mix very well.
15826 15826
15827@vindex nnmail-expiry-wait 15827@vindex nnmail-expiry-wait
15828The @code{nnmail-expiry-wait} variable supplies the default time an 15828The @code{nnmail-expiry-wait} variable supplies the default time an
15829expirable article has to live. Gnus starts counting days from when the 15829expirable article has to live. The value of this variable can be
15830message @emph{arrived}, not from when it was sent. The default is seven 15830either a number of days (not necessarily an integer), or one of the
15831days. 15831symbols @code{immediate} or @code{never}, meaning an article is
15832immediately or never expirable, respectively.
15832 15833
15833Gnus also supplies a function that lets you fine-tune how long articles 15834Gnus starts counting days from when the message @emph{arrived}, not
15834are to live, based on what group they are in. Let's say you want to 15835from when it was sent. The default is seven days.
15835have one month expiry period in the @samp{mail.private} group, a one day
15836expiry period in the @samp{mail.junk} group, and a six day expiry period
15837everywhere else:
15838 15836
15839@vindex nnmail-expiry-wait-function 15837@vindex nnmail-expiry-wait-function
15838The @code{nnmail-expiry-wait-function} variable lets you fine-tune how
15839long articles are to live, based on what group they are in. When set
15840to a function, its returned value, if non-@code{nil}, overrides that
15841of @code{nnmail-expiry-wait}. Otherwise, the value of
15842@code{nnmail-expiry-wait} is used instead.
15843
15844For example, let's say you want to have a one month expiry period in
15845the @samp{mail.private} group, a one day expiry period in the
15846@samp{mail.junk} group, and a six day expiry period everywhere else.
15847This can be achieved as follows:
15848
15840@lisp 15849@lisp
15841(setq nnmail-expiry-wait-function 15850(setq nnmail-expiry-wait-function
15842 (lambda (group) 15851 (lambda (group)
15843 (cond ((string= group "mail.private") 15852 (cond ((string= group "mail.private")
15844 31) 15853 31)
15845 ((string= group "mail.junk") 15854 ((string= group "mail.junk")
15846 1) 15855 1)
15847 ((string= group "important") 15856 ((string= group "important")
15848 'never) 15857 'never)
15849 (t 15858 (t
15850 6)))) 15859 6))))
15851@end lisp 15860@end lisp
15852 15861
15853The group names this function is fed are ``unadorned'' group 15862The group names this function is fed are ``unadorned'' group
15854names---no @samp{nnml:} prefixes and the like. 15863names---no @samp{nnml:} prefixes and the like.
15855 15864
15856The @code{nnmail-expiry-wait} variable and 15865As an alternative to the variables @code{nnmail-expiry-wait} or
15857@code{nnmail-expiry-wait-function} function can either be a number (not 15866@code{nnmail-expiry-wait-function}, you can also use the
15858necessarily an integer) or one of the symbols @code{immediate} or 15867@code{expiry-wait} group parameter to selectively change the expiry
15859@code{never}. 15868period (@pxref{Group Parameters}).
15860
15861You can also use the @code{expiry-wait} group parameter to selectively
15862change the expiry period (@pxref{Group Parameters}).
15863 15869
15864@vindex nnmail-expiry-target 15870@vindex nnmail-expiry-target
15865The normal action taken when expiring articles is to delete them. 15871The normal action taken when expiring articles is to delete them.