[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bongo-patches] Make `bongo-play-line' work like `bongo-play-lines' in l
From: |
Daniel Brockman |
Subject: |
[bongo-patches] Make `bongo-play-line' work like `bongo-play-lines' in library buffers |
Date: |
Tue, 10 Apr 2007 16:08:46 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) |
2007-04-10 Daniel Brockman <address@hidden>
Make `bongo-play-line' work like `bongo-play-lines' in
library buffers.
diff -rN -u old-bongo/bongo.el new-bongo/bongo.el
--- old-bongo/bongo.el 2007-04-10 16:08:44.000000000 +0200
+++ new-bongo/bongo.el 2007-04-10 16:08:44.000000000 +0200
@@ -6217,28 +6217,32 @@
If there is no track at POINT, play the first track after POINT or
signal an error if there is no track after POINT."
(interactive "d")
- (unless (bongo-playlist-buffer-p)
- (error "Not a Bongo playlist buffer"))
- (with-imminent-bongo-player-start
- (with-point-at-bongo-track point
- (when bongo-player
- (bongo-player-stop bongo-player))
- (bongo-set-current-track-position)
- (let ((player (if (bongo-action-track-line-p)
- (bongo-start-action-player (bongo-line-action))
- (bongo-play-file
- (bongo-line-file-name)
- (bongo-line-get-property 'bongo-backend)))))
- (bongo-player-put player 'infoset (bongo-line-infoset))
- (setq bongo-player player)
- (bongo-line-set-property 'bongo-player player)
- (bongo-set-current-track-marker bongo-playing-track-marker)
- (when bongo-header-line-mode
- (bongo-update-header-line-string))
- (when bongo-mode-line-indicator-mode
- (bongo-update-mode-line-indicator-string))
- (run-hooks 'bongo-player-started-hook)
- (bongo-redisplay-line)))))
+ (save-excursion
+ (bongo-goto-point point)
+ (cond ((bongo-playlist-buffer-p)
+ (with-imminent-bongo-player-start
+ (when bongo-player
+ (bongo-player-stop bongo-player))
+ (bongo-set-current-track-position)
+ (let ((player (if (bongo-action-track-line-p)
+ (bongo-start-action-player
+ (bongo-line-action))
+ (bongo-play-file
+ (bongo-line-file-name)
+ (bongo-line-get-property 'bongo-backend)))))
+ (bongo-player-put player 'infoset (bongo-line-infoset))
+ (setq bongo-player player)
+ (bongo-line-set-property 'bongo-player player)
+ (bongo-set-current-track-marker bongo-playing-track-marker)
+ (when bongo-header-line-mode
+ (bongo-update-header-line-string))
+ (when bongo-mode-line-indicator-mode
+ (bongo-update-mode-line-indicator-string))
+ (run-hooks 'bongo-player-started-hook)
+ (bongo-redisplay-line))))
+ ((bongo-library-buffer-p)
+ (bongo-play-lines))
+ (t (error "Not a Bongo buffer")))))
(defun bongo-play-lines (&optional n)
"Start playing the next N tracks or sections.
@@ -6246,7 +6250,11 @@
Otherwise, start playing the track at point and stop after N tracks.
In Bongo Library mode, enqueue and play in the nearest playlist."
(interactive "P")
- (cond ((bongo-library-buffer-p)
+ (cond ((bongo-playlist-buffer-p)
+ (when (not (null n))
+ (bongo-stop (prefix-numeric-value n)))
+ (bongo-play-line))
+ ((bongo-library-buffer-p)
(let ((position (if (bongo-playing-p)
(bongo-insert-enqueue-line
(prefix-numeric-value n))
@@ -6254,10 +6262,6 @@
(prefix-numeric-value n)))))
(with-bongo-playlist-buffer
(bongo-play-line position))))
- ((bongo-playlist-buffer-p)
- (when (not (null n))
- (bongo-stop (prefix-numeric-value n)))
- (bongo-play-line))
(t (error "Not a Bongo buffer"))))
(defun bongo-play-region (beg end)
--
Daniel Brockman <address@hidden>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bongo-patches] Make `bongo-play-line' work like `bongo-play-lines' in library buffers,
Daniel Brockman <=
- Prev by Date:
[bongo-patches] Rename `bongo-enqueue-line', `bongo-insert-enqueue-line' and `bongo-append-enqueue-line' to `bongo-enqueue-lines', `bongo-insert-enqueue-lines' and `bongo-append-enqueue-lines', respectively; add new definitions of `bongo-enqueue-line', et al., taking a character position
- Next by Date:
[bongo-patches] Fix bug in `bongo-track-infoset' pertaining to action tracks
- Previous by thread:
[bongo-patches] Rename `bongo-enqueue-line', `bongo-insert-enqueue-line' and `bongo-append-enqueue-line' to `bongo-enqueue-lines', `bongo-insert-enqueue-lines' and `bongo-append-enqueue-lines', respectively; add new definitions of `bongo-enqueue-line', et al., taking a character position
- Next by thread:
[bongo-patches] Fix bug in `bongo-track-infoset' pertaining to action tracks
- Index(es):