[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] feature/aptel/dynamic-modules-rc5 970c64a 14/20: Add inter
From: |
Teodor Zlatanov |
Subject: |
[Emacs-diffs] feature/aptel/dynamic-modules-rc5 970c64a 14/20: Add interactive seek command. |
Date: |
Wed, 18 Nov 2015 19:17:05 +0000 |
branch: feature/aptel/dynamic-modules-rc5
commit 970c64a935eff005337b73559fb985db35d4d186
Author: Mark Oteiza <address@hidden>
Commit: Ted Zlatanov <address@hidden>
Add interactive seek command.
* lisp/mpc.el (mpc-cmd-seekcur): New function.
(mpc-seek-current): New command.
(mpc-mode-menu): Add entry for mpc-seek-current
(mpc-mode-map): Bind mpc-seek-current to "g"
---
lisp/mpc.el | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/lisp/mpc.el b/lisp/mpc.el
index c40c09c..3ddcf13 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -826,6 +826,9 @@ The songs are returned as alists."
(mpc-proc-cmd "play")
(mpc-status-refresh))
+(defun mpc-cmd-seekcur (time)
+ (mpc-proc-cmd (list "seekcur" time) #'mpc-status-refresh))
+
(defun mpc-cmd-add (files &optional playlist)
"Add the songs FILES to PLAYLIST.
If PLAYLIST is t or nil or missing, use the main playlist."
@@ -1127,7 +1130,7 @@ If PLAYLIST is t or nil or missing, use the main
playlist."
(define-key map "s" 'mpc-toggle-play)
(define-key map ">" 'mpc-next)
(define-key map "<" 'mpc-prev)
- (define-key map "g" nil)
+ (define-key map "g" 'mpc-seek-current)
map))
(easy-menu-define mpc-mode-menu mpc-mode-map
@@ -1136,6 +1139,7 @@ If PLAYLIST is t or nil or missing, use the main
playlist."
["Play/Pause" mpc-toggle-play] ;FIXME: Add one of ⏯/▶/⏸ in there?
["Next Track" mpc-next] ;FIXME: Add ⇥ there?
["Previous Track" mpc-prev] ;FIXME: Add ⇤ there?
+ ["Seek Within Track" mpc-seek-current]
"--"
["Repeat Playlist" mpc-toggle-repeat :style toggle
:selected (member '(repeat . "1") mpc-status)]
@@ -2402,6 +2406,12 @@ This is used so that they can be compared with `eq',
which is needed for
(interactive)
(mpc-cmd-pause "0"))
+(defun mpc-seek-current (pos)
+ "Seek within current track."
+ (interactive
+ (list (read-string "Position to go ([+-]seconds): ")))
+ (mpc-cmd-seekcur pos))
+
(defun mpc-toggle-play ()
"Toggle between play and pause.
If stopped, start playback."
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 1f2b30d 04/20: gitmerge: Fix git log command, (continued)
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 1f2b30d 04/20: gitmerge: Fix git log command, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 f9b3ca4 01/20: Update verilog-mode.el to 2015-11-09-b121d60-vpo., Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 274f590 06/20: * lisp/progmodes/verilog-mode.el: Use with-silent-modifications, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 c41bf13 08/20: * lisp/progmodes/verilog-mode.el (verilog-save-buffer-state): Add backquote, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 d45222a 09/20: linum-mode plays more nicely with other margin-setting extensions, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 35c5205 10/20: Minor fix to comment indentation and typo in last commit, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 7076009 12/20: * lisp/progmodes/cc-defs.el: Use with-silent-modifications, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 7e70b27 13/20: Fix issue where a new tempfile was created every refresh, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 543b928 07/20: ; ChangeLog.2 fixes, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 e8a941e 11/20: * lisp/loadup.el: Set max-lisp-eval-depth here, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 970c64a 14/20: Add interactive seek command.,
Teodor Zlatanov <=
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 d3203d0 05/20: ; Auto-commit of ChangeLog files., Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 10b9929 15/20: Add catch-all & no-signal version of PUSH_HANDLER, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 1bbd450 16/20: Add portable layer for dynamic loading, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 449d1b2 17/20: Add new User Pointer (User_Ptr) type, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 39863f3 19/20: Make 'Fload' look for modules, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 6cc9efa 20/20: Add dynamic module test and helper script, Teodor Zlatanov, 2015/11/18
- [Emacs-diffs] feature/aptel/dynamic-modules-rc5 93235eb 18/20: Add dynamic module module support, Teodor Zlatanov, 2015/11/18