diff options
| -rw-r--r-- | lisp/gnus/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/gnus/nnimap.el | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 4903796a7ff..724112fe3a5 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -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): diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 369d9d36418..c476be6bc8d 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -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)) |
