From c08bf7e1b835dab5273980ec89fec4c2a3441329 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 27 Apr 2024 15:43:31 +0530 Subject: (Emacs/app)+elfeed advice to open articles in different applications --- Emacs/.config/emacs/app.org | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Emacs/.config/emacs/app.org') diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 485c891..a173269 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -628,7 +628,18 @@ to elfeed for loading the system. (setq elfeed-feeds (cl-map 'list #'(lambda (item) (append (list (nth 1 item)) (cdr (cdr item)))) - +rss/feed-urls))) + +rss/feed-urls)) + + (advice-add 'elfeed-search-show-entry :after #'+elfeed/dispatch-entry) + + (defun +elfeed/dispatch-entry (entry) + "Process each type of entry differently. + e.g., you may want to open HN entries in eww." + (let ((url (elfeed-entry-link entry))) + (pcase url + ((pred (string-match-p "https\\:\\/\\/www.youtube.com\\/watch")) + (mpv-play-url url)) + (_ (eww url)))))) #+end_src * Magit Magit is *the* git porcelain for Emacs, which perfectly encapsulates -- cgit v1.2.3-13-gbd6f