aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Elmes <emms@repose.cx>2006-06-29 17:54:00 +0000
committerDamien Elmes <emms@repose.cx>2006-06-29 17:54:00 +0000
commitfe45a4a8a165cb7ce7e1604453408cce873c0e1b (patch)
tree2329611a8e6fabbc531473f84549d51390745a7e
parent372698a16cdd87f0f95cabde3e6c9f0e5f227432 (diff)
browser: add 'd' to open dired on the current directory
darcs-hash:20060629175424-4e3e3-1301f36cece1ae2f55616133c652baddf606c36c.gz
-rw-r--r--emms-browser.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/emms-browser.el b/emms-browser.el
index cf58ee6..9527246 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -1011,6 +1011,17 @@ After expanding, jump to the currently marked entry."
(interactive)
(goto-line (random (count-lines (point-min) (point-max)))))
+(defun emms-browser-view-in-dired (&optional bdata)
+ "View the current directory in dired."
+ ;; FIXME: currently just grabs the directory from the first track
+ (interactive)
+ (if bdata
+ (if (eq (emms-browser-bdata-type bdata) 'info-title)
+ (let* ((track (car (emms-browser-bdata-data bdata)))
+ (path (emms-track-get track 'name))))
+ (emms-browser-view-in-dired (emms-browser-bdata-data bdata)))
+ (emms-browser-view-in-dired (emms-browser-bdata-at-point))))
+
;; --------------------------------------------------
;; Linked browser and playlist windows
;; --------------------------------------------------