"Stephen J. Turnbull" wrote: > Ivan Kanis writes: > > "Stephen J. Turnbull" wrote: > > > > To avoid this behavior, use `(random t)' > > > > I do. > > Where? I don't see it in your `ivan-emms-pick-album' function I call it once in the callee function ivan-emms-random-album. I attached the source again. > this will only help across Emacs sessions; within one session the > random function should maintain state across calls to your function, > so it should give different sequences every time as long as you never > exist Emacs. I exit emacs everyday, would that have an effect on the randomness? Should I save the seed somewhere to have better result? > Unfortunately the attachment seems to have been stripped so I don't > know what might be going wrong in `ivan-emms-list-subdir' or the code > that calls `ivan-emms-pick-album'. (Probably nothing, but I can't > review it.) I have put the code source on my web site in case the attachment gets stripped again: http://ivan.kanis.fr/ivan-emms.el > If you do `M-x (ivan-emms-list-subdir (concat ivan-emms-dir "FOO")) RET' > (with some value for FOO that actually exists and contains albums), > does the answer look right? It looks good: (length (ivan-emms-list-subdir (concat ivan-emms-dir "music"))) => 769 -- Ivan Kanis http://ivan.kanis.fr An open foe may prove a curse, But a pretended friend is worse. -- John Gay