Last active
August 29, 2015 14:07
-
-
Save rnkn/89e0072c93402c1c1406 to your computer and use it in GitHub Desktop.
Emacs function to run a dynamic asynchronous shell command to fetch RSS feeds
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 -nnrss-fetch-async () | |
"Run a dynamic asynchronous shell command to fetch RSS feeds. | |
Creates a dynamic shell command to fetch RSS feeds in | |
`nnrss-group-alist' and runs using `async-shell-command'." | |
(interactive) | |
(or nnrss-use-local | |
(setq nnrss-use-local t)) | |
(let* ((rssdir (expand-file-name nnrss-directory)) | |
list | |
(fetch-str | |
(dolist (var nnrss-server-data list) | |
(let* ((url (or (nth 2 var) | |
(second (assoc (car var) | |
nnrss-group-alist))))) | |
(setq list | |
(concat list " -o '" rssdir | |
(nnrss-translate-file-chars (concat (car var) ".xml")) | |
"' '" url "'"))))) | |
(command (concat "curl" fetch-str))) | |
(async-shell-command command "*nnRSS Fetch RSS Process*"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment