The Lambda Lab
/
projects
/
emus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1db216
)
Track selection now moves point in brwoser buffer.
author
Tim Vaughan
<timv@ughan.xyz>
Thu, 12 Dec 2019 12:29:41 +0000
(13:29 +0100)
committer
Tim Vaughan
<timv@ughan.xyz>
Thu, 12 Dec 2019 12:29:41 +0000
(13:29 +0100)
emus.el
patch
|
blob
|
history
diff --git
a/emus.el
b/emus.el
index
e529697
..
2c879c4
100644
(file)
--- a/
emus.el
+++ b/
emus.el
@@
-269,7
+269,8
@@
by the filesystem."
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
(setq emus-current-track track)
(emus--update-track old-track)
(emus--update-track track)
- (emus--resume-cp))))
+ (emus--resume-cp)
+ (emus-goto-current))))
(defun emus-select-track (track)
"Set TRACK as current, but do not start playing."
(defun emus-select-track (track)
"Set TRACK as current, but do not start playing."
@@
-280,7
+281,8
@@
by the filesystem."
(emus--update-track old-track)
(emus--update-track track)
(emus-send-cmd "o")
(emus--update-track old-track)
(emus--update-track track)
(emus-send-cmd "o")
- (emus--resume-cp))))
+ (emus--resume-cp)
+ (emus-goto-current))))
(defun emus-stop ()
"Stop playback of the current track."
(defun emus-stop ()
"Stop playback of the current track."
@@
-508,13
+510,13
@@
Used to update browser display when `emus-current-track' and/or `emus-state' cha
(emus-play-track (button-get button 'emus-track))
(emus-display-status))
(emus-play-track (button-get button 'emus-track))
(emus-display-status))
-(defun emus-
centre
-current ()
- "
Centre
the current track in the browser buffer, if available."
+(defun emus-
goto
-current ()
+ "
Move point to
the current track in the browser buffer, if available."
(interactive)
(interactive)
- (when (and (
eq (current-buffer) (get-buffer "*emus*")
)
+ (when (and (
get-buffer "*emus*"
)
emus-current-track)
emus-current-track)
- (goto-char (emus-track-browser-pos emus-current-track))
- (
recenter
)))
+ (with-current-buffer "*emus*"
+ (
goto-char (emus-track-browser-pos emus-current-track))
)))
(defun emus-browse ()
"Switch to *emus* audio library browser."
(defun emus-browse ()
"Switch to *emus* audio library browser."
@@
-523,7
+525,7
@@
Used to update browser display when `emus-current-track' and/or `emus-state' cha
(pop-to-buffer "*emus*")
(emus-browser-mode)
(emus--render-tracks)
(pop-to-buffer "*emus*")
(emus-browser-mode)
(emus--render-tracks)
- (emus-
centre
-current)))
+ (emus-
goto
-current)))
(defun emus-refresh ()
"Refresh the emus library."
(defun emus-refresh ()
"Refresh the emus library."
@@
-596,10
+598,10
@@
Used to update browser display when `emus-current-track' and/or `emus-state' cha
(emus-jump-10s-backward)
(emus-display-status))
(emus-jump-10s-backward)
(emus-display-status))
-(defun emus-
centre
-current-status ()
- "
Jump 10s backward in
current track, then display the emus status in the minibuffer."
+(defun emus-
goto
-current-status ()
+ "
Move point to the
current track, then display the emus status in the minibuffer."
(interactive)
(interactive)
- (emus-
centre
-current)
+ (emus-
goto
-current)
(emus-display-status))
(defun emus-refresh-status ()
(emus-display-status))
(defun emus-refresh-status ()
@@
-625,7
+627,7
@@
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 "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 "c") 'emus-
centre
-current-status)
+ (define-key map (kbd "c") 'emus-
goto
-current-status)
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
(kbd "SPC") 'emus-playpause-status
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
(kbd "SPC") 'emus-playpause-status
@@
-640,7
+642,7
@@
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 "P") 'emus-play-prev-album-status
(kbd ",") 'emus-jump-10s-backward-status
(kbd ".") 'emus-jump-10s-forward-status
- (kbd "c") 'emus-
centre
-current-status))
+ (kbd "c") 'emus-
goto
-current-status))
map)
"Keymap for emus browser.")
map)
"Keymap for emus browser.")