ement.el
ement.el copied to clipboard
Link to events in room buffer (e.g. Org links)
To me, a killer feature would be the ability to link to ement messages from org files.
This seems to be quite easy to implement, using event ids as anchors.
@alphapapa, would this feature be appreciated? I might give it a shot myself when I find the time.
Hi Justus,
Yes, this is a feature I'd like to add, along with searching, having Emacs bookmarks for events, etc. Implementing this properly will require some more backend work relating to UI, e.g. fetching messages on either side of an event, maintaining knowledge of where timeline gaps are and filling them when the user scrolls to them, maybe displaying bookmarked events in separate buffers with context, etc. So unfortunately it's not as simple as it might seem at first glance.
I'm aiming to keep Ement.el suitable for adding to GNU ELPA someday, so if you've done the FSF copyright assignment, I'd welcome your help with this (although the bigger parts of it may be ones I need to tackle myself, but we'll see).
Thanks.
From having looked at the spec recently, this means using the /messages
API endpoint. It shouldn't be too difficult, but displaying the results may require either implementing another room mode to display only some events from a room, or inserting the events into the existing room timeline, then inserting them into the buffer and moving to them.
displaying the results may require either implementing another room mode to display only some events from a room, or inserting the events into the existing room timeline, then inserting them into the buffer and moving to them.
Perhaps a hybrid solution makes sense? If there is already a room buffer containing the event, move to it, otherwise create a new room buffer containing just this event, with scrolling up/down retrieving preceding/following events?
This would avoid gaps in the timeline or having to close them by downloading and displaying many events.
This is also relevant to #163.
@piater Yes, I think that would be the best approach. On our side, it shouldn't be hard to integrate into the existing room buffer code; we just need to write the API code to fetch the events from the correct endpoint, which is one that the client doesn't use yet.