之前写了个函数用于在 elfeed 当中直接用 mpv 打开视频来看
(defun open-link-with-mpv ()
"Open the link at point with mpv if it is a video."
(interactive)
(let ((url (or (elfeed-get-link-at-point)
(elfeed-get-url-at-point))))
(if (and url (string-match "\\(?:\\.\\(mp4\\|webm\\|ogg\\|avi\\|mkv\\)\\)?" url))
(progn
(message "%s" (propertize "Starting mpv, please wait!" 'face 'elfeed-log-info-level-face))
(mpv-play-url url))
(message "%s" (propertize "Not a video link!" 'face 'elfeed-log-warn-level-face)))))
最近无法拉起 mpv 了,message 是正常输出的。试了下 M-x mpv-play-url
也不可以拉起。在终端中 mpv play url
是可以的。