From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place Date: Mon, 01 May 2023 15:10:34 +0300 Message-ID: <83zg6ontfp.fsf@gnu.org> References: <87cz9e8hoe.fsf@gmail.com> <87edo0qn2a.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3178"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59501@debbugs.gnu.org, thuna.cing@gmail.com To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 01 14:11:26 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 1ptSNH-0000Ww-WC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 May 2023 14:11:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ptSN2-0003mc-3m; Mon, 01 May 2023 08:11:08 -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 1ptSMw-0003kd-S2 for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:11: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 1ptSMw-0006kL-IX for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ptSMw-0004Yr-5U for bug-gnu-emacs@gnu.org; Mon, 01 May 2023 08:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 May 2023 12:11: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.168294301817467 (code B ref 59501); Mon, 01 May 2023 12:11:02 +0000 Original-Received: (at 59501) by debbugs.gnu.org; 1 May 2023 12:10:18 +0000 Original-Received: from localhost ([127.0.0.1]:39074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSME-0004Xf-Do for submit@debbugs.gnu.org; Mon, 01 May 2023 08:10:18 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:35624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ptSMA-0004XL-5A for 59501@debbugs.gnu.org; Mon, 01 May 2023 08:10:16 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptSLp-0006JI-HS; Mon, 01 May 2023 08:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=cfHp5ofxKvz1+yEp8xJ6evaJaQ+OAdxfm03ozuw2inw=; b=Q2yQ/5q30jvkvJV6D1tg 07n9Hh9SkR9RUrHZkct95ckh1/uMIJxTouwKzFUwB+nU+WSX6+vjLPyM1l4MEecW2g/3730y92YE9 ussnU3TWFZGlaOGSpK68onN7jNpJcBixLjcMdcL0tJC5VcASNNKhGUq2rbXGNkH+w50CbvTxGp1QO FCID/7x282zNCTijnL+IEz4tadKoiC3Tt7Ckoti/o9s7AKA6HFIPzaGbnDAfpWwnIX9UP2E6vF2eT FwmDcBaESWV0ixkuAZR0BqCD3l5LFbEau7zqhITJzBwFtR6sLome7ZB/aUfGNfII/8x1ZQlirKhtX Rl3I6AWzizcjQw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ptSLn-00078F-Md; Mon, 01 May 2023 08:09:52 -0400 In-Reply-To: <87edo0qn2a.fsf@posteo.net> (message from Philip Kaludercic on Mon, 01 May 2023 11:59:57 +0000) 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:260859 Archived-At: > From: Philip Kaludercic > Cc: 59501@debbugs.gnu.org, "'Eli Zaretskii'" > Date: Mon, 01 May 2023 11:59:57 +0000 > > 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. > > > ============================= 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. > > > ============================= 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 ␕ > >> (25469 29642 502966 649000) > 02:13 ,ping > >> (25469 29643) > 02:13 ␕ > >> (25469 29643 755653 540000) > 02:13 ,ping > >> (25469 29644) > 02:13 ␕ > >> (25469 29645) > 02:13 ␕ > >> (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? Yes, but please fix the doc string to not use non-ASCII quotes. Also, don't forget the Copyright-paperwork-exempt thingy when you install. Thanks.