(set-process-query-on-exit-flag proc nil)
(process-send-string proc "silence\n")
proc))))
-
+
(defun emus-send-cmd (cmd &rest args)
(process-send-string (emus-get-process)
(seq-subseq emus-tracks (+ idx 1))))
(current-album (emus-track-album emus-current-track))
(next-track (seq-some (lambda (r)
- (if (string= (emus-track-album r)
- current-album)
- nil
- r)
- search-list))))
+ (if (string= (emus-track-album r)
+ current-album)
+ nil
+ r))
+ search-list)))
(if next-track
(if (eq emus-state 'playing)
(emus-play-track next-track)
(with-current-buffer "*emus*"
(let ((inhibit-read-only t)
(old-point (point)))
- (goto-char track-pos)
- (search-forward "\n")
- (delete-region track-pos (point))
- (goto-char track-pos)
- (emus--insert-track track)
- (goto-char old-point))))))
+ (goto-char track-pos)
+ (search-forward "\n")
+ (delete-region track-pos (point))
+ (goto-char track-pos)
+ (emus--insert-track track)
+ (goto-char old-point))))))
(defun emus--render-tracks ()
(with-current-buffer "*emus*"
(define-key map (kbd "c") 'emus-centre-current-status)
(when (fboundp 'evil-define-key*)
(evil-define-key* 'motion map
- (kbd "SPC") 'emus-playpause-status
- (kbd "o") 'emus-stop-status
- (kbd "+") 'emus-volume-up-status
- (kbd "=") 'emus-volume-up-status
- (kbd "-") 'emus-volume-down-status
- (kbd "R") 'emus-refresh-status
- (kbd "n") 'emus-play-next-status
- (kbd "p") 'emus-play-prev-status
- (kbd "N") 'emus-play-next-album-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 "SPC") 'emus-playpause-status
+ (kbd "o") 'emus-stop-status
+ (kbd "+") 'emus-volume-up-status
+ (kbd "=") 'emus-volume-up-status
+ (kbd "-") 'emus-volume-down-status
+ (kbd "R") 'emus-refresh-status
+ (kbd "n") 'emus-play-next-status
+ (kbd "p") 'emus-play-prev-status
+ (kbd "N") 'emus-play-next-album-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))
map)
"Keymap for emus.")