GNU bug report logs - #48577
28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets

Previous Next

Packages: emacs, gnus;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48577 in the body.
You can then email your comments to 48577 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Fri, 21 May 2021 23:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Bochannek <alex <at> bochannek.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org. (Fri, 21 May 2021 23:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets
Date: Fri, 21 May 2021 16:43:02 -0700
[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.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Tue, 25 May 2021 04:06:01 GMT) Full text and rfc822 format available.

Message #8 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Tue, 25 May 2021 06:05:42 +0200
Alex Bochannek <alex <at> bochannek.com> writes:

> 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.

Thanks; looks good.

I thought we had FSF copyright assignment paperwork on file (as there's
been several patches applied from you before), but I can't see your name
in the copyright file now.  Have you been through the copyright
assignment process?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Tue, 25 May 2021 04:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Tue, 25 May 2021 06:10:24 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Have you been through the copyright assignment process?

Never mind -- I see that you've already been asked this in a different
bug report (and the answer is "not yet").

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Tue, 25 May 2021 07:29:01 GMT) Full text and rfc822 format available.

Message #14 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Tue, 25 May 2021 00:28:53 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Have you been through the copyright assignment process?
>
> Never mind -- I see that you've already been asked this in a different
> bug report (and the answer is "not yet").

I submitted the signed paperwork today. In the past I had done some work
when my employer at the time already had an agreement in place.

-- 
Alex.




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Tue, 25 May 2021 19:19:02 GMT) Full text and rfc822 format available.

Message #17 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Tue, 25 May 2021 21:17:52 +0200
Alex Bochannek <alex <at> bochannek.com> writes:

> I submitted the signed paperwork today. In the past I had done some work
> when my employer at the time already had an agreement in place.

Ah; right -- I had forgotten about that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Thu, 27 May 2021 23:22:01 GMT) Full text and rfc822 format available.

Message #20 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alex Bochannek <alex <at> bochannek.com>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Fri, 28 May 2021 01:21:32 +0200
Alex Bochannek <alex <at> bochannek.com> writes:

> This was introduced with use of lexical-binding in Gnus and the
> difference between set and setq.
>
> The below patch fixes the problem.

Thanks; pushed to Emacs 28 now.

I also grepped through the Emacs tree to see whether there were any
other instances of (set (if ...)), but this seemed to be the only
instance.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 May 2021 23:22:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 28.1, send any further explanations to 48577 <at> debbugs.gnu.org and Alex Bochannek <alex <at> bochannek.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 27 May 2021 23:22:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org, bugs <at> gnus.org:
bug#48577; Package emacs,gnus. (Fri, 28 May 2021 02:05:02 GMT) Full text and rfc822 format available.

Message #27 received at 48577 <at> debbugs.gnu.org (full text, mbox):

From: Alex Bochannek <alex <at> bochannek.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 48577 <at> debbugs.gnu.org
Subject: Re: bug#48577: 28.0.50; [PATCH] Lexical binding bug in
 nnimap-process-expiry-targets
Date: Thu, 27 May 2021 19:04:50 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Alex Bochannek <alex <at> bochannek.com> writes:
>
>> This was introduced with use of lexical-binding in Gnus and the
>> difference between set and setq.
>>
>> The below patch fixes the problem.
>
> Thanks; pushed to Emacs 28 now.
>
> I also grepped through the Emacs tree to see whether there were any
> other instances of (set (if ...)), but this seemed to be the only
> instance.

Thank you.

-- 
Alex.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 25 Jun 2021 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.