Skip to content

Instantly share code, notes, and snippets.

@kubajecminek
Last active September 3, 2024 18:05
Show Gist options
  • Select an option

  • Save kubajecminek/83cb82969acd9ec3e0a773a54cad2d13 to your computer and use it in GitHub Desktop.

Select an option

Save kubajecminek/83cb82969acd9ec3e0a773a54cad2d13 to your computer and use it in GitHub Desktop.
Gnus RSS config
(setq my-feeds '(("Richard Stallman" "https://stallman.org/rss/rss.xml" "Chief GNUisance of the GNU Project")
;; Define other feeds right here (title url description)
))
;; This function mimics `gnus-group-make-rss-group' behaviour
(defun my-subscribe-rss-feeds (feeds)
(require 'nnrss)
(dolist (feed feeds)
(let* ((title (nth 0 feed))
(href (nth 1 feed))
(desc (nth 2 feed))
(coding (gnus-group-name-charset '(nnrss "") title)))
(when coding
;; Unify non-ASCII text.
(setq title (decode-coding-string
(encode-coding-string title coding)
coding)))
(unless (gnus-group-entry (gnus-group-prefixed-name title "nnrss"))
(gnus-group-make-group title '(nnrss ""))
(push (list title href desc) nnrss-group-alist)
(message "Group %s added" title)
(nnrss-save-server-data nil)))))
(add-hook 'gnus-setup-news-hook (lambda () (my-subscribe-rss-feeds my-feeds)))
@kubajecminek

kubajecminek commented Sep 3, 2024 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment