From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#48577: 28.0.50; [PATCH] Lexical binding bug in nnimap-process-expiry-targets Date: Fri, 21 May 2021 16:43:02 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24892"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) To: 48577@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 22 01:44:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lkEoQ-0006NC-Ml for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 22 May 2021 01:44:14 +0200 Original-Received: from localhost ([::1]:60058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkEoP-0004wy-N7 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 May 2021 19:44:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkEoF-0004wi-Nn for bug-gnu-emacs@gnu.org; Fri, 21 May 2021 19:44:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54722) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lkEoE-00062H-AN for bug-gnu-emacs@gnu.org; Fri, 21 May 2021 19:44:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lkEoE-0001Ap-3g; Fri, 21 May 2021 19:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Fri, 21 May 2021 23:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48577 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16216406224470 (code B ref -1); Fri, 21 May 2021 23:44:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 May 2021 23:43:42 +0000 Original-Received: from localhost ([127.0.0.1]:38035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkEnu-0001A2-CJ for submit@debbugs.gnu.org; Fri, 21 May 2021 19:43:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:47560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkEnp-00019s-W8 for submit@debbugs.gnu.org; Fri, 21 May 2021 19:43:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkEnp-0004uF-O4 for bug-gnu-emacs@gnu.org; Fri, 21 May 2021 19:43:37 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:25733 helo=mail.lapseofthought.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkEnn-00060G-JA for bug-gnu-emacs@gnu.org; Fri, 21 May 2021 19:43:37 -0400 Original-Received: from awb-mbp.local (unknown [IPv6:2601:646:4200:b470:e19b:7741:3c48:f758]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4Fn37p6WCdz3pdpJ for ; Fri, 21 May 2021 16:43:02 -0700 (PDT) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com Received-SPF: pass client-ip=50.0.39.240; envelope-from=alex@bochannek.com; helo=mail.lapseofthought.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:207006 Archived-At: --=-=-= Content-Type: text/plain 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. --=-=-= Content-Type: text/x-patch Content-Disposition: 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) --=-=-= Content-Type: text/plain -- Alex. --=-=-=--