mooseyboots / mastodon.el

Emacs client for Mastodon. moved to:
https://codeberg.org/martianh/mastodon.el
GNU General Public License v3.0
168 stars 27 forks source link

Add streaming behaviour for buffers #164

Open alexjgriffith opened 6 years ago

alexjgriffith commented 6 years ago

Get async streams working with synchronous mastodon-tl--timelines

Full implementation depends on #37 for rendering notifications

alexjgriffith commented 6 years ago

Timeline streams are working and ready for integration into mainline mastodon.el. They now extend the capacity of mastodon-tl.el functions. A few decisions have to be made about integration.

  1. Will it replace the default timeline, i.e. will the user automatically get a streaming timeline, or is it something we want explicitly to turn on?
  2. When toggling back and forth from fixed to streaming should we load all missed toots, or leave a gap in the timeline?
  3. How many toots should we load before we start culling the end of the display buffer? 100, 1,000, 10,000? Note that since the changes are made far from the insertion point there may be a noticeable delay when culling if the buffer is to long or if the buffer is culled to frequently.
hdurer commented 6 years ago

I haven't made up my mind about 1) yet.

2) is no different from what it is a the moment I believe. If you don't update for ages and then press 'u' it won't get all intermittent toot, I believe. I suspect that should be raised as a separate issue (add the ability for the user to on-demand fill these gaps?) but leave it as is for the streams (i.e. when you re-enable streams just load from that point on. As an added bonus we could do one automated update call to do any catch-up if needed before resuming the stream...

3) should probably be a customizable value - but what default value? I'd vote for something around 1000...

mooseyboots commented 2 years ago

@alexjgriffith it's a wild long shot so long after the fact, but would you be willing to take a look at this again? i merged your work over at https://git.blast.noho.st/mouse/mastodon.el, but found it sometimes would go haywire so i didn't focus on making it accessible. trying to debug it almost broke my brain so i desisted. but when it works it's lovely, so would be a pity to jettison too.