+2001-08-12 Simon Josefsson <jas@extundo.com>
+ Suggested by Kai.Grossjohann@CS.Uni-Dortmund.DE
+
+ Support `recent' mark indicating newly arrived messages (to
+ separate from old but unread messages).
+
+ * nnimap.el (nnimap-retrieve-groups): Push dummy article into
+ `nnmail-split-history' if recent is > 0.
+ (nnimap-request-update-info-internal): Update `recent' marks.
+ (nnimap-request-set-mark): Never set `recent' marks.
+ (nnimap-mark-to-predicate-alist, nnimap-mark-to-flag-alist): Add
+ recent.
+
+ * gnus-sum.el (gnus-recent-mark): New mark.
+ (gnus-newsgroup-recent): New variable.
+ (gnus-summary-local-variables): Add gnus-newsgroup-recent.
+ (gnus-summary-prepare-threads): Mark recent articles.
+ (gnus-summary-add-mark): Support recent.
+ (gnus-summary-update-secondary-mark): Support recent.
+
+ * gnus.el (gnus-article-mark-lists): Add recent.
+
2001-08-12 Simon Josefsson <jas@extundo.com>
* mm-bodies.el (mm-decode-content-transfer-encoding): Returns
:group 'gnus-summary-marks
:type 'character)
+(defcustom gnus-recent-mark ?N
+ "*Mark used for articles that are recent."
+ :group 'gnus-summary-marks
+ :type 'character)
+
(defcustom gnus-cached-mark ?*
"*Mark used for articles that are in the cache."
:group 'gnus-summary-marks
(defvar gnus-newsgroup-forwarded nil
"List of articles that have been forwarded in the current newsgroup.")
+(defvar gnus-newsgroup-recent nil
+ "List of articles that have are recent in the current newsgroup.")
+
(defvar gnus-newsgroup-expirable nil
"List of articles in the current newsgroup that can be expired.")
gnus-newsgroup-unselected gnus-newsgroup-marked
gnus-newsgroup-reads gnus-newsgroup-saved
gnus-newsgroup-replied gnus-newsgroup-forwarded
+ gnus-newsgroup-recent
gnus-newsgroup-expirable
gnus-newsgroup-processable gnus-newsgroup-killed
gnus-newsgroup-downloadable gnus-newsgroup-undownloaded
gnus-forwarded-mark)
((memq number gnus-newsgroup-saved)
gnus-saved-mark)
+ ((memq number gnus-newsgroup-recent)
+ gnus-recent-mark)
(t gnus-no-mark))
gnus-tmp-from (mail-header-from gnus-tmp-header)
gnus-tmp-name
(error "No such mark type: %s" type)
(setq var (intern (format "gnus-newsgroup-%s" type)))
(set var (cons article (symbol-value var)))
- (if (memq type '(processable cached replied forwarded saved))
+ (if (memq type '(processable cached replied forwarded recent saved))
(gnus-summary-update-secondary-mark article)
- ;;; !!! This is bobus. We should find out what primary
+ ;;; !!! This is bogus. We should find out what primary
;;; !!! mark we want to set.
(gnus-summary-update-mark gnus-del-mark 'unread)))))
gnus-forwarded-mark)
((memq article gnus-newsgroup-saved)
gnus-saved-mark)
+ ((memq article gnus-newsgroup-recent)
+ gnus-recent-mark)
(t gnus-no-mark))
'replied)
(when (gnus-visual-p 'summary-highlight 'highlight)
(or (member "\\NoSelect"
(imap-mailbox-get 'list-flags group nnimap-server-buffer))
(let ((info (nnimap-find-minmax-uid group 'examine)))
+ (when (> (or (imap-mailbox-get 'recent group
+ nnimap-server-buffer) 0)
+ 0)
+ (push (list (cons group 0)) nnmail-split-history))
(insert (format "\"%s\" %d %d y\n" group
(or (nth 2 info) 0)
(max 1 (or (nth 1 info) 1))))))))
(gnus-info-set-read info seen)))
(mapcar (lambda (pred)
- (when (and (nnimap-mark-permanent-p (cdr pred))
- (member (nnimap-mark-to-flag (cdr pred))
- (imap-mailbox-get 'flags)))
+ (when (or (eq (cdr pred) 'recent)
+ (and (nnimap-mark-permanent-p (cdr pred))
+ (member (nnimap-mark-to-flag (cdr pred))
+ (imap-mailbox-get 'flags))))
(gnus-info-set-marks
info
(nnimap-update-alist-soft
marks)
;; cache flags are pointless on the server
(setq cmdmarks (delq 'cache cmdmarks))
+ ;; recent marks can't be set
+ (setq cmdmarks (delq 'recent cmdmarks))
(when nnimap-importantize-dormant
;; flag dormant articles as ticked
(if (memq 'dormant cmdmarks)
'((read . "SEEN")
(tick . "FLAGGED")
(draft . "DRAFT")
+ (recent . "RECENT")
(reply . "ANSWERED")))
(cons (cdr pair)
(format "KEYWORD gnus-%s" (symbol-name (cdr pair))))))
'((read . "\\Seen")
(tick . "\\Flagged")
(draft . "\\Draft")
+ (recent . "\\Recent")
(reply . "\\Answered")))
(cons (cdr pair)
(format "gnus-%s" (symbol-name (cdr pair))))))