Skip to content

Instantly share code, notes, and snippets.

@tototoshi
Created May 22, 2011 06:22
Show Gist options
  • Save tototoshi/985222 to your computer and use it in GitHub Desktop.
Save tototoshi/985222 to your computer and use it in GitHub Desktop.
emmsで聞いてる曲をとってくる
(defun my-emms-current-track-path ()
"get current track file as fullpath"
(emms-track-description (emms-playlist-current-selected-track)))
(defun my-insert-current-track ()
(interactive)
(multiple-value-bind (artist album song)
(last (split-string (my-emms-current-track-path) "/") 3)
(insert (format "きいてる %s - %s from %s" song artist album))))
;; M-x my-insert-current-track
;; > きいてる 10 Smackwater Jack.m4a - Carole King from Tapestry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment