From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Connor Newsgroups: gmane.emacs.bugs Subject: bug#43129: 25.2; Typo in lisp/gnus/nnimap.el Date: Tue, 01 Sep 2020 10:40:47 -0400 Message-ID: <87k0xdh85s.fsf@allyinics.org> References: <87zh6bgsu1.fsf@allyinics.org> <87wo1eep8n.fsf@ericabrahamsen.net> 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="38281"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) Cc: 43129@debbugs.gnu.org To: Eric Abrahamsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 01 17:13:43 2020 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 1kD7ye-0009my-Li for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Sep 2020 17:13:40 +0200 Original-Received: from localhost ([::1]:53314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kD7yd-0000gQ-KG for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Sep 2020 11:13:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kD7Ys-0005t0-W6 for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 10:47:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45187) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kD7Ys-0000os-N2 for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 10:47:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kD7Yr-0005Pv-LF for bug-gnu-emacs@gnu.org; Tue, 01 Sep 2020 10:47:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Connor Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Sep 2020 14:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43129 X-GNU-PR-Package: emacs Original-Received: via spool by 43129-submit@debbugs.gnu.org id=B43129.159897161120322 (code B ref 43129); Tue, 01 Sep 2020 14:47:01 +0000 Original-Received: (at 43129) by debbugs.gnu.org; 1 Sep 2020 14:46:51 +0000 Original-Received: from localhost ([127.0.0.1]:56730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kD7Yg-0005HB-S1 for submit@debbugs.gnu.org; Tue, 01 Sep 2020 10:46:51 -0400 Original-Received: from li77-148.members.linode.com ([74.207.235.148]:33142 helo=allyinics.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kD7Rh-0003R9-KC for 43129@debbugs.gnu.org; Tue, 01 Sep 2020 10:39:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=allyinics.org; s=x; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=AQ5luO3zZLq1CBWi9gI1+dgKubKwV1H9iIpvbaqs9oQ=; b=WWgosLWEgsOR6q/EcW7+3cVnI+9QuerTsl5XUSfZlaBU1AKi1F0sEY3z1+4ZPBPU7tb9fYe53EFCY9AlD5IO3uufPlKazBwFGUoTF0IgmERGNHEIok2N00o2UZl4MZJTQNXFD48MhaZPRDCedBn00aIQ0wfJFA3w1hmNFsOoAM/vY7A9frt5S8c9q2ZuatZHUqjbyQATiQ67o3JghWnleoYMMiHWofk2q/DiLHqwjUhfSq9BLMLIj9KUHI6uAdAsanKFcfLM6lR6Wst0AuHA0aoWUyRBm8Nc0mCCSmTDaqjsyGD5JOYKJIo4cHgWOGk3N30UlmCLnjNW+zWdUchaJw==; Original-Received: from [68.204.52.109] (helo=localhost) by allyinics.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1kD7Rg-0004J9-Az; Tue, 01 Sep 2020 09:39:36 -0500 In-Reply-To: <87wo1eep8n.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Mon, 31 Aug 2020 09:47:52 -0700") X-Mailman-Approved-At: Tue, 01 Sep 2020 10:46:47 -0400 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:186855 Archived-At: --=-=-= Content-Type: text/plain Eric Abrahamsen writes: > Thanks for this report! Can you tell us which IMAP servers you've > tested this on? I just tried Dovecot, and the "(cadr result)" fix works > properly there. Unless we know there are some servers where "(caddr > result)" is appropriate (I wonder what server Nikolaus was using), I'm > inclined to put the simpler fix in. I was a bit mistaken. My initial tests were on an old server that didn't support MOVE, so I overlooked something important, the reason for the change: the COPYUID is given as an "untagged response" for MOVE but a "tagged response" for COPY [0]. IOW, caddr is what to use for getting the COPYUID from a response to a MOVE command. The COPYUID response is given by both the COPY and MOVE commands. I'd only been testing the COPY command, oops. The cautious patch seems to handle both cases, according to this test code: --=-=-= Content-Type: text/lisp Content-Disposition: inline; filename=imap Content-Description: test code (mapcar (lambda (imap-response) (with-temp-buffer (insert imap-response) (or (nnimap-find-uid-response "COPYUID" (cadr ;; simulate a call to nnimap-command. (cons t (nnimap-parse-response)))) (nnimap-find-uid-response "COPYUID" (caddr (cons t (nnimap-parse-response))))))) '( ;; MOVE result "* OK [COPYUID 1598849953 2 3] Moved UIDs.\r * 1 EXPUNGE\r 1 OK Move completed (0.015 + 0.000 + 0.014 secs).\r" ;; COPY result "6 OK [COPYUID 1395967160 10 3] Copy completed.")) --=-=-= Content-Type: text/plain Sorry for the confusion. This problem is only going to affect those whose IMAP servers don't support the MOVE extension, which is probably why it was overlooked. I tested with courier, dovecot, RFC sample sessions and gmail IMAP transcripts, FWIW. sean [0] tagged in COPY response https://tools.ietf.org/html/rfc2359#section-4.3 untagged in MOVE response https://tools.ietf.org/html/rfc6851#section-4.3 --=-=-=--