From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place Date: Mon, 01 May 2023 11:59:57 +0000 Message-ID: <87edo0qn2a.fsf@posteo.net> References: <87cz9e8hoe.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31102"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59501@debbugs.gnu.org, 'Eli Zaretskii' To: Thuna Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 14:00:24 2023 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 1ptSCe-0007wG-LQ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 14:00:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptSCM-0001W5-5D; Mon, 01 May 2023 08:00:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptSCJ-0001UK-95 for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:00:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ptSCI-0004GH-T0 for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptSCI-0004Ds-4G for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 12:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59501-submit@debbugs.gnu.org id=B59501.168294237216154 (code B ref 59501); Mon, 01 May 2023 12:00:02 +0000 Original-Received: (at 59501) by debbugs.gnu.org; 1 May 2023 11:59:32 +0000 Original-Received: from localhost ([127.0.0.1]:39058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSBo-0004CU-GL for submit@debbugs.gnu.org; Mon, 01 May 2023 07:59:32 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58901) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSBn-0004C9-4M for 59501@debbugs.gnu.org; Mon, 01 May 2023 07:59:32 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 470742401F8 for <59501@debbugs.gnu.org>; Mon, 1 May 2023 13:59:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682942365; bh=BfuYlpfPo2CJtNqa1srNQ6Hkf1XKlMyBUKiys/LrXcs=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=JXo+uRCfEPIk79uwYk227IPp8999eihdJnxXgnl4luFm2spEDxwqjZULqs4oCbzC3 CWflszN1i3QbZ7k7MMiX8RiVBq5XZXUxvvpEMiJKOT/W7CRmH/wMnmlnY8pd5SMb1A fe/l6UuQowUg1pI+gDkeunBxZFqnvf2RcTvR0ah0680EDKcwvhacCipeLTffA/tlO9 MBa9fcrR5ZMIeqx6vJSrPQmWMkS5hIvB6ODTQFdzgi7G1vioJgr9B0yytQOQ2XC/G1 WTqT7Slsj741/2ueI14yuE9cX5+LEU4djKjStw4bphZByUh+BrQqQtI/DIwWzrBmq6 j3FIdG2VAqt1A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q91wD67NQz6tm4; Mon, 1 May 2023 13:59:24 +0200 (CEST) In-Reply-To: <87cz9e8hoe.fsf@gmail.com> (Thuna's message of "Wed, 23 Nov 2022 04:37:37 +0100") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260856 Archived-At: Thuna writes: > I have occasionally had replies show before my messages, so I decided > to look into it. It looks like rcirc looks at the time of the > message, compares it to the `rcirc-time' text property of other > messages, and places it so that the property is properly ordered. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Disregard this, the patch does not > fix > it. I decided to keep it in because the problem is still > possible, > but not it's not what's responsible for this specific > issue. The > issue with this is, because the recieved messages' precision can be > less than the sent messages' precision (`current-time' returns the > time down to milliseconds but servers may choose to only keep it down > to seconds), this causes some issues when a message is recieved after > a message was sent but still within the same second. > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D An example of this, with the value of > the text property `rcirc-time' at the left of the message itself, is: >> (25469 29640 874652 270000) > 02:13 ,ping >> (25469 29641) > 02:13 =E2=90=95 >> (25469 29642 502966 649000) > 02:13 ,ping >> (25469 29643) > 02:13 =E2=90=95 >> (25469 29643 755653 540000) > 02:13 ,ping >> (25469 29644) > 02:13 =E2=90=95 >> (25469 29645) > 02:13 =E2=90=95 >> (25469 29645 103860 988000) > 02:13 ,ping > > As you can see, the response to the last ping arrived after the ping > itself, but because of the precision difference, rcirc sorted the > messages wrong. > > The issue was with `parse-time-string'. It (and by proxy > `parse-iso8601-time-string'), uses `iso8601-parse' with nil FORM, > resulting in the subsecond precision being thrown out. To fix this, I > added FORM arguments to those two functions as well. Sorry for missing this message, this patch looks like the right fix. I have recently been noticing issues related to this myself. Would it be OK to apply this to emacs-29?