   "Sends a command to Spotify process to toggle the repeating flag."
   (interactive)
   (spotify-apply "toggle-repeat")
-  (message "Spotify repeating is %s"
-           (if (spotify-repeating-p) "on" "off")))
+  (run-at-time "1 sec" nil 'spotify-repeating-status-msg))
 
 (defun spotify-shuffling-p ()
   "Returns whether Spotify have shuffling turned on."

  "Sends a `play' command to Spotify process passing a context id."
  (interactive)
  (spotify-apply "player-play-track" context-id)
  (spotify-current-track-msg))

(defun spotify-toggle-play ()
  "Sends a `playpause' command to Spotify process."
  (interactive)
  (spotify-apply "player-toggle-play")
  (spotify-playing-status-msg))

(defun spotify-play ()
  "Sends a `play' command to Spotify process."
  (interactive)
  (spotify-apply "player-play")
  (spotify-playing-status-msg))

(defun spotify-next-track ()
  "Sends a `next track' command to Spotify process."
  (interactive)
  (spotify-apply "player-next-track")
  (spotify-current-track-msg))

(defun spotify-previous-track ()
  "Sends a `previous track' command to Spotify process."
  (interactive)
  (spotify-apply "player-previous-track")
  (spotify-current-track-msg))

(defun spotify-pause ()
  "Sends a `pause' command to Spotify process."
  (interactive)
  (spotify-apply "player-pause")
  (spotify-playing-status-msg))

(defun spotify-playing-p ()
  "Returns whether Spotify is playing."

    (apply (intern func-name) args)))

(defun spotify-current-track-msg ()
  "Returns a string that describes the track being played in Spotify app."
  (let ((artist (spotify-current-track-artist))
        (name (spotify-current-track-name)))
    (when (spotify-playing-p)
      (message "Spotify is now playing: %s - %s" artist name))))

(defun spotify-shuffling-status-msg ()
  "Returns a string that describes whether shuffling is enabled in Spotify app."
  (message "Spotify shuffling is %s"
           (if (spotify-shuffling-p) "on" "off")))

(defun spotify-repeating-status-msg ()
  "Returns a string that describes whether repeating is enabled in Spotify app."
  (message "Spotify repeating is %s"
           (if (spotify-repeating-p) "on" "off")))

(defun spotify-playing-status-msg ()
  "Returns a string that describes whether Spotify is paused or playing."
  (message "Spotify is now %s"
           (if (spotify-playing-p) "playing" "paused")))

