From unknown Sat Jun 21 03:25:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#59501 <59501@debbugs.gnu.org> To: bug#59501 <59501@debbugs.gnu.org> Subject: Status: [PATCH] rcirc: Issue with printing messages in the wrong place Reply-To: bug#59501 <59501@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:25:23 +0000 retitle 59501 [PATCH] rcirc: Issue with printing messages in the wrong place reassign 59501 emacs submitter 59501 Thuna severity 59501 normal tag 59501 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 22 22:37:50 2022 Received: (at submit) by debbugs.gnu.org; 23 Nov 2022 03:37:50 +0000 Received: from localhost ([127.0.0.1]:53072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxga6-0008Ut-2H for submit@debbugs.gnu.org; Tue, 22 Nov 2022 22:37:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:49262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxga3-0008Uj-1x for submit@debbugs.gnu.org; Tue, 22 Nov 2022 22:37:47 -0500 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 1oxga2-0003EL-SN for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 22:37:46 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxga0-0005W2-R3 for bug-gnu-emacs@gnu.org; Tue, 22 Nov 2022 22:37:46 -0500 Received: by mail-ej1-x634.google.com with SMTP id vv4so30716402ejc.2 for ; Tue, 22 Nov 2022 19:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=OpaI/RBQOSqCZEEbZ+fcHHvaSREJNx1KlF7Hmht9KNg=; b=AnUDaYX68ezrJ00ACUmCGVgHjl7Cxu4CkvO2RBHbsfMDUWVy+UFaS+pFbZTAji8TYM SQlFAtZ3aNujriG4ZtYtoWT6aN+UA8wA5RH6dJMalPeA8l/sUtZ2cRcwSDpbbjuSR4DG pktUUDOBhvjaAAb72ASJXfrYWEanECKhAzwJ8G/WUAFdavOeCqIIJy0lAK2jFiLK4lWp LXdXzlqi91lyCUPawkefezwgsJzRfD8xJjylzW3Tw/6Gnwv6VHQJ7FUNYoTmUEtoXHCB htSVHPq4sKEQHfvv+uj8DrRTo1CNU6NXOCK7QZa/SQO6jR5Rsvq9cGN67ZWa6DN+BiiW vHkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OpaI/RBQOSqCZEEbZ+fcHHvaSREJNx1KlF7Hmht9KNg=; b=uQ0iC1bj4lEWTRK2ghHPpQOtvyifBpXy6beZmwqTeEszLHSNuiPa58ttIdWq5TuB95 3AljouG4gex3AV4hUFtIR7IrxPAJjKI3kkr2Ic4AVxjNH3HMwpYU72czBaJ3aiDctPCY g/4uOuhtkyw4BOyoSTm90iXMkwiW/gHPNPePso/mHNbfCUfzOqBkN+fw831L2uXlwodH jp5bkgu0fj/dAtyOIsfEjzm0tArg60lFCaH7PQR5jqL7Jt4Z+fT95fr3UERbmRZOfDPM 0ysiftRLFzFbIZfpjWUupkxUVhpub3G/7mmoLKE3wUrqoPFelXnnkFXMDtYYCtVDNN8m jemQ== X-Gm-Message-State: ANoB5pmeNGAhDQU57EFn7adOeQprzaEdjePqPLs+Daxxc0Ot7eC02dVH OljMDQFnSUQGINik4Y3nAob0Qormykc= X-Google-Smtp-Source: AA0mqf5ddaDTd4OsX0KoP1P1Ap9gDTZUnCk06Url9ZmPpIeaugF1q52nXDesVMWQ3sAPtmytGGyJiQ== X-Received: by 2002:a17:906:5583:b0:78d:b3ef:656c with SMTP id y3-20020a170906558300b0078db3ef656cmr6779597ejp.627.1669174659349; Tue, 22 Nov 2022 19:37:39 -0800 (PST) Received: from thuna (eduroam-092.unibocconi.it. [90.147.70.92]) by smtp.gmail.com with ESMTPSA id jt12-20020a170906ca0c00b007aec44edcfcsm6672264ejb.75.2022.11.22.19.37.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Nov 2022 19:37:38 -0800 (PST) From: Thuna To: bug-gnu-emacs@gnu.org Subject: [PATCH] rcirc: Issue with printing messages in the wrong place Date: Wed, 23 Nov 2022 04:37:37 +0100 Message-ID: <87cz9e8hoe.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=thuna.cing@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-rcirc-Fix-messages-printing-in-the-wrong-place.patch Content-Transfer-Encoding: quoted-printable Content-Description: the patch >From 43bd8eb367f33a022fcc6554102ca38204296e7f Mon Sep 17 00:00:00 2001 From: Thuna Date: Wed, 23 Nov 2022 04:14:36 +0100 Subject: [PATCH] rcirc: Fix messages printing in the wrong place * lisp/net/rcirc.el (rcirc-send-message): Print the message before sending it to the server. (rcirc-print): Get the time with subsecond precision. * lisp/calendar/parse-time.el (parse-time-string parse-iso8601-time-string): Accept optional second FORM arguments, with the same meaning as in `decode-time'. Mention as such in the docstring. --- lisp/calendar/parse-time.el | 16 ++++++++++------ lisp/net/rcirc.el | 6 +++--- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/lisp/calendar/parse-time.el b/lisp/calendar/parse-time.el index f3ad513925..15713980cb 100644 --- a/lisp/calendar/parse-time.el +++ b/lisp/calendar/parse-time.el @@ -147,7 +147,7 @@ parse-time-rules ;;;###autoload(put 'parse-time-rules 'risky-local-variable t) =20 ;;;###autoload -(defun parse-time-string (string) +(defun parse-time-string (string &optional form) "Parse the time in STRING into (SEC MIN HOUR DAY MON YEAR DOW DST TZ). STRING should be an ISO 8601 time string, e.g., \"2020-01-15T16:12:21-08:0= 0\", or something resembling an RFC 822 (or later) date-time, e.g., @@ -156,9 +156,11 @@ parse-time-string return a \"likely\" value even for somewhat malformed strings. The values returned are identical to those of `decode-time', but any unknown values other than DST are returned as nil, and an -unknown DST value is returned as -1." +unknown DST value is returned as -1. + +See =E2=80=98decode-time=E2=80=99 for the meaning of FORM." (condition-case () - (iso8601-parse string) + (iso8601-parse string form) (wrong-type-argument (let ((time (list nil nil nil nil nil nil nil -1 nil)) (temp (parse-time-tokenize (downcase string)))) @@ -199,12 +201,14 @@ parse-time-string (setf (nth (pop slots) time) new-val)))))))) time)))) =20 -(defun parse-iso8601-time-string (date-string) +(defun parse-iso8601-time-string (date-string &optional form) "Parse an ISO 8601 time string, such as \"2020-01-15T16:12:21-08:00\". Fall back on parsing something resembling an RFC 822 (or later) date-time. This function is like `parse-time-string' except that it returns -a Lisp timestamp when successful." - (when-let ((time (parse-time-string date-string))) +a Lisp timestamp when successful. + +See =E2=80=98decode-time=E2=80=99 for the meaning of FORM." + (when-let ((time (parse-time-string date-string form))) (encode-time time))) =20 (provide 'parse-time) diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index 99b9888fda..1fdf41a35e 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -1233,9 +1233,9 @@ rcirc-send-message (let ((response (if noticep "NOTICE" "PRIVMSG"))) (rcirc-get-buffer-create process target) (dolist (msg (rcirc-split-message message)) - (rcirc-send-string process response target : msg) (unless silent - (rcirc-print process (rcirc-nick process) response target msg))))) + (rcirc-print process (rcirc-nick process) response target msg)) + (rcirc-send-string process response target : msg)))) =20 (defvar-local rcirc-input-ring nil "Ring object for input.") @@ -2034,7 +2034,7 @@ rcirc-print (not (string=3D sender (rcirc-nick process)))) (let* ((buffer (rcirc-target-buffer process sender response target tex= t)) (time (if-let ((time (rcirc-get-tag "time"))) - (parse-iso8601-time-string time) + (parse-iso8601-time-string time t) (current-time))) (inhibit-read-only t)) (with-current-buffer buffer --=20 2.37.4 --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable I have occasionally had replies show before my messages, so I=20 decided to look into it. It looks like rcirc looks at the time=20 of the message, compares it to the `rcirc-time' text property of=20 other messages, and places it so that the property is properly=20 ordered.=20 =20 > =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=20 > fix it. I decided to keep it in because the problem is still=20 > possible, but not it's not what's responsible for this specific=20 > issue.=20 The issue with this is, because the recieved messages' precision=20 can be less than the sent messages' precision (`current-time'=20 returns the time down to milliseconds but servers may choose to=20 only keep it down to seconds), this causes some issues when a=20 message is recieved after a message was sent but still within the=20 same second.=20 > =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=20 =20 An example of this, with the value of the text property=20 `rcirc-time' at the left of the message itself, is:=20 > (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. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 01 07:59:32 2023 Received: (at 59501) by debbugs.gnu.org; 1 May 2023 11:59:32 +0000 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 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 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== 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) From: Philip Kaludercic To: Thuna Subject: Re: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place In-Reply-To: <87cz9e8hoe.fsf@gmail.com> (Thuna's message of "Wed, 23 Nov 2022 04:37:37 +0100") References: <87cz9e8hoe.fsf@gmail.com> 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 Date: Mon, 01 May 2023 11:59:57 +0000 Message-ID: <87edo0qn2a.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59501 Cc: 59501@debbugs.gnu.org, 'Eli Zaretskii' X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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? From debbugs-submit-bounces@debbugs.gnu.org Mon May 01 08:10:18 2023 Received: (at 59501) by debbugs.gnu.org; 1 May 2023 12:10:18 +0000 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 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 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==; 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 Date: Mon, 01 May 2023 15:10:34 +0300 Message-Id: <83zg6ontfp.fsf@gnu.org> From: Eli Zaretskii To: Philip Kaludercic In-Reply-To: <87edo0qn2a.fsf@posteo.net> (message from Philip Kaludercic on Mon, 01 May 2023 11:59:57 +0000) Subject: Re: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place References: <87cz9e8hoe.fsf@gmail.com> <87edo0qn2a.fsf@posteo.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59501 Cc: 59501@debbugs.gnu.org, thuna.cing@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From debbugs-submit-bounces@debbugs.gnu.org Mon May 01 08:16:40 2023 Received: (at 59501) by debbugs.gnu.org; 1 May 2023 12:16:40 +0000 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 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 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== 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) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place In-Reply-To: <83zg6ontfp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 May 2023 15:10:34 +0300") References: <87cz9e8hoe.fsf@gmail.com> <87edo0qn2a.fsf@posteo.net> <83zg6ontfp.fsf@gnu.org> 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 Date: Mon, 01 May 2023 12:16:30 +0000 Message-ID: <871qk0gsbl.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59501 Cc: 59501@debbugs.gnu.org, thuna.cing@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu May 04 04:07:41 2023 Received: (at 59501-done) by debbugs.gnu.org; 4 May 2023 08:07:41 +0000 Received: from localhost ([127.0.0.1]:48426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puU04-0000JM-O9 for submit@debbugs.gnu.org; Thu, 04 May 2023 04:07:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]:40415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1puU01-0000J7-PW for 59501-done@debbugs.gnu.org; Thu, 04 May 2023 04:07:39 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BB05F2402FD for <59501-done@debbugs.gnu.org>; Thu, 4 May 2023 10:07:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1683187651; bh=U/cJkOCas8d16PKnmF3vORDSKS0r1dLFem+njwDMxK8=; h=From:To:Cc:Subject:Autocrypt:Date:From; b=RtfTQrGMRukJtyKR+hzun+H8nj7S4uvQgiptDBnoYbm1b/PVUDT+Is1ee8Lqymgze BC8pXM6dBT73fwGZTzkNnUlk989d9IPea1vpw6xELJvSag0PQchxbMHbmJq/mB8Dbv AeDjze71/+976D9UxEO5V/7zfjhiTTpTnXXLJc2MPqbtmM1j7emUO8uv2SF1H6saj0 EHCxnYiiD2iciC4Gx4LJ3QQNO+AoTEXGdrShPGbr+vJuOlyvpKJ3TKctV6vBR2rMry OIdRuG9//6uEK6aq1DN4ZDypTEUqh4LhJ3VYMtqMeRlyuSwZvsd7Ma22ErF0QRS0M3 w6xAP3ph4yuKw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QBmdH1Lm4z9rxR; Thu, 4 May 2023 10:07:31 +0200 (CEST) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place In-Reply-To: <83zg6ontfp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 May 2023 15:10:34 +0300") References: <87cz9e8hoe.fsf@gmail.com> <87edo0qn2a.fsf@posteo.net> <83zg6ontfp.fsf@gnu.org> 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 Date: Thu, 04 May 2023 08:07:30 +0000 Message-ID: <87zg6kbjul.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 59501-done Cc: 59501-done@debbugs.gnu.org, thuna.cing@gmail.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. > > Also, don't forget the Copyright-paperwork-exempt thingy when you > install. I've pushed the change, closing this report. From unknown Sat Jun 21 03:25:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 01 Jun 2023 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator