aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlucas <lucas>2006-06-25 11:24:00 +0000
committerlucas <mwolson@gnu.org>2006-06-25 11:24:00 +0000
commit3672c9ee39f0d15815a79e69dc1a52a9cfbb8b44 (patch)
tree8145ce2172689df7de6550dddf5b85d6fe7bfd59
parent6dc53f98e6c2acce8852ce71f58164bb0603733e (diff)
emms-browser.el: emms-browser-goto-random moves the point to a random line in the browser.
darcs-hash:20060625112441-4f952-c9517489eb33dd2865a3d8f6fbdf922b3a989acb.gz
-rw-r--r--emms-browser.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emms-browser.el b/emms-browser.el
index f4c5d5a..9cc2a3d 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -163,6 +163,7 @@ Use nil for no sorting."
(set-keymap-parent map text-mode-map)
(define-key map (kbd "q") 'emms-browser-bury-buffer)
(define-key map (kbd "/") 'emms-isearch-buffer)
+ (define-key map (kbd "?") 'emms-browser-goto-random)
(define-key map (kbd "?") 'describe-mode)
(define-key map (kbd "C-/") 'emms-playlist-mode-undo)
(define-key map (kbd "SPC") 'emms-browser-toggle-subitems)
@@ -1122,5 +1123,9 @@ included."
(interactive)
(emms-browser-search '(info-artist info-title info-album)))
+(defun emms-browser-goto-random ()
+ (interactive)
+ (goto-line (random (count-lines (point-min) (point-max)))))
+
(provide 'emms-browser)
;;; emms-browser.el ends here