An Emacs HackerNews Client
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.org
hn-comment.el
hn-utils.el
hn.el
screenshot.png

README.org

A HackerNews Client that Reads Comments, and More

Introduction

Lincoln de Sousa has clarete/hackernews.el. It supports list stories, open link in internal/external browser, mark as read. However, that is hardly any improvement from reading hackernews on web.

This client is designed to offer a premium reading experience, including reading comments.

Screenshot:

./screenshot.png

Install and Usage

Currently I’m not making it available on Melpa. But I recommand to use straight to install package directly from git repository. You can install and setup the package using this configuration:

(use-package hn
  :straight (hn :type git :host github
                :repo "lihebi/hn.el")
  :config
  (setq hn-hl-users '("okanesen" "wilsonfiifi"))
  (setq hn-hl-keywords '("lisp" "linux"
                         "Show HN"
                         "\\bML\\b" "\\bAI\\b"
                         "Tensorflow"))
  (setq hn-fields '(star score comment user title)))

Run command hn-master to bring the buffer. Shortcuts:

m
load more
l
cycle through listing mode. Available list mode: all, new, starred. The current mode is displayed in the mode line, named HN-ALL, HN-NEW, HN-STARRED respectively.
s
toggle star of an article
u
toggle mark as read/unread
g
refresh
G
hard refresh. By default, the top stories list and items (stories and comments) are cached to avoid network traffic. Hard refresh will empty the cache, so that you will see new posts and new comments.
c
read comment in comment viewer
Push button semantic
the title, comment and user fields are buttons. Click the buttons will open external browser for the article, the hackernews comment page, and the user profile page.
ENTER key
There is also a special semantic for ENTER key. ENTER on the buttons will trigger push-button event. ENTER on other space will open comment viewer for current article.

The history files are saved to ~/.emacs.d/hn-history/xxx.el. You can keep a git repo to track your reading history.

Detailed Feature List (TODOs)

Subscribe for update for easy tracking

When I read a topic on HN, I will only read the threads at that time. I’ll probably not going to read any updates to the thread afterwards unless it is a reply to my comment (and I seldom post comments, thus very rarely to read the thread again). There needs a solution for that: I should be able to subscribe to the thread and receive the new contents and consume them easily.

  • Subscribe to a topic
  • list subscribed topics, and the meta data (score and comment count)
  • update (new comment) to subscribed topic should show up in a status control panel
  • each comment status (new or read) is shown explicitly in the comment tree-view
  • mark comment as read/unread

easy for scanning

  • selected keyword highlights
  • comments & points highlights
  • selected source highlights

Notes

We should be able to take variety of notes, including:

  • Star/Label a comment/topic. Can give different labels.
  • Write notes. Can be used to compose a reply. Probably not support login and post reply directly. Do it on web interface is easier and good enough.

Following users

Follow a user. You can set your user ID and the user IDs you care about, with different tags. Then, you can

  • browse all history thread they post, comment
  • receive (see) their recent post in a higher priority whenever they post a thread or comment
  • when reading the list or comments, have their ones highlighted

Reproducible

Finally, all these reading data are cleanly stored in lists and can be version controlled to reproduce the exact reading status at any of your machine, at any given time.

comment-stats of a thread

When showing a list of threads, be it new threads or starred threads, I would like to know current comment status of them. I would expect the frequency of comments fall in a Gaussian distribution, i.e. when it is fresh, a few people comments; as it gets popular, a lot of comments pop up; after a day or two, people forget about it. It is nice to show a visual representation of what period the thread is in.

Comment timestamp

When reading comments, it makes sense to note what are the new comments. It can be done in two ways:

  • record last reading time; give an ascent for any comments after that timestamp
  • Display the timestamp and give the timestamp an ascent indicating the creation time

comment buffer (hard) refresh