From: Philip Kaludercic <philipk@posteo.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 59501@debbugs.gnu.org, thuna.cing@gmail.com
Subject: bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place
Date: Mon, 01 May 2023 12:16:30 +0000 [thread overview]
Message-ID: <871qk0gsbl.fsf@posteo.net> (raw)
In-Reply-To: <83zg6ontfp.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 01 May 2023 15:10:34 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Philip Kaludercic <philipk@posteo.net>
>> Cc: 59501@debbugs.gnu.org, "'Eli Zaretskii'" <eliz@gnu.org>
>> Date: Mon, 01 May 2023 11:59:57 +0000
>>
>> Thuna <thuna.cing@gmail.com> 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 <thuna`> ,ping
>> >> (25469 29641) > 02:13 <fsbot> ␕
>> >> (25469 29642 502966 649000) > 02:13 <thuna`> ,ping
>> >> (25469 29643) > 02:13 <fsbot> ␕
>> >> (25469 29643 755653 540000) > 02:13 <thuna`> ,ping
>> >> (25469 29644) > 02:13 <fsbot> ␕
>> >> (25469 29645) > 02:13 <fsbot> ␕
>> >> (25469 29645 103860 988000) > 02:13 <thuna`> ,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.
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.
--
Philip Kaludercic
next prev parent reply other threads:[~2023-05-01 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-23 3:37 bug#59501: [PATCH] rcirc: Issue with printing messages in the wrong place Thuna
2023-05-01 11:59 ` Philip Kaludercic
2023-05-01 12:10 ` Eli Zaretskii
2023-05-01 12:16 ` Philip Kaludercic [this message]
2023-05-04 8:07 ` Philip Kaludercic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qk0gsbl.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=59501@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=thuna.cing@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).