Created
December 6, 2016 02:31
-
-
Save qharlie/a38d175183b50324c86644c2aae4be95 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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