aboutsummaryrefslogtreecommitdiff
path: root/emms-browser.el
diff options
context:
space:
mode:
authorDamien Elmes <emms@repose.cx>2007-03-05 13:14:00 +0000
committerDamien Elmes <emms@repose.cx>2007-03-05 13:14:00 +0000
commitfa5fb58e464fc2e75a57bd1c298b4441a9e3ccdc (patch)
tree46ac4317c9fc567dcfbbe60dc4a57c0a3c3305ee /emms-browser.el
parentabf3484a89744526317f6e6e7fc9523580ed96d2 (diff)
browser: display a help message on an empty deck
darcs-hash:20070305131445-4e3e3-e06fe61d90892014f787578c7adeaec9e45b8736.gz
Diffstat (limited to 'emms-browser.el')
-rw-r--r--emms-browser.el26
1 files changed, 26 insertions, 0 deletions
diff --git a/emms-browser.el b/emms-browser.el
index 78bde72..1328595 100644
--- a/emms-browser.el
+++ b/emms-browser.el
@@ -585,6 +585,8 @@ example function is `emms-browse-by-artist'."
(emms-browser-render-hash hash type)
(setq emms-browser-top-level-hash hash)
(setq emms-browser-top-level-type type)
+ (unless (> (hash-table-count hash) 0)
+ (emms-browser-show-empty-cache-message))
(goto-char (point-min))))
(emms-browser-add-category "artist" 'info-artist)
@@ -658,6 +660,30 @@ compilations, etc."
(let ((bdata (emms-browser-make-bdata-tree type 1 tracks name)))
(emms-browser-insert-format bdata)))
+(defun emms-browser-show-empty-cache-message ()
+ "Display some help if the cache is empty."
+ (emms-with-inhibit-read-only-t
+ (insert "
+Welcome to EMMS.
+
+There are currently no files in the EMMS database.
+To browse music, you need to tell EMMS where your
+files are.
+
+Try the following commands:
+
+ M-x emms-add-directory-tree:
+ Add all music in a directory and its subdirectories.
+
+ M-x emms-add-directory:
+ Add all music in a directory
+
+ M-x emms-add-file: Add a single music file.
+
+After you have added some files, wait for EMMS to say
+'all track information loaded,' then return to the
+browser, and hit 'b 1' to refresh.")))
+
;; --------------------------------------------------
;; Building a subitem tree
;; --------------------------------------------------