hyakt / emacs-dashboard-hackernews

Display a topstories of Hacker News on Dashboard.
18 stars 4 forks source link

Hackernews doesn't display #3

Open khinshankhan opened 5 years ago

khinshankhan commented 5 years ago

I seem to be able to install the package just fine, but it seems hackernews doesn't exist. Eg:

    (setq dashboard-items '((recents  . 5)
                            (hackernews . 7)
                            (agenda . 5)
                            ))

This results in recents and agenda appearing with a blank gap in between them, where hackernews should have been. I was also unable to find many other users using this package. Would it be safe to assume this package is currently broken? Or does this work for other anyone?

alecvn commented 5 years ago

Can confirm it doesn't work for me either, but I would love to have this feature. I will try to look into it if I get some time, but I'm not sure I'd be much help.

ki-chi commented 4 years ago

@kkhan01 @alecvn Did you try M-x dashboard-refresh-buffer on the dashboard?

Hackernews seems to be undisplayed on the dashboard when initially loading it by the function dashboard-setup-startup-hook. I don't recommend you use the function dashboard-setup-startup-hook in your .emacs.d, but you can use both dashboard-insert-startupify-lists and dashboard-refresh-buffer at the initial loading, and display Hackernews.

My settings with use-package below:

(use-package dashboard-hackernews
  :config
  (require 'json))
(use-package dashboard
  :after dashboard-hackernews
  :init (add-hook 'after-init-hook
                  #'(lambda () (progn (dashboard-insert-startupify-lists)
                                        (dashboard-refresh-buffer))))
  :config
  (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
  (setq dashboard-items '((recents  . 10)
                          (hackernews . 10)
                          (bookmarks . 5)
                          (projects . 5)))
  )
alecvn commented 4 years ago

Thanks @ki-chi, it's not that it simply doesn't display for me, it actually breaks my dashboard. I'll have to look into it again to give you more insight.

themkat commented 2 years ago

Know this issue is old now, but do anyone still experience these issues with newer versions of the package? I experienced the issue mentioned by @alecvn and fixed it in #4 , and it is working for me. Just asking in case we can close this issue 🙂