GNU bug report logs -
#48577
28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets
Previous Next
Reported by: Alex Bochannek <alex <at> bochannek.com>
Date: Fri, 21 May 2021 23:44:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
When using an expiry target mailbox and an IMAP server that does not
support move (Dovecot as per nnimap-quirks), messages will be copied,
but not deleted after expiry.
This was introduced with use of lexical-binding in Gnus and the
difference between set and setq.
The below patch fixes the problem.
[Message part 2 (text/x-patch, inline)]
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 570be49094..f869f586d9 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1076,7 +1076,9 @@ nnimap-process-expiry-targets
"UID COPY %s %S")
(nnimap-article-ranges (gnus-compress-sequence articles))
(nnimap-group-to-imap (gnus-group-real-name nnmail-expiry-target)))
- (set (if can-move 'deleted-articles 'articles-to-delete) articles))))
+ (if can-move
+ (setq deleted-articles articles)
+ (setq articles-to-delete articles)))))
t)
(t
(dolist (article articles)
[Message part 3 (text/plain, inline)]
--
Alex.
This bug report was last modified 3 years and 357 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.