From: Alex Bochannek <alex@bochannek.com>
To: 48577@debbugs.gnu.org
Subject: bug#48577: 28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets
Date: Fri, 21 May 2021 16:43:02 -0700 [thread overview]
Message-ID: <m2k0nrr6ux.fsf@bochannek.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 670 bytes --]
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)
[-- Attachment #3: Type: text/plain, Size: 11 bytes --]
--
Alex.
next reply other threads:[~2021-05-21 23:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-21 23:43 Alex Bochannek [this message]
2021-05-25 4:05 ` bug#48577: 28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets Lars Ingebrigtsen
2021-05-25 4:10 ` Lars Ingebrigtsen
2021-05-25 7:28 ` Alex Bochannek
2021-05-25 19:17 ` Lars Ingebrigtsen
2021-05-27 23:21 ` Lars Ingebrigtsen
2021-05-28 2:04 ` Alex Bochannek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2k0nrr6ux.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=48577@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).