From ba9b17164cf1e796879563f47bfe3613a1775dd0 Mon Sep 17 00:00:00 2001 From: Sandeep Sadanandan Date: Mon, 3 Jan 2022 20:00:21 +0100 Subject: add new command/link to show/load the top/best items --- hnreader.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hnreader.el b/hnreader.el index b5cc194..a2b7fef 100644 --- a/hnreader.el +++ b/hnreader.el @@ -35,6 +35,7 @@ ;; hnreader-ask: Load ask page. ;; hnreader-show: Load show page. ;; hnreader-newest: Load new link page. +;; hnreader-best: Load page with best articles. ;; hnreader-more: Load more. ;; hnreader-back: Go back to previous page. ;; hnreader-comment: read an HN item url such as https://news.ycombinator.com/item?id=1 @@ -151,7 +152,8 @@ third one is 80.") (insert "[[elisp:(hnreader-past)][Past]] | ") (insert "[[elisp:(hnreader-ask)][Ask]] | ") (insert "[[elisp:(hnreader-show)][Show]] | ") - (insert "[[elisp:(hnreader-jobs)][Jobs]]")) + (insert "[[elisp:(hnreader-jobs)][Jobs]] | ") + (insert "[[elisp:(hnreader-best)][Best]]")) (defun hnreader--print-frontpage-item (thing subtext) "Print THING dom and SUBTEXT dom." @@ -393,6 +395,12 @@ Also upate `hnreader--history'." (interactive) (hnreader-read-page "https://news.ycombinator.com/jobs")) +;;;###autoload +(defun hnreader-best () + "Read page with best/top items." + (interactive) + (hnreader-read-page "https://news.ycombinator.com/best")) + ;;;###autoload (defun hnreader-more() "Load more." -- cgit v1.2.3