Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event insertion sequence bug in ement-notify--log-to-buffer ? #191

Closed
phil-s opened this issue Jul 24, 2023 · 2 comments
Closed

Event insertion sequence bug in ement-notify--log-to-buffer ? #191

phil-s opened this issue Jul 24, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@phil-s
Copy link

phil-s commented Jul 24, 2023

I just spotted a log entry being inserted somewhere other than the end of the log buffer (and not chronologically), so I'm looking at ement-notify--log-to-buffer and trying to see whether it seems buggy in that regard.

The call to ement-room--insert-event seems to have full control over this, and I presume is intended to insert the event in its chronological position in the room, but I'm guessing that the multi-room nature of the log buffer is causing it some confusion.

I saw messages 3 and 4 inserted in the following non-chronological order:

13:54  RoomA » user1> Message 1
15:12  RoomC » user3> Message 3
14:02  RoomB » user2> Message 2
15:12  RoomC » user3> Message 4

I'm not convinced that point was at the end of the buffer when Message 3 came in, so it might well have been at the position the message was inserted.

@alphapapa
Copy link
Owner

Haven't looked at the code yet, but this sounds like an issue with ewoc that I had to workaround in ement-room by ensuring that the buffer's window is selected before inserting the node. It might be a bug in EWOC, but I haven't dug that deep into it. Anyway, the fix might be that simple. (It was annoying to debug, because it only happened if the buffer had a visible window and the window was not selected.)

@alphapapa alphapapa self-assigned this Jul 29, 2023
@alphapapa alphapapa added the bug Something isn't working label Jul 29, 2023
@alphapapa alphapapa added this to the 0.11 milestone Jul 29, 2023
@alphapapa
Copy link
Owner

@phil-s I think that should fix it. Please let me know if you encounter the problem again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants