{"id":13794494,"url":"https://github.com/thanhvg/emacs-hnreader","last_synced_at":"2025-08-12T15:10:47.030Z","repository":{"id":45175006,"uuid":"203098581","full_name":"thanhvg/emacs-hnreader","owner":"thanhvg","description":"Read Hacker News inside Emacs","archived":false,"fork":false,"pushed_at":"2024-11-09T19:31:58.000Z","size":28159,"stargazers_count":45,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T19:54:54.714Z","etag":null,"topics":["elisp","emacs","hacker-news","hacker-news-reader"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thanhvg.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-19T04:32:32.000Z","updated_at":"2025-05-01T02:09:41.000Z","dependencies_parsed_at":"2024-11-18T09:46:47.393Z","dependency_job_id":null,"html_url":"https://github.com/thanhvg/emacs-hnreader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhvg%2Femacs-hnreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhvg%2Femacs-hnreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhvg%2Femacs-hnreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhvg%2Femacs-hnreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanhvg","download_url":"https://codeload.github.com/thanhvg/emacs-hnreader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252791237,"owners_count":21804734,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elisp","emacs","hacker-news","hacker-news-reader"],"created_at":"2024-08-03T23:00:41.970Z","updated_at":"2025-05-07T00:31:16.851Z","avatar_url":"https://github.com/thanhvg.png","language":"Emacs Lisp","funding_links":[],"categories":["Clients","Emacs Lisp"],"sub_categories":["Emacs"],"readme":"#+STARTUP:    align fold hidestars oddeven indent \n#+TITLE: Emacs hnreader - Read Hacker News in Emacs\n[[http://spacemacs.org][file:https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg]]\n\nFront page:\n\n[[file:docs/screenshot.png]]\n\nComments:\n\n[[file:docs/screenshot2.png]]\n\n[[file:docs/screencast.gif]]\n\n* Intro\nThis package renders hackernews website at https://news.ycombinator.com/ in an\norg buffer. Almost everything works. \n\nThe org-mode buffer feature interactive links similar to html.\n\nFeatures that are not supported are account related features. You cannot add\ncomment, downvote or upvote.\n\n* Install\nManual: TBD\n\nMelpa\n\n[[https://melpa.org/#/hnreader][file:https://melpa.org/packages/hnreader-badge.svg]]\n\nSpacemacs layer:\n\nhttps://github.com/thanhvg/spacemacs-eos\n\n* Dependencies\n~promise~ and ~request~ are required.\nUser must have ~org-mode~ 9.2 or later installed also.\n\n* Commands\n- ~hnreader-news~: Load news page.\n- ~hnreader-past~: Load past page.\n- ~hnreader-ask~: Load ask page.\n- ~hnreader-show~: Load show page.\n- ~hnreader-newest~: Load new link page.\n- ~hnreader-more~: Load more.\n- ~hnreader-back~: Go back to previous page.\n- ~hnreader-comment~: read an HN item url such as\n  https://news.ycombinator.com/item?id=1 this is handy when you have the link\n  and want to read it in emacs, takes url as param\n- ~hnreader-org-insert-hn-link~: insert hn link to org buffer, take url as param\n* Remarks\nListing buffer is called ~*HN*~\nCommand buffer is called ~*HNComments*~\n\nMost of links in Hacker News buffer will run elsip commands on clicking, by default\norg-mode will ask you for confirmation. You can disable org confirm message on\nclicking\n#+begin_example elsip\n(setq org-confirm-elisp-link-function nil)\n#+end_example\n\nBut it is not recommended by the org-mode guide: just change it to ‘y-or-n-p’ if\nyou want to confirm with a single keystroke rather than having to type \"yes\".\n* Recommended settings for eww\neww can be used to view story. You may want to set these settings for web page\ndisplay inside Emacs:\n\n#+begin_example elsip\n(setq shr-width 75)\n(setq shr-use-fonts nil)\n#+end_example\n\nWhen displaying pictures srolling over them is jumpy. You can try this hack in\nyour config:\n#+begin_src elisp\n(with-eval-after-load \"shr\"\n    (defun shr-put-image (spec alt \u0026optional flags)\n      \"Insert image SPEC with a string ALT.  Return image.\nSPEC is either an image data blob, or a list where the first\nelement is the data blob and the second element is the content-type.\nHack to use `insert-sliced-image' to avoid jerky image scrolling.\"\n      (if (display-graphic-p)\n          (let* ((size (cdr (assq 'size flags)))\n                 (data (if (consp spec)\n                           (car spec)\n                         spec))\n                 (content-type (and (consp spec)\n                                    (cadr spec)))\n                 (start (point))\n                 (image (cond\n                         ((eq size 'original)\n                          (create-image data nil t :ascent 100\n                                        :format content-type))\n                         ((eq content-type 'image/svg+xml)\n                          (create-image data 'svg t :ascent 100))\n                         ((eq size 'full)\n                          (ignore-errors\n                            (shr-rescale-image data content-type\n                                               (plist-get flags :width)\n                                               (plist-get flags :height))))\n                         (t\n                          (ignore-errors\n                            (shr-rescale-image data content-type\n                                               (plist-get flags :width)\n                                               (plist-get flags :height)))))))\n            (when image\n              (let* ((image-pixel-cons (image-size image t))\n                     (image-pixel-width (car image-pixel-cons))\n                     (image-pixel-height (cdr image-pixel-cons))\n                     (image-scroll-rows (round (/ image-pixel-height (default-font-height)))))\n                ;; When inserting big-ish pictures, put them at the\n                ;; beginning of the line.\n                (when (and (\u003e (current-column) 0)\n                           (\u003e (car (image-size image t)) 400))\n                  (insert \"\\n\"))\n\n                (insert-sliced-image image (or alt \"*\") nil image-scroll-rows 1)\n                ;; (if (eq size 'original)\n                ;;     (insert-sliced-image image (or alt \"*\") nil image-scroll-rows 1)\n                ;;   (insert-image image (or alt \"*\")))\n\n                (put-text-property start (point) 'image-size size)\n                (when (and shr-image-animate\n                           (cond ((fboundp 'image-multi-frame-p)\n                                  ;; Only animate multi-frame things that specify a\n                                  ;; delay; eg animated gifs as opposed to\n                                  ;; multi-page tiffs.  FIXME?\n                                  (cdr (image-multi-frame-p image)))\n                                 ((fboundp 'image-animated-p)\n                                  (image-animated-p image))))\n                  (image-animate image nil 60))))\n            image)\n        (insert (or alt \"\")))))\n#+end_src\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhvg%2Femacs-hnreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanhvg%2Femacs-hnreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhvg%2Femacs-hnreader/lists"}