emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mpv 604b32d7e6 11/50: add play command


From: ELPA Syncer
Subject: [nongnu] elpa/mpv 604b32d7e6 11/50: add play command
Date: Tue, 28 Dec 2021 00:58:35 -0500 (EST)

branch: elpa/mpv
commit 604b32d7e652070206d00d7569f4da302c110bfa
Author: Johann Klähn <kljohann@gmail.com>
Commit: Johann Klähn <kljohann@gmail.com>

    add play command
---
 mpv-mode.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/mpv-mode.el b/mpv-mode.el
index 898ab6cca7..437094876e 100644
--- a/mpv-mode.el
+++ b/mpv-mode.el
@@ -83,6 +83,10 @@
   (setq -process nil)
   (setq -queue nil))
 
+(defun play (path)
+  (interactive "fFile: ")
+  (-start path))
+
 (defun -enqueue (command fn &optional delay-command)
   "Add COMMAND to the transaction queue.
 
@@ -98,7 +102,8 @@ below."
     (tq-enqueue
      -queue
      (concat (json-encode `((command . ,command))) "\n")
-     "" nil fn delay-command)))
+     "" nil fn delay-command)
+    t))
 
 (defun -tq-filter (tq string)
   (let ((buffer (tq-buffer tq)))
@@ -178,7 +183,9 @@ See `org-timer-item' which this is based on."
       (insert  (concat "- " time-string " :: "))))))
 
 (defun seek-to-position-at-point ()
-  "Jump to playback position as inserted by 
`mpv-mode-insert-playback-position'."
+  "Jump to playback position as inserted by `mpv-insert-playback-position'.
+
+This can be used with the `org-open-at-point-functions' hook."
   (interactive)
   (save-excursion
     (skip-chars-backward -position-skipchars (point-at-bol))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]