bongo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bongo-devel] Re: Bongo marking and selecting random tracks


From: Daniel Jensen
Subject: [bongo-devel] Re: Bongo marking and selecting random tracks
Date: Sat, 24 Mar 2007 12:38:54 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

Anthony Chaumas-Pellet <address@hidden> writes:

> I've been looking for a way to exclude specific tracks when playing
> tracks randomly. It seems marks are the intended way of doing that,
> but I don't see how to use marks in random-playback-mode.

Marks are not considered by the random playback mode, but it's sounds
like a good idea.

I don't use random playback myself, so I can't say for sure how it's
supposed to work. I'll try to help anyway.

> So, is there a command along the lines of 'play-random-marked-tracks'?
> I've written such a function but it is very crude at present, but it
> shouldn't be too hard to make it more resilient and in-line with other
> Bongo functions.

I have one idea, but it's not a separate function. The attached patch
changes `bongo-randomly-playable-track-line-p' to accept marked tracks
only, when there are marked tracks around. How do you like that
suggestion? Is it similar to your idea? Please go ahead and post your
function, if you like.

diff -Naur bongo-old/bongo.el bongo-new/bongo.el
--- bongo-old/bongo.el  2007-03-19 08:57:32.000000000 +0100
+++ bongo-new/bongo.el  2007-03-24 12:34:52.000000000 +0100
@@ -6003,7 +6003,9 @@
 Inspect the line at POINT; or the one at point, if POINT is nil.
 Currently, the only non-randomly-playable tracks are action tracks."
   (and (bongo-track-line-p point)
-       (not (bongo-action-track-line-p point))))
+       (not (bongo-action-track-line-p point))
+       (or (null bongo-marked-track-line-markers)
+           (bongo-marked-track-line-p point))))
 
 (defun bongo-unplayed-randomly-playable-track-line-p (&optional point)
   "Return non-nil for unplayed and randomly playable track lines.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]