Skip to content

Instantly share code, notes, and snippets.

@qharlie
Created December 6, 2016 02:31
Show Gist options
  • Save qharlie/a38d175183b50324c86644c2aae4be95 to your computer and use it in GitHub Desktop.
Save qharlie/a38d175183b50324c86644c2aae4be95 to your computer and use it in GitHub Desktop.
(defun dashboard-insert-reddit-list (title list)
"Render REDDIT-LIST title and items of LIST."
(when (car list)
(insert title )
(mapc (lambda (el)
(setq url (nth 1 (split-string el "__")) )
(setq title (nth 0 (split-string el "__")) )
(insert "\n ")
(widget-create 'push-button
:action `(lambda (&rest ignore)
(browse-url url))
:mouse-face 'highlight
:follow-link "\C-m"
:button-prefix ""
:button-suffix ""
:format "%[%t%]"
title
))
list)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment