Function: nnmairix-propagate-marks
nnmairix-propagate-marks is an interactive and byte-compiled function
defined in nnmairix.el.gz.
Signature
(nnmairix-propagate-marks &optional SERVER)
Documentation
Propagate marks from nnmairix group to original articles.
Unless SERVER is explicitly specified, will use the last opened nnmairix server. Only marks from current session will be set.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnmairix.el.gz
(defun nnmairix-propagate-marks (&optional server)
"Propagate marks from nnmairix group to original articles.
Unless SERVER is explicitly specified, will use the last opened
nnmairix server. Only marks from current session will be set."
(interactive)
(if server
(nnmairix-open-server server)
(unless (eq (car gnus-current-select-method) 'nnmairix)
(if nnmairix-current-server
(nnmairix-open-server nnmairix-current-server)
(error "No opened nnmairix server"))))
(if nnmairix-marks-cache
(let (number ogroup number-cache method mid-marks temp)
;; first we get the article numbers
(catch 'problem
(while (setq ogroup (pop nnmairix-marks-cache))
(while (setq mid-marks (pop (cdr ogroup)))
(setq number
(cdr
(gnus-request-head (car mid-marks) (car ogroup))))
(unless number
(nnheader-message
3 "Unable to set mark: couldn't determine article number for %s in %s"
(car mid-marks) (car ogroup))
(throw 'problem nil))
(setq temp (assoc (car ogroup) number-cache))
(if temp
(catch 'done
(dolist (cur (cdr temp))
(when (equal (cdr cur) (list (nth 1 mid-marks) (nth 2 mid-marks)))
(nconc (car cur) (list number))
(throw 'done nil)))
(nconc temp (list (list (list number) (nth 1 mid-marks) (nth 2 mid-marks)))))
(push (list (car ogroup) (list (list number) (nth 1 mid-marks) (nth 2 mid-marks)))
number-cache)))))
;; now we set the marks
(with-current-buffer gnus-group-buffer
(nnheader-message 5 "nnmairix: Propagating marks...")
(dolist (cur number-cache)
(setq method (gnus-find-method-for-group (car cur)))
(apply (intern (format "%s-%s"
(symbol-name (car method))
"request-set-mark"))
(gnus-group-short-name (car cur))
(cdr cur)
(list (nth 1 method)))
(gnus-group-jump-to-group (car cur))
(gnus-group-get-new-news-this-group)))
(nnheader-message 5 "nnmairix: Propagating marks... done"))
(nnheader-message 3 "No marks to propagate.")))