From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#38938: [PROPOSED] Prefer Lisp integers to numeric strings in IMAP Date: Tue, 13 Oct 2020 10:27:44 -0700 Organization: UCLA Computer Science Department Message-ID: <78c976f2-03ed-e537-8bc5-dc59595af67a@cs.ucla.edu> References: <20200105032041.1499-1-eggert@cs.ucla.edu> <87k166waec.fsf@hase.home> <87eemwrbux.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------EB2C04628FB71647B35DA24A" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23643"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: 38938@debbugs.gnu.org, Andy Moreton To: Lars Ingebrigtsen , Andreas Schwab Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 13 19:28:11 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 1kSO5q-00062O-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 19:28:10 +0200 Original-Received: from localhost ([::1]:53742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kSO5p-0001s2-8w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Oct 2020 13:28:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kSO5i-0001ro-4V for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 13:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37170) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kSO5h-00020F-Rm for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 13:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kSO5h-0006Fk-Ne for bug-gnu-emacs@gnu.org; Tue, 13 Oct 2020 13:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Oct 2020 17:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38938 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 38938-submit@debbugs.gnu.org id=B38938.160261007724027 (code B ref 38938); Tue, 13 Oct 2020 17:28:01 +0000 Original-Received: (at 38938) by debbugs.gnu.org; 13 Oct 2020 17:27:57 +0000 Original-Received: from localhost ([127.0.0.1]:48716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSO5d-0006FS-9L for submit@debbugs.gnu.org; Tue, 13 Oct 2020 13:27:57 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSO5b-0006FE-5L for 38938@debbugs.gnu.org; Tue, 13 Oct 2020 13:27:56 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 15031160089; Tue, 13 Oct 2020 10:27:49 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YaPj4F83QP0H; Tue, 13 Oct 2020 10:27:48 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3EC0B1600B2; Tue, 13 Oct 2020 10:27:48 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xJlPfF1p45KV; Tue, 13 Oct 2020 10:27:48 -0700 (PDT) Original-Received: from [192.168.1.9] (cpe-23-243-218-95.socal.res.rr.com [23.243.218.95]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0F8BF160089; Tue, 13 Oct 2020 10:27:48 -0700 (PDT) Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= mQINBEyAcmQBEADAAyH2xoTu7ppG5D3a8FMZEon74dCvc4+q1XA2J2tBy2pwaTqfhpxxdGA9 Jj50UJ3PD4bSUEgN8tLZ0san47l5XTAFLi2456ciSl5m8sKaHlGdt9XmAAtmXqeZVIYX/UFS 96fDzf4xhEmm/y7LbYEPQdUdxu47xA5KhTYp5bltF3WYDz1Ygd7gx07Auwp7iw7eNvnoDTAl KAl8KYDZzbDNCQGEbpY3efZIvPdeI+FWQN4W+kghy+P6au6PrIIhYraeua7XDdb2LS1en3Ss mE3QjqfRqI/A2ue8JMwsvXe/WK38Ezs6x74iTaqI3AFH6ilAhDqpMnd/msSESNFt76DiO1ZK QMr9amVPknjfPmJISqdhgB1DlEdw34sROf6V8mZw0xfqT6PKE46LcFefzs0kbg4GORf8vjG2 Sf1tk5eU8MBiyN/bZ03bKNjNYMpODDQQwuP84kYLkX2wBxxMAhBxwbDVZudzxDZJ1C2VXujC OJVxq2kljBM9ETYuUGqd75AW2LXrLw6+MuIsHFAYAgRr7+KcwDgBAfwhPBYX34nSSiHlmLC+ KaHLeCLF5ZI2vKm3HEeCTtlOg7xZEONgwzL+fdKo+D6SoC8RRxJKs8a3sVfI4t6CnrQzvJbB n6gxdgCu5i29J1QCYrCYvql2UyFPAK+do99/1jOXT4m2836j1wARAQABtCBQYXVsIEVnZ2Vy dCA8ZWdnZXJ0QGNzLnVjbGEuZWR1PokCVQQTAQgAPwIbAwYLCQgHAwIGFQgCCQoLBBYCAwEC HgECF4AWIQR+N5Kp2 In-Reply-To: <87eemwrbux.fsf@gnus.org> Content-Language: en-US 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:190439 Archived-At: This is a multi-part message in MIME format. --------------EB2C04628FB71647B35DA24A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 9/20/20 3:17 AM, Lars Ingebrigtsen wrote: > so while it'd be better to use integers here, I don't think it's > workable OK. Andy suggested updating comments and I did find one that needed that; perhaps more comments would be useful too, but one thing at a time. Also, there's no longer a need to remove MODSEQs from the buffer since they parse OK now even when they are large integers. So I installed the attached minor fixup instead of the original patch I proposed. --------------EB2C04628FB71647B35DA24A Content-Type: text/x-patch; charset=UTF-8; name="0001-nnimap-MODSEQ-cleanup.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-nnimap-MODSEQ-cleanup.patch" >From 1274d0eed67470f9c3d001ff60d76eeefa6983b9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 13 Oct 2020 10:21:40 -0700 Subject: [PATCH] nnimap MODSEQ cleanup * lisp/gnus/nnimap.el (nnimap-parse-flags): Remove old hack that deletes MODSEQ entries in the buffer, as Emacs now has bignums and so won't misparse MODSEQs (Bug#38938). --- lisp/gnus/nnimap.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index d797e893f5..8a88e0e6e6 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1772,11 +1772,6 @@ nnimap-parse-flags ;; read it. (subst-char-in-region (point-min) (point-max) ?\\ ?% t) - ;; Remove any MODSEQ entries in the buffer, because they may contain - ;; numbers that are too large for 32-bit Emacsen. - (while (re-search-forward " MODSEQ ([0-9]+)" nil t) - (replace-match "" t t)) - (goto-char (point-min)) (let (start end articles groups uidnext elems permanent-flags uidvalidity vanished highestmodseq) (dolist (elem sequences) @@ -1803,8 +1798,9 @@ nnimap-parse-flags (setq uidvalidity (and (re-search-forward "UIDVALIDITY \\([0-9]+\\)" end t) - ;; Store UIDVALIDITY as a string, as it's - ;; too big for 32-bit Emacsen, usually. + ;; Store UIDVALIDITY as a string; before bignums, + ;; it was usually too big for 32-bit Emacsen, + ;; and we don't want to change the format now. (match-string 1))) (goto-char start) (setq vanished -- 2.25.1 --------------EB2C04628FB71647B35DA24A--