\input texinfo @c -*-texinfo-*-
@setfilename gnus
-@settitle Semi-gnus 6.10.029 Manual
+@settitle Semi-gnus 6.10.035 Manual
@synindex fn cp
@synindex vr cp
@synindex pg cp
@tex
@titlepage
-@title Semi-gnus 6.10.029 Manual
+@title Semi-gnus 6.10.035 Manual
@author by Lars Magne Ingebrigtsen
@page
API. So Semi-gnus does not discriminate various language communities.
Oh, if you are a Klingon, please wait Unicode Next Generation.
-This manual corresponds to Semi-gnus 6.10.029.
+This manual corresponds to Semi-gnus 6.10.035.
@end ifinfo
@findex gnus-thread-sort-by-number
@vindex gnus-thread-sort-functions
If you are using a threaded summary display, you can sort the threads by
-setting @code{gnus-thread-sort-functions}, which is a list of functions.
+setting @code{gnus-thread-sort-functions}, which can be either a single
+function, a list of functions, or a list containing functions and
+@code{(not some-function)} elements.
+
By default, sorting is done on article numbers. Ready-made sorting
predicate functions include @code{gnus-thread-sort-by-number},
@code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
Each function takes two threads and returns non-@code{nil} if the first
thread should be sorted before the other. Note that sorting really is
-normally done by looking only at the roots of each thread. If you use
-more than one function, the primary sort key should be the last function
-in the list. You should probably always include
+normally done by looking only at the roots of each thread.
+
+If you use more than one function, the primary sort key should be the
+last function in the list. You should probably always include
@code{gnus-thread-sort-by-number} in the list of sorting
functions---preferably first. This will ensure that threads that are
equal with respect to the other sort criteria will be displayed in
ascending article order.
-If you would like to sort by score, then by subject, and finally by
-number, you could do something like:
+If you would like to sort by reverse score, then by subject, and finally
+by number, you could do something like:
@lisp
(setq gnus-thread-sort-functions
'(gnus-thread-sort-by-number
gnus-thread-sort-by-subject
- gnus-thread-sort-by-total-score))
+ (reverse gnus-thread-sort-by-total-score)))
@end lisp
The threads that have highest score will be displayed first in the
'("text/x-vcard"))
@end lisp
+@item gnus-article-mime-part-function
+@vindex gnus-article-mime-part-function
+For each @sc{mime} part, this function will be called with the @sc{mime}
+handle as the parameter. The function is meant to be used to allow
+users to gather information from the article (e. g., add Vcard info to
+the bbdb database) or to do actions based on parts (e. g., automatically
+save all jpegs into some directory).
+
+Here's an example function the does the latter:
+
+@lisp
+(defun my-save-all-jpeg-parts (handle)
+ (when (equal (car (mm-handle-type handle)) "image/jpeg")
+ (with-temp-buffer
+ (insert (mm-get-part handle))
+ (write-region (point-min) (point-max)
+ (read-file-name "Save jpeg to: ")))))
+(setq gnus-article-mime-part-function
+ 'my-save-all-jpeg-parts)
+@end lisp
+
@end table