From 3726c4f1fec667e364ba18b8e26651f266312c6f Mon Sep 17 00:00:00 2001 From: plugd Date: Wed, 10 Aug 2022 10:53:01 +1000 Subject: [PATCH] Added commands to skip +/- 1 minute. --- emus.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/emus.el b/emus.el index bd50a44..e8b960d 100644 --- a/emus.el +++ b/emus.el @@ -481,6 +481,16 @@ If PREV is non-nil, plays the last track of the previous album." (interactive) (emus-jump -10)) +(defun emus-jump-1m-forward () + "Jump 1 minute forward in current track." + (interactive) + (emus-jump 60)) + +(defun emus-jump-1m-backward () + "Jump 1 minute backward in current track." + (interactive) + (emus-jump -60)) + (defun emus-display-status () "Display the current playback status in the minibuffer." (interactive) @@ -693,6 +703,18 @@ Used to update browser display when `emus-current-track' and/or `emus-state' cha (emus-jump-10s-backward) (emus-display-status)) +(defun emus-jump-1m-forward-status () + "Jump 10s forward in current track, then display the emus status in the minibuffer." + (interactive) + (emus-jump-1m-forward) + (emus-display-status)) + +(defun emus-jump-1m-backward-status () + "Jump 10s backward in current track, then display the emus status in the minibuffer." + (interactive) + (emus-jump-1m-backward) + (emus-display-status)) + (defun emus-goto-current-status () "Move point to the current track, then display the emus status in the minibuffer." (interactive) @@ -722,6 +744,8 @@ Used to update browser display when `emus-current-track' and/or `emus-state' cha (define-key map (kbd "P") 'emus-play-prev-album-status) (define-key map (kbd ",") 'emus-jump-10s-backward-status) (define-key map (kbd ".") 'emus-jump-10s-forward-status) + (define-key map (kbd "<") 'emus-jump-1m-backward-status) + (define-key map (kbd ">") 'emus-jump-1m-forward-status) (define-key map (kbd "c") 'emus-goto-current-status) (when (fboundp 'evil-define-key*) (evil-define-key* 'motion map @@ -737,6 +761,8 @@ Used to update browser display when `emus-current-track' and/or `emus-state' cha (kbd "P") 'emus-play-prev-album-status (kbd ",") 'emus-jump-10s-backward-status (kbd ".") 'emus-jump-10s-forward-status + (kbd "<") 'emus-jump-1m-backward-status + (kbd ">") 'emus-jump-1m-forward-status (kbd "c") 'emus-goto-current-status)) map) "Keymap for emus browser.") -- 2.20.1