Sebastian Luque <[EMAIL PROTECTED]> writes: > I have set that variable to the > following function (stolen from somewhere): > > (defun my-emms-track-description (track) > "Return a nice description of TRACK." > (let ((artist (emms-track-get track 'info-artist)) > (title (emms-track-get track 'info-title)) > (name (emms-track-get track 'name)) > (type (emms-track-type track))) > (cond ((and (stringp artist) (not (string= artist "")) > (stringp title) (not (string= title ""))) > (let ((desc (format "%s - %s" artist title))) > (if (memq type '(file url)) > desc > (concat (symbol-name type) ": " desc)))) > ((and (stringp title) (not (string= title ""))) > (my-upcase-initials title)) > ((null name) > "Invalid track!") > ((memq type '(url streamlist)) > "") > (t > (concat (symbol-name type) ": " name)))))
For reference, here's the `my-upcase-initials' function that this
snippet refers to.
(defun my-upcase-initials (string)
"Do `upcase-initials' on STRING, but do not uppercase letters
that come after quote characters."
(with-temp-buffer
(insert (upcase-initials string))
(goto-char (point-min))
(while (re-search-forward "['`]\\([[:upper:]]\\)" nil t)
(downcase-region (match-beginning 1) (match-end 1)))
(buffer-string)))
--
Michael Olson -- FSF Associate Member #652 -- http://www.mwolson.org/
Interests: Emacs Lisp, text markup, protocols -- Jabber: mwolson_at_hcoop.net
/` |\ | | | IRC: freenode.net/mwolson: #emacs, #hcoop, #muse, #PurdueLUG
|_] | \| |_| Projects: Emacs, Muse, ERC, EMMS, Planner, ErBot, DVC
pgpfBCHdOkIQr.pgp
Description: PGP signature
_______________________________________________ Emms-help mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emms-help
