clarete / hackernews.el

Hacker News client for Emacs
GNU General Public License v3.0
246 stars 26 forks source link

Support for viewing comments #44

Open naclander opened 6 years ago

naclander commented 6 years ago

I searched for previous issues but couldn't find anything.

I know hackernews.el currently supports viewing the news-stories list, and was wondering whether support for the comment page is being worked on?

I began looking how to implement this myself, but figured I'd ask in case this was already on the roadmap.

Thanks in advance for the great work on this mode.

basil-conto commented 6 years ago

was wondering whether support for the comment page is being worked on?

If someone is, then they haven't let us know. :)

I began looking how to implement this myself, but figured I'd ask in case this was already on the roadmap.

It's on the roadmap insofar as there has always been intention to eventually add this functionality (see the last sentence of README#Interface), but no work has been done on it so far. So I'm sure I speak for everyone when I say your help would be very welcome. :)


The following points are just me thinking out loud, so please don't be discouraged if you disagree with anything. On the contrary, I'm looking for a back and forth discussion.

I think it would be a good idea to survey which packages already exist (prioritising built-in, then ELPA and finally MELPA as a final and IMO to-be-avoided resort) which might assist in the implementation of the comments section. The first thing that comes to mind is Damien Cassou's hierarchy, which was discussed relatively recently on emacs-devel. The discussion was particularly focussed on how to include the core of hierarchy into Emacs proper, so that it can be reused, but maybe that's too alpha for us to use right now. On the other hand, we might be able to borrow some ideas from its implementation.

As suggested by @clarete (https://github.com/clarete/hackernews.el/issues/40#issuecomment-365937184), it would also be nice for comments to be lazy/async and, in Emacs spirit, foldable (hence my thinking of hierarchy). Perhaps another worthwhile avenue would be the widget library, as used by the Custom interface.

Of course, none of this has to be implemented straight away, if at all. A bare-bones comments dump is better than no comments. :)

Thoughts?

P.S. Thanks again for your interest in this package!

basil-conto commented 6 years ago

Oh, I forgot to clarify - I'm dumping my thoughts at this early stage because I think early brainstorming can help bring out the more important questions / design choices / etc., even if they won't be useful / acted on until a much later version.

basil-conto commented 6 years ago

I'll try to have something addressing #39, #40 and #42 up by the end of next week, which would sum up nicely to a v0.5.0 release. If you're sincerely interested in helping out @naclander, I'd be grateful if you'd also be willing to review the changes, which may be relevant to (at least the retrieval of) the comments section.

naclander commented 6 years ago

@basil-conto thanks for the brain dump, this is definitely useful for me, and for anyone who probably looks back at this later.

clarete commented 6 years ago

That's so timely, with all the work @basil-conto is doing on the loading asynchronous data it'd be certainly fun to add the comments!! Hehehe, don't wanna pollute this issue with offtopic stuff but I can see this lil client with auth & posting too hehehe \o/

basil-conto commented 6 years ago

Sounds to me like I can assign this issue to you @naclander. :)

@clarete getting ahead of themselves as always. :)

basil-conto commented 6 years ago

I think it would be a good idea to survey which packages already exist (prioritising built-in, then ELPA and finally MELPA as a final and IMO to-be-avoided resort) which might assist in the implementation of the comments section.

Might be worth looking into the built-in tree-widget.el library and its users.

dakra commented 5 years ago

I haven't seen this package before but coming from the just posted reddit thread I would say org-mode seems like an obvious and "easy" to implement choice to show the comments.

basil-conto commented 5 years ago

Thanks @dakra, that's definitely an avenue worth considering as well (if not full-blown org-mode, then at least the simpler outline-mode).