From 77f0751d75ab2fc126e46439f72e9df1f094820c Mon Sep 17 00:00:00 2001
From: Raúl Benencia <id@rbenencia.name>
Date: Thu, 31 Oct 2024 07:57:55 -0700
Subject: emacs: centralize feeds and media in io package

---
 .emacs.d/rul-emacs.org                  | 46 ++++++++++++++++++++++++---------
 .emacs.d/rul-lisp/packages/rul-feeds.el |  4 ---
 .emacs.d/rul-lisp/packages/rul-io.el    | 19 ++++++++++++++
 .emacs.d/rul-lisp/packages/rul-media.el | 15 -----------
 4 files changed, 53 insertions(+), 31 deletions(-)
 delete mode 100644 .emacs.d/rul-lisp/packages/rul-feeds.el
 create mode 100644 .emacs.d/rul-lisp/packages/rul-io.el
 delete mode 100644 .emacs.d/rul-lisp/packages/rul-media.el

diff --git a/.emacs.d/rul-emacs.org b/.emacs.d/rul-emacs.org
index a0d0a14..42bdfd2 100644
--- a/.emacs.d/rul-emacs.org
+++ b/.emacs.d/rul-emacs.org
@@ -502,18 +502,6 @@ context-specific actions in the minibuffer, or common buffers.
 (provide 'rul-completion)
 #+end_src
 
-** The =feeds= module
-The =feeds= module contains code pertaining to information feeds. It's a
-small module for now, as it only installs =elfeed=. If it doesn't get
-bigger, I'll consider merging it with another module.
-
-#+begin_src emacs-lisp :tangle "rul-lisp/packages/rul-feeds.el"
-;;; rul-feeds.el --- Information feeds
-
-(use-package elfeed :ensure t)
-(provide 'rul-feeds)
-#+end_src
-
 ** The =fm= module
 The =fm= module contains code pertaining to file management. In
 particular, it's the module that configures =dired= and adds a few extra
@@ -597,6 +585,39 @@ installs =fontaine=, a software that allows defining font presets.
 (provide 'rul-fonts)
 #+end_src
 
+** The =io= module
+The =io= module contains configurations for packages related to Internet
+services and media. I don't have excessive costumizations in these
+packages, so they're somewhat unrelated fragments of code grouped in
+the same file.
+
+We install =elfeed= to browse RSS and Atom feeds.
+#+begin_src emacs-lisp :tangle "rul-lisp/packages/rul-io.el"
+;;; rul-io.el --- Configuration for Internet and media packages
+
+(use-package elfeed :ensure t)
+(provide 'rul-feeds)
+#+end_src
+
+The =empv= package allow us to use the =mpv= player from within
+Emacs. Here we're simply installing it and configuring it with some
+Internet radio channels. It requires =mpv= to be installed.
+#+begin_src emacs-lisp :tangle "rul-lisp/packages/rul-io.el"
+(use-package empv
+:ensure t
+:config
+  (bind-key "C-x m" empv-map)
+  (setq empv-radio-channels
+      '(
+       ("SomaFM - Groove Salad" . "http://www.somafm.com/groovesalad.pls")
+       ("SomaFM - DEFCON" . "https://somafm.com/defcon256.pls")
+       ("SomaFM - Metal" . "https://somafm.com/metal.pls")
+       ("SomaFM - Lush" . "https://somafm.com/lush130.pls")
+       ("KCSM Jazz 91" . "http://ice5.securenetsystems.net/KCSM")
+       )))
+
+(provide 'rul-io)
+#+end_src
 ** The =mail= module
 Emacs can act as Mail User Agent. My preferred package for this is
 =notmuch=.
@@ -743,3 +764,4 @@ pairs in `binds' of the form ( ... (argfunc arg) body)."
 
 (provide 'rul-mail)
 #+end_src
+
diff --git a/.emacs.d/rul-lisp/packages/rul-feeds.el b/.emacs.d/rul-lisp/packages/rul-feeds.el
deleted file mode 100644
index 6352882..0000000
--- a/.emacs.d/rul-lisp/packages/rul-feeds.el
+++ /dev/null
@@ -1,4 +0,0 @@
-;;; rul-feeds.el --- Information feeds
-
-(use-package elfeed :ensure t)
-(provide 'rul-feeds)
diff --git a/.emacs.d/rul-lisp/packages/rul-io.el b/.emacs.d/rul-lisp/packages/rul-io.el
new file mode 100644
index 0000000..eb2c1c7
--- /dev/null
+++ b/.emacs.d/rul-lisp/packages/rul-io.el
@@ -0,0 +1,19 @@
+;;; rul-io.el --- Configuration for Internet and media packages
+
+(use-package elfeed :ensure t)
+(provide 'rul-feeds)
+
+(use-package empv
+:ensure t
+:config
+  (bind-key "C-x m" empv-map)
+  (setq empv-radio-channels
+      '(
+       ("SomaFM - Groove Salad" . "http://www.somafm.com/groovesalad.pls")
+       ("SomaFM - DEFCON" . "https://somafm.com/defcon256.pls")
+       ("SomaFM - Metal" . "https://somafm.com/metal.pls")
+       ("SomaFM - Lush" . "https://somafm.com/lush130.pls")
+       ("KCSM Jazz 91" . "http://ice5.securenetsystems.net/KCSM")
+       )))
+
+(provide 'rul-io)
diff --git a/.emacs.d/rul-lisp/packages/rul-media.el b/.emacs.d/rul-lisp/packages/rul-media.el
deleted file mode 100644
index b2f8db1..0000000
--- a/.emacs.d/rul-lisp/packages/rul-media.el
+++ /dev/null
@@ -1,15 +0,0 @@
-(use-package empv
-:ensure t
-:config
-  (bind-key "C-x m" empv-map)
-  (setq empv-radio-channels
-      '(
-       ("SomaFM - Groove Salad" . "http://www.somafm.com/groovesalad.pls")
-       ("SomaFM - DEFCON" . "https://somafm.com/defcon256.pls")
-       ("SomaFM - Metal" . "https://somafm.com/metal.pls")
-       ("SomaFM - Lush" . "https://somafm.com/lush130.pls")
-       ("KCSM Jazz 91" . "http://ice5.securenetsystems.net/KCSM")
-       ))
-  )
-
-(provide 'rul-media)
-- 
cgit v1.2.3