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 12:16:30 +0000 Message-ID: <871qk0gsbl.fsf@posteo.net> References: <87cz9e8hoe.fsf@gmail.com> <87edo0qn2a.fsf@posteo.net> <83zg6ontfp.fsf@gnu.org> 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="32184"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59501@debbugs.gnu.org, thuna.cing@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 14:17:46 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 1ptSTQ-00088l-DS for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 14:17:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptSSm-0004ol-A4; Mon, 01 May 2023 08:17:04 -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 1ptSSl-0004oT-1r for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:17:03 -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 1ptSSk-0007hK-Ol for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptSSk-0004lN-CC for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:17: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:17: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.168294340018267 (code B ref 59501); Mon, 01 May 2023 12:17:02 +0000 Original-Received: (at 59501) by debbugs.gnu.org; 1 May 2023 12:16:40 +0000 Original-Received: from localhost ([127.0.0.1]:39087 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSSN-0004kY-0V for submit@debbugs.gnu.org; Mon, 01 May 2023 08:16:39 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:50617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSSL-0004kI-2u for 59501@debbugs.gnu.org; Mon, 01 May 2023 08:16:37 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 902A724011E for <59501@debbugs.gnu.org>; Mon, 1 May 2023 14:16:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682943391; bh=vb8SSJ8mK4QyvddwWRQ2m6EOhtDsfFLLqSPGJyKhMKg=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=i7xa+bygJqyxRcLcJgW6y4Lp9kpKft/h20VBc1cmUfWMFqdY7ICRs9v6caTl6SwC3 1gpkrl+9ok1Hz2OWhf0H5kwf9cQzo+meSmW4pObqNJ3fm4OA38msheA1uuRbsgvUda R+w5NEA7HXmbPmEB1eV1IhefrZZOr3UT9m10ScLLUWehvFrjRaFcnZh/r5XK8H21r1 IqdyCuKlk7sh7QJ1shkqHN2IJ1um4WsbMUOQ3y5Wb7QaVd51u4sJEGOpfXRlTXlD23 0JCcpZ+20NR4tbA/1V8xxP6NqLim0RFCUPiNf2gSrmCi4TAmAQWNzzNrn03Xtoedzv mn1Ejvrj/fPRQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q92Hz0R8Rz9rxB; Mon, 1 May 2023 14:16:30 +0200 (CEST) In-Reply-To: <83zg6ontfp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 May 2023 15:10:34 +0300") 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:260860 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: 59501@debbugs.gnu.org, "'Eli Zaretskii'" >> Date: Mon, 01 May 2023 11:59:57 +0000 >>=20 >> Thuna writes: >>=20 >> > 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. >>=20 >> Sorry for missing this message, this patch looks like the right fix. I >> have recently been noticing issues related to this myself. >>=20 >> Would it be OK to apply this to emacs-29? > > Yes, but please fix the doc string to not use non-ASCII quotes. Done, > Also, don't forget the Copyright-paperwork-exempt thingy when you > install. Will do. Thuna: since you have a few other patches as well, would you be interested in signing the CA so that there are no issues in the future? > Thanks. --=20 Philip Kaludercic