[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mpv 2d40c45505 38/50: Add mpv-seek and mpv-revert-seek com
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mpv 2d40c45505 38/50: Add mpv-seek and mpv-revert-seek commands |
Date: |
Tue, 28 Dec 2021 00:58:43 -0500 (EST) |
branch: elpa/mpv
commit 2d40c4550558eb1bf35a69446777c4e9cae7a623
Author: Johann Klähn <johann@jklaehn.de>
Commit: Johann Klähn <johann@jklaehn.de>
Add mpv-seek and mpv-revert-seek commands
---
mpv.el | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/mpv.el b/mpv.el
index d72ed29ee4..a07887ef7f 100644
--- a/mpv.el
+++ b/mpv.el
@@ -292,7 +292,7 @@ This can be used with the `org-open-at-point-functions'
hook."
(when (looking-at "[0-9]+:[0-9]\\{2\\}:[0-9]\\{2\\}")
(let ((secs (org-timer-hms-to-secs (match-string 0))))
(when (> secs 0)
- (mpv--enqueue `("seek" ,secs "absolute") #'ignore))))))
+ (mpv-seek secs))))))
;;;###autoload
(defun mpv-speed-set (factor)
@@ -326,6 +326,13 @@ Numeric arguments will be treated as seconds, repeated use
(cl-signum (or (car arg) 1))
(log (abs (or (car arg) 4)) 4))))
+;;;###autoload
+(defun mpv-seek (seconds)
+ "Seek to the given (absolute) time in SECONDS.
+A negative value is interpreted relative to the end of the file."
+ (interactive "nPosition in seconds: ")
+ (mpv--enqueue `("seek" ,seconds "absolute") #'ignore))
+
;;;###autoload
(defun mpv-seek-forward (arg)
"Seek forward ARG seconds.
@@ -342,5 +349,11 @@ of \\[universal-argument] will add another `mpv-seek-step'
seconds."
(interactive "P")
(mpv-seek-forward (- (mpv--raw-prefix-to-seconds arg))))
+;;;###autoload
+(defun mpv-revert-seek ()
+ "Undo the previous seek command."
+ (interactive)
+ (mpv--enqueue '("revert-seek") #'ignore))
+
(provide 'mpv)
;;; mpv.el ends here
- [nongnu] elpa/mpv 3021c55fa5 32/50: Merge pull request #1 from magnusstahre/expand-tilde, (continued)
- [nongnu] elpa/mpv 3021c55fa5 32/50: Merge pull request #1 from magnusstahre/expand-tilde, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv f31cbdb94a 37/50: Add convenience functions to get and set properties, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv f0f61db3af 47/50: Add COPYING file following GPL, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 4774d52c8c 48/50: Merge pull request #21 from sachac/master, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 604b32d7e6 11/50: add play command, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 15c51ddc5e 10/50: remove dependency on dash library, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 059135de39 28/50: version 0.1.0, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9e1781249f 27/50: convert numbers to strings before encoding as JSON, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 79e01bf89b 35/50: Remove stale socket files when mpv process is gone, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 4dddd55c5e 41/50: Add mpv-version., ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 2d40c45505 38/50: Add mpv-seek and mpv-revert-seek commands,
ELPA Syncer <=
- [nongnu] elpa/mpv a5c6eed9ac 44/50: Add volume control commands, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 3a43c9e60a 14/50: reorder function definitions, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 338af25d20 23/50: add mpv-on-event-hook, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 937bdf522a 17/50: implement seeking and changing of playback speed, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0e4318b45f 13/50: improve docstrings, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 0579b5c707 09/50: support inserting org timer list items, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv ce3bbfac36 22/50: add mpv-default-options, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9ef359d712 20/50: fix generation of autoloads, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 9ff4d5d80b 25/50: fix mpv-insert-playback-position, ELPA Syncer, 2021/12/28
- [nongnu] elpa/mpv 705e81b8a6 42/50: Make mpv-version more verbose and update its docstring as suggested, ELPA Syncer, 2021/12/28