aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/app.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-04-27 15:43:31 +0530
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-04-27 15:43:31 +0530
commitc08bf7e1b835dab5273980ec89fec4c2a3441329 (patch)
tree2369462383db51eb3055fe635bcb1c084f512c34 /Emacs/.config/emacs/app.org
parentce066bd6b2a89d0b3d0e9f8677c5772cfbd3cd01 (diff)
downloaddotfiles-c08bf7e1b835dab5273980ec89fec4c2a3441329.tar.gz
dotfiles-c08bf7e1b835dab5273980ec89fec4c2a3441329.tar.bz2
dotfiles-c08bf7e1b835dab5273980ec89fec4c2a3441329.zip
(Emacs/app)+elfeed advice to open articles in different applications
Diffstat (limited to 'Emacs/.config/emacs/app.org')
-rw-r--r--Emacs/.config/emacs/app.org13
1 files changed, 12 insertions, 1 deletions
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