* gnus-sum.el (gnus-summary-move-article): set
authorTeodor Zlatanov <tzz@lifelogs.com>
Fri, 25 Feb 2005 19:57:07 +0000 (19:57 +0000)
committerTeodor Zlatanov <tzz@lifelogs.com>
Fri, 25 Feb 2005 19:57:07 +0000 (19:57 +0000)
gnus-sum-hint-move-is-internal for gnus-request-move-article and
whatever it calls (right now, only nnimap-request-move article
respects it)

* nnimap.el (nnimap-request-move-article): when
gnus-sum-hint-move-is-internal is set, don't do the extra
nnimap-request-article

lisp/ChangeLog
lisp/gnus-sum.el
lisp/nnimap.el

index 3efd91a..c5ce302 100644 (file)
@@ -1,3 +1,14 @@
+2005-02-25  Teodor Zlatanov  <tzz@lifelogs.com>
+
+       * gnus-sum.el (gnus-summary-move-article): set
+       gnus-sum-hint-move-is-internal for gnus-request-move-article and
+       whatever it calls (right now, only nnimap-request-move article
+       respects it)
+
+       * nnimap.el (nnimap-request-move-article): when
+       gnus-sum-hint-move-is-internal is set, don't do the extra
+       nnimap-request-article
+
 2005-02-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * nnheader.el (nnheader-find-file-noselect): Added doc string.
index 7d191ff..c65d297 100644 (file)
@@ -9108,6 +9108,11 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
        ((eq action 'move)
         ;; Remove this article from future suppression.
         (gnus-dup-unsuppress-article article)
+        (let* ((from-method (gnus-find-method-for-group
+                             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)))
         (gnus-request-move-article
          article                       ; Article to move
          gnus-newsgroup-name           ; From newsgroup
@@ -9116,7 +9121,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'."
          (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
        ;; Copy the article.
        ((eq action 'copy)
         (save-excursion
index 4af40e3..5ffa541 100644 (file)
@@ -1513,7 +1513,13 @@ function is generally only called when Gnus is shutting down."
            (nnimap-current-move-group group)
            (nnimap-current-move-server nnimap-current-server)
            result)
-       (and (nnimap-request-article article group server)
+       (gnus-message 9 "nnimap-request-move-article: this is an %s move"
+                     (if gnus-sum-hint-move-is-internal
+                         "internal"
+                       "external"))
+       ;; request the article only when the move is NOT internal
+       (and (or gnus-sum-hint-move-is-internal
+                (nnimap-request-article article group server))
             (save-excursion
               (set-buffer buf)
               (buffer-disable-undo (current-buffer))