From 2d7eab9f8627e634808a3b75758879592db53b8d Mon Sep 17 00:00:00 2001
From: Aryadev Chavali <aryadev@aryadevchavali.com>
Date: Wed, 21 Aug 2024 16:30:26 +0100
Subject: (Emacs/elisp/mpv)~mpv-open-video now takes optional arguments

This optional argument should be a URL we can feed for the mpv
process.
---
 Emacs/.config/emacs/elisp/mpv.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Emacs/.config/emacs/elisp/mpv.el b/Emacs/.config/emacs/elisp/mpv.el
index 5560d39..4d0655e 100644
--- a/Emacs/.config/emacs/elisp/mpv.el
+++ b/Emacs/.config/emacs/elisp/mpv.el
@@ -48,8 +48,14 @@
 
 (defvar mpv--history nil)
 
-(defun mpv-open-video ()
+(defun mpv-open-video (&optional arg)
   (interactive)
+  (let ((url (if (stringp arg)
+                 arg
+               (completing-read "Enter URL: " nil nil t (ffap-guesser) mpv--history))))
+    (mpv-start-process url)
+    (switch-to-buffer "*mpv*")))
+
   (let ((url (completing-read "Enter URL: " nil nil t (ffap-guesser) mpv--history)))
     (mpv-start-process url)
     (switch-to-buffer "*mpv*")))
-- 
cgit v1.2.3-13-gbd6f