diff options
| author | Eric Abrahamsen <eric@ericabrahamsen.net> | 2015-03-24 22:12:58 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2015-03-24 22:12:58 +0000 |
| commit | b28753b55ce83215b15661d16bfbafe3c8964b2a (patch) | |
| tree | f9939e91d219b836b8e9eff188d6abf9961ce55d | |
| parent | 9d70310b02bd901b1fcb04df5635a21266953c08 (diff) | |
| download | emacs-b28753b55ce83215b15661d16bfbafe3c8964b2a.tar.gz | |
lisp/gnus/nnimap.el: Don't split imap messages back into original group
| -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)) |
