2010-10-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
+ * gnus-util.el (gnus-list-memq-of-list): New function.
+
* nnimap.el (nnimap-split-incoming-mail): Note that the INBOX has been
selected.
+ (nnimap-unsplittable-articles): New slot.
+ (nnimap-new-articles): Use it.
2010-10-29 Stephen Berman <stephen.berman@gmx.net> (tiny change)
image)))
image)))
+(defun gnus-list-memq-of-list (elements list)
+ "Return non-nil if any of the members of ELEMENTS are in LIST."
+ (let ((found nil))
+ (dolist (elem elements)
+ (setq found (or found
+ (memq elem list))))
+ found))
+
(provide 'gnus-util)
;;; gnus-util.el ends here
(defvoo nnimap-split-fancy nil
"Uses the same syntax as nnmail-split-fancy.")
+(defvoo nnimap-unsplittable-articles '(%Deleted %Seen)
+ "Articles with the flags in the list will not be considered when splitting.")
+
(make-obsolete-variable 'nnimap-split-rule "see `nnimap-split-methods'"
"Emacs 24.1")
(defun nnimap-new-articles (flags)
(let (new)
(dolist (elem flags)
- (when (or (null (cdr elem))
- (and (not (memq '%Deleted (cdr elem)))
- (not (memq '%Seen (cdr elem)))))
+ (unless (gnus-list-memq-of-list nnimap-unsplittable-articles
+ (cdr elem))
(push (car elem) new)))
(gnus-compress-sequence (nreverse new))))
+2010-10-29 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus.texi (Client-Side IMAP Splitting): Mention
+ nnimap-unsplittable-articles.
+
2010-10-29 Julien Danjou <julien@danjou.info>
* gnus.texi (Finding the News): Remove references to obsoletes
@item nnimap-split-fancy
Uses the same syntax as @code{nnmail-split-fancy}.
+@item nnimap-unsplittable-articles
+List of flag symbols to ignore when doing splitting. That is,
+articles that have these flags won't be considered when splitting.
+The default is @samp{(%Deleted %Seen)}.
+
@end table