diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-08-21 16:30:26 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-08-21 16:42:14 +0100 |
commit | 2d7eab9f8627e634808a3b75758879592db53b8d (patch) | |
tree | 779b69b6a25cb8aea5e81387fa78cb3458d1c7d7 /Emacs/.config/emacs/elisp | |
parent | 05d1cfdc4bd81aeeeae81d9c5fe8942fe767cd8f (diff) | |
download | dotfiles-2d7eab9f8627e634808a3b75758879592db53b8d.tar.gz dotfiles-2d7eab9f8627e634808a3b75758879592db53b8d.tar.bz2 dotfiles-2d7eab9f8627e634808a3b75758879592db53b8d.zip |
(Emacs/elisp/mpv)~mpv-open-video now takes optional arguments
This optional argument should be a URL we can feed for the mpv
process.
Diffstat (limited to 'Emacs/.config/emacs/elisp')
-rw-r--r-- | Emacs/.config/emacs/elisp/mpv.el | 8 |
1 files changed, 7 insertions, 1 deletions
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*"))) |