A HackerNews Client that Reads Comments, and More
A hacker-news Emacs client. Screenshot:
version control your reading history
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.
highlight keywords that matter to you
Works in titles and comments. A configuration example:
(setq hn-hl-keywords '("lisp" "linux" "Show HN" "\\bML\\b" "\\bAI\\b"))
export starred articles
Use the command
hn-generate-json-for-web. E.g. my favorite articles
Add tags to article
Lincoln de Sousa has clarete/hackernews.el. It supports list stories, open link in internal/external browser, mark as read.
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-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)))
hn-master to bring the buffer. Shortcuts:
- load more
- 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.
- toggle star of an article
- add tag to the article
- toggle mark as read/unread
- mark as read and continue to next article
- 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.
- 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.