]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/gnus/nnimap.el: Don't split imap messages back into original group
authorEric Abrahamsen <eric@ericabrahamsen.net>
Tue, 24 Mar 2015 22:12:58 +0000 (22:12 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Tue, 24 Mar 2015 22:12:58 +0000 (22:12 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 4903796a7ff6749dbf9a72786f1aad32bb18f5b3..724112fe3a58788cbf846a0af4aa2be012230dec 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-24  Eric Abrahamsen  <eric@ericabrahamsen.net>
+
+       * nnimap.el (nnimap-split-incoming-mail): If a message is already
+       in the group it should be split to, don't re-copy it into the group.
+
 2015-03-23  Ben Bacarisse  <ben.lists@bsb.me.uk>  (tiny change)
 
        * nnmh.el (nnmh-request-expire-articles):
index 369d9d36418f24ec0664fa75f9992d29f0019529..c476be6bc8d26ab5bba260f52cb328bc9421b19d 100644 (file)
@@ -2086,12 +2086,15 @@ Return the server's response to the SELECT or EXAMINE command."
                    (ranges (cdr spec)))
                (if (eq group 'junk)
                    (setq junk-articles ranges)
-                 (push (list (nnimap-send-command
-                              "UID COPY %s %S"
-                              (nnimap-article-ranges ranges)
-                              (utf7-encode group t))
-                             ranges)
-                       sequences))))
+                 ;; Don't copy if the message is already in its
+                 ;; target group.
+                 (unless (string= group nnimap-inbox)
+                  (push (list (nnimap-send-command
+                               "UID COPY %s %S"
+                               (nnimap-article-ranges ranges)
+                               (utf7-encode group t))
+                              ranges)
+                        sequences)))))
            ;; Wait for the last COPY response...
            (when sequences
              (nnimap-wait-for-response (caar sequences))