(imap-mailbox-get 'flags))))
(gnus-info-set-marks
info
- (nnimap-update-alist-soft
+ (gnus-update-alist-soft
(cdr pred)
(gnus-compress-sequence
(imap-search (nnimap-mark-to-predicate (cdr pred))))
;; so we remove that mark for gnus since we support dormant
(gnus-info-set-marks
info
- (nnimap-update-alist-soft
+ (gnus-update-alist-soft
'tick
(gnus-remove-from-range
(cdr-safe (assoc 'tick (gnus-info-marks info)))
(what (nth 1 action))
(cmdmarks (nth 2 action))
marks)
+ ;; bookmark can't be stored (not list/range
+ (setq cmdmarks (delq 'bookmark cmdmarks))
+ ;; killed can't be stored (not list/range
+ (setq cmdmarks (delq 'killed cmdmarks))
+ ;; unsent are for nndraft groups only
+ (setq cmdmarks (delq 'unsent cmdmarks))
;; cache flags are pointless on the server
(setq cmdmarks (delq 'cache cmdmarks))
+ ;; seen flags are local to each gnus
+ (setq cmdmarks (delq 'seen cmdmarks))
;; recent marks can't be set
(setq cmdmarks (delq 'recent cmdmarks))
(when nnimap-importantize-dormant
(defun nnimap-expiry-target (arts group server)
(unless (eq nnmail-expiry-target 'delete)
- (with-current-buffer nntp-server-buffer
+ (with-temp-buffer
(dolist (art (gnus-uncompress-sequence arts))
- (nnimap-request-article art group server)
+ (nnimap-request-article art group server (current-buffer))
;; hints for optimization in `nnimap-request-accept-article'
(let ((nnimap-current-move-article art)
(nnimap-current-move-group group)
"Return t iff MARK can be permanently (between IMAP sessions) saved on articles, in GROUP."
(imap-message-flag-permanent-p (nnimap-mark-to-flag mark)))
-(defun nnimap-remassoc (key alist)
- "Delete by side effect any elements of LIST whose car is `equal' to KEY.
-The modified LIST is returned. If the first member
-of LIST has a car that is `equal' to KEY, there is no way to remove it
-by side effect; therefore, write `(setq foo (remassoc key foo))' to be
-sure of changing the value of `foo'."
- (when alist
- (if (equal key (caar alist))
- (cdr alist)
- (setcdr alist (nnimap-remassoc key (cdr alist)))
- alist)))
-
-(defun nnimap-update-alist-soft (key value alist)
- (if value
- (cons (cons key value) (nnimap-remassoc key alist))
- (nnimap-remassoc key alist)))
-
(when nnimap-debug
(require 'trace)
(buffer-disable-undo (get-buffer-create nnimap-debug))
nnimap-mark-to-flag-1
nnimap-mark-to-flag
nnimap-mark-permanent-p
- nnimap-remassoc
- nnimap-update-alist-soft
)))
(provide 'nnimap)