A hacker-news Emacs client. Screenshot:
All 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.
Works in titles and comments. A configuration example:
(setq hn-hl-keywords '("lisp" "linux"
"Show HN"
"\\bML\\b" "\\bAI\\b"))
Use the command hn-generate-json-for-web
. E.g. my favorite articles
Lincoln de Sousa has clarete/hackernews.el. It supports list stories, open link in internal/external browser, mark as read.
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-tags '("pl" "os" "hw" "ai" "space"))
(setq hn-hl-users '("okanesen" "wilsonfiifi"))
(setq hn-hl-keywords '("lisp" "linux"
"Show HN"
"\\bML\\b" "\\bAI\\b"))
(setq hn-top-dir "/home/xxx/github/hn-top/")
(setq hn-fields '(star time score comment tag 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
t
- add tag to the article
u
- toggle mark as read/unread
d
- mark as read and continue to next article
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.