     "Filter the elfeed-search buffer to show news-tagged feeds."
     (interactive)
     (ar/elfeed-view-filtered "@6-months-ago +unread +news")))
+
+(require 'cl-macs)
+
+(use-package org-web-tools
+  :ensure t)
+
+(use-package esxml
+  :ensure t
+  :config)
+
+(require 'cl-macs)
+
+;; From https://github.com/alphapapa/unpackaged.el#feed-for-url
+(cl-defun ar/feed-for-url-in-clipboard (url &key (prefer 'atom) (all nil))
+  "Return feed URL for web page at URL.
+Interactively, insert the URL at point.  PREFER may be
+`atom' (the default) or `rss'.  When ALL is non-nil, return all
+feed URLs of all types; otherwise, return only one feed URL,
+preferring the preferred type."
+  (interactive (list (org-web-tools--get-first-url)))
+  (require 'esxml-query)
+  (require 'org-web-tools)
+  (cl-flet ((feed-p (type)
+                    ;; Return t if TYPE appears to be an RSS/ATOM feed
+                    (string-match-p (rx "application/" (or "rss" "atom") "+xml")
+                                    type)))
+    (let* ((preferred-type (format "application/%s+xml" (symbol-name prefer)))
+           (html (org-web-tools--get-url url))
+           (dom (with-temp-buffer
+                  (insert html)
+                  (libxml-parse-html-region (point-min) (point-max))))
+           (potential-feeds (esxml-query-all "link[rel=alternate]" dom))
+           (return (if all
+                       ;; Return all URLs
+                       (cl-loop for (tag attrs) in potential-feeds
+                                when (feed-p (alist-get 'type attrs))
+                                collect (url-expand-file-name (alist-get 'href attrs) url))
+                     (or
+                      ;; Return the first URL of preferred type
+                      (cl-loop for (tag attrs) in potential-feeds
+                               when (equal preferred-type (alist-get 'type attrs))
+                               return (url-expand-file-name (alist-get 'href attrs) url))
+                      ;; Return the first URL of non-preferred type
+                      (cl-loop for (tag attrs) in potential-feeds
+                               when (feed-p (alist-get 'type attrs))
+                               return (url-expand-file-name (alist-get 'href attrs) url))))))
+      (if (called-interactively-p)
+          (insert (if (listp return)
+                      (s-join " " return)
+                    return))
+        return))))


  (ar/vsetq elfeed-feeds
            '(
              ("https://ryanholiday.net/feed/" blog meditation RyanHoliday)
              ("https://ryanholiday.net/comments/feed/" blog meditation RyanHolidayComments)
              ("https://www.madfientist.com/feed/" blog money MadFientist)
              ("https://www.madfientist.com/comments/feed/" blog money MadFientistComments)
              ("https://www.getrichslowly.org/feed" blog money GetRichSlowly)
              ("https://www.choosefi.com/feed/" blog money Choosefi)
              ("https://www.choosefi.com/category/podcast-episodes/feed" blog money ChoosefiPodcasts)
              ("https://affordanything.com/blog/feed" blog money AffordAnything)
              ("https://affordanything.com/comments/feed/" blog money AffordAnything)
              ("http://feeds.feedburner.com/AffordAnythingFeed" blog money AffordAnything)
              ("http://200ok.ch/atom.xml" blog emacs tech 200ok)
              ("https://changelog.com/feed" blog tech news)
              ("http://tangent.libsyn.com" blog money  ChristopherRyan)
              ("http://akkartik.name/feeds.xml" blog tech KartikAgaram)
              ("http://ben-evans.com/benedictevans?format=RSS" blog tech Ben-Evans)
              ("http://blog.abhixec.com/index.xml" blog emacs RandomMusings)

              ("http://www.sastibe.de/index.xml" blog emacs SebastianSchweer)
              ("http://www.thisiscolossal.com/feed" blog tech Colossal)
              ("http://zzamboni.org/index.xml" blog hammerspoon tech Diego-Martín-Zamboni)
              ("https://affordanything.com/blog/feed" blog money AffordAnything)
              ("https://affordanything.com/comments/feed/" blog money AffordAnything)
              ("https://ambrevar.xyz/rss.xml" blog ambrevar)
              ("https://ambrevar.xyz/rss.xml" blog emacs PierreNeidhardt)
              ("https://babbagefiles.blogspot.com/feeds/posts/default" blog emacs tech)
              ("https://blog.burntsushi.net/index.xml" blog dev BurnedSushi)
              ("https://blog.danielgempesaw.com/rss" blog emacs tech DanielGempesaw)
              ("https://blog.moneysavingexpert.com/blog.rss" blog money MoneySavingExpert MartinLewis)
              ("https://changelog.com/feed" blog tech news)
              ("https://changelog.complete.org/feed" blog emacs tech JohnGoerzen)
              ("https://colelyman.com/index.xml" blog emacs ColeLyman)
              ("https://copyninja.info/feeds/all.atom.xml" blog tech dev copyninja)
