[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emms-patches] Function to Display Current Play Modes
From: |
Yoni Rabkin |
Subject: |
Re: [Emms-patches] Function to Display Current Play Modes |
Date: |
Sat, 03 May 2014 20:57:12 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.90 (gnu/linux) |
Ian D <address@hidden> writes:
> EMMS Developers,
>
> After many times of forgetting that I had 'repeat-track' set to
> true, I developed a function that shows which play modes are active.
> I thought that this might be useful to others, so I've included the
> function in this email.
>
> Ian D
>
> (defun emms-display-modes ()
> "Display the current EMMS play modes."
> (interactive)
> (let ((pl-str (concat "playlist: "
> (if emms-repeat-playlist "y" "n")
> " "))
> (rp-str (concat "repeat: "
> (if emms-repeat-track "y" "n")
> " "))
> (rd-str (concat "random: "
> (if emms-random-playlist "y" "n")
> " ")))
> (message (concat pl-str rp-str rd-str))))
Are you OK with me adding the following to Emms? I've changed the
wording (a bit) and compacted the code (a bit):
(defun emms-display-modes ()
"Display the current EMMS play modes."
(interactive)
(message "repeat playlist: %s, repeat track: %s, random: %s"
(if emms-repeat-playlist "yes" "no")
(if emms-repeat-track "yes" "no")
(if emms-random-playlist "yes" "no")))
Also, how about adding an option to have this called whenever Emms
starts playing? The option will be off by default, but people who
regularly change the repeat and random modes might find turning it on
useful.
--
"Cut your own wood and it will warm you twice"