+2005-03-03 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * gnus-sum.el (gnus-summary-move-article): pass move-is-internal
+ parameter to invoked gnus-request-move-article; remove the
+ redundant gnus-sum-hint-move-is-internal variable; apply the marks
+ all at once instead of once per article
+ (gnus-summary-remove-process-mark): accept a list of articles as
+ well as a single article for processing
+
+ * gnus-int.el (gnus-request-move-article): add move-is-internal parameter
+
+ * nnml.el (nnml-request-move-article): add move-is-internal parameter
+
+ * nnmh.el (nnmh-request-move-article): add move-is-internal parameter
+
+ * nnmbox.el (nnmbox-request-move-article): add move-is-internal parameter
+
+ * nnmaildir.el (nnmaildir-request-move-article): add move-is-internal parameter
+
+ * nnimap.el (nnimap-request-move-article): add move-is-internal
+ parameter and remove the gnus-sum-hint-move-is-internal variable
+
+ * nnfolder.el (nnfolder-request-move-article): add move-is-internal parameter
+
+ * nndraft.el (nndraft-request-move-article): add move-is-internal parameter
+
+ * nndiary.el (nndiary-request-move-article): add move-is-internal parameter
+
+ * nndb.el (nndb-request-move-article): add move-is-internal parameter
+
+ * nnbabyl.el (nnbabyl-request-move-article): add move-is-internal parameter
+
+ * nnagent.el (nnagent-request-move-article): add move-is-internal parameter
+
2005-03-01 Stefan Monnier <monnier@iro.umontreal.ca>
* gnus-sum.el (gnus-summary-exit): Undo last change and fix it in
not-deleted))
(defun gnus-request-move-article (article group server accept-function
- &optional last)
+ &optional last move-is-internal)
(let* ((gnus-command-method (gnus-find-method-for-group group))
(result (funcall (gnus-get-function gnus-command-method
'request-move-article)
article (gnus-group-real-name group)
- (nth 1 gnus-command-method) accept-function last)))
+ (nth 1 gnus-command-method) accept-function last move-is-internal)))
(when (and result gnus-agent
(gnus-agent-method-p gnus-command-method))
(gnus-agent-unfetch-articles group (list article)))
(crosspost "Crosspost" "Crossposting")))
(copy-buf (save-excursion
(nnheader-set-temp-buffer " *copy article*")))
- art-group to-method new-xref article to-groups)
+ art-group to-method new-xref article to-groups articles-to-update-marks)
(unless (assq action names)
(error "Unknown action %s" action))
;; Read the newsgroup name.
gnus-newsgroup-name))
(to-method (gnus-find-method-for-group
to-newsgroup))
- (gnus-sum-hint-move-is-internal (gnus-method-equal from-method to-method)))
+ (move-is-internal (gnus-method-equal from-method to-method)))
(gnus-request-move-article
article ; Article to move
gnus-newsgroup-name ; From newsgroup
(list 'gnus-request-accept-article
to-newsgroup (list 'quote select-method)
(not articles) t) ; Accept form
- (not articles)))) ; Only save nov last time
+ (not articles) ; Only save nov last time
+ move-is-internal))) ; is this move internal?
;; Copy the article.
((eq action 'copy)
(save-excursion
;;;!!!Why is this necessary?
(set-buffer gnus-summary-buffer)
-
+
(gnus-summary-goto-subject article)
(when (eq action 'move)
(gnus-summary-mark-article article gnus-canceled-mark))))
- (gnus-summary-remove-process-mark article))
+ (push article articles-to-update-marks))
+
+ (apply 'gnus-summary-remove-process-mark articles-to-update-marks)
;; Re-activate all groups that have been moved to.
(save-excursion
(set-buffer gnus-group-buffer)
(let ((gnus-group-marked to-groups))
(gnus-group-get-new-news-this-group nil t)))
-
+
(gnus-kill-buffer copy-buf)
(gnus-summary-position-point)
(gnus-set-mode-line 'summary)))
(gnus-summary-goto-subject article)
(gnus-summary-update-secondary-mark article)))
-(defun gnus-summary-remove-process-mark (article)
- "Remove the process mark from ARTICLE and update the summary line."
- (setq gnus-newsgroup-processable (delq article gnus-newsgroup-processable))
- (when (gnus-summary-goto-subject article)
- (gnus-summary-show-thread)
- (gnus-summary-goto-subject article)
- (gnus-summary-update-secondary-mark article)))
+(defun gnus-summary-remove-process-mark (&rest articles)
+ "Remove the process mark from ARTICLES and update the summary line."
+ (dolist (article articles)
+ (setq gnus-newsgroup-processable (delq article gnus-newsgroup-processable))
+ (when (gnus-summary-goto-subject article)
+ (gnus-summary-show-thread)
+ (gnus-summary-goto-subject article)
+ (gnus-summary-update-secondary-mark article))))
(defun gnus-summary-set-saved-mark (article)
"Set the process mark on ARTICLE and update the summary line."
(list (nnagent-server server))))
(deffoo nnagent-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(nnoo-parent-function 'nnagent 'nnml-request-move-article
(list article group (nnagent-server server)
- accept-form last)))
+ accept-form last move-is-internal)))
(deffoo nnagent-request-rename-group (group new-name &optional server)
(nnoo-parent-function 'nnagent 'nnml-request-rename-group
(nconc rest articles))))
(deffoo nnbabyl-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(let ((buf (get-buffer-create " *nnbabyl move*"))
result)
(and
(nndb-request-expire-articles-local articles group server force)))
(deffoo nndb-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
"Move ARTICLE (a number) from GROUP on SERVER.
Evals ACCEPT-FORM in current buffer, where the article is.
Optional LAST is ignored."
(nconc rest articles)))
(deffoo nndiary-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(let ((buf (get-buffer-create " *nndiary move*"))
result)
(nndiary-possibly-change-directory group server)
'nnmh-request-group
(list group server dont-check)))
-(deffoo nndraft-request-move-article (article group server
- accept-form &optional last)
+(deffoo nndraft-request-move-article (article group server accept-form
+ &optional last move-is-internal)
(nndraft-possibly-change-group group)
(let ((buf (get-buffer-create " *nndraft move*"))
result)
(nnfolder-save-active nnfolder-group-alist nnfolder-active-file)
(gnus-sorted-difference articles (nreverse deleted-articles)))))
-(deffoo nnfolder-request-move-article (article group server
- accept-form &optional last)
+(deffoo nnfolder-request-move-article (article group server accept-form
+ &optional last move-is-internal)
(save-excursion
(let ((buf (get-buffer-create " *nnfolder move*"))
result)
;; return articles not deleted
articles)
-(deffoo nnimap-request-move-article (article group server
- accept-form &optional last)
+(deffoo nnimap-request-move-article (article group server accept-form
+ &optional last move-is-internal)
(when (nnimap-possibly-change-server server)
(save-excursion
(let ((buf (get-buffer-create " *nnimap move*"))
(nnimap-current-move-group group)
(nnimap-current-move-server nnimap-current-server)
result)
- (gnus-message 9 "nnimap-request-move-article: this is an %s move"
- (if gnus-sum-hint-move-is-internal
+ (gnus-message 10 "nnimap-request-move-article: this is an %s move"
+ (if move-is-internal
"internal"
"external"))
;; request the article only when the move is NOT internal
- (and (or gnus-sum-hint-move-is-internal
+ (and (or move-is-internal
(nnimap-request-article article group server))
(save-excursion
(set-buffer buf)
t)))
(defun nnmaildir-request-move-article (article gname server accept-form
- &optional last)
+ &optional last move-is-internal)
(let ((group (nnmaildir--prepare server gname))
pgname suffix result nnmaildir--file deactivate-mark)
(catch 'return
(nconc rest articles))))
(deffoo nnmbox-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(let ((buf (get-buffer-create " *nnmbox move*"))
result)
(and
(deffoo nnmh-close-group (group &optional server)
t)
-(deffoo nnmh-request-move-article (article group server
- accept-form &optional last)
+(deffoo nnmh-request-move-article (article group server accept-form
+ &optional last move-is-internal)
(let ((buf (get-buffer-create " *nnmh move*"))
result)
(and
(nconc rest articles)))
(deffoo nnml-request-move-article
- (article group server accept-form &optional last)
+ (article group server accept-form &optional last move-is-internal)
(let ((buf (get-buffer-create " *nnml move*"))
result)
(nnml-possibly-change-directory group server)