---
*** New user option 'mpc-notifications'.
-When non-nil MPC displays a desktop notification when the song changes.
-The notification’s title and body can be customized with
-'mpc-notifications-title' and 'mpc-notifications-body'.
+When non-nil, MPC (the Emacs front-end to Music Player Daemon) displays
+a desktop notification when the song changes, using
+'notifications-notify'. The notification's title and body can be
+customized using the new user options 'mpc-notifications-title' and
+'mpc-notifications-body'.
\f
* New Modes and Packages in Emacs 31.1
(t . mpc-current-refresh))
"Alist associating properties to the functions that care about them.
Each entry has the form (PROP . FUN) to call FUN (without arguments)
-whenever property PROP changes. PROP can be t to mean
-to call FUN for any change whatsoever.")
+whenever property PROP changes. PROP can be t, which means to call
+FUN for any change whatsoever.")
(defun mpc--status-callback ()
(let ((old-status mpc-status))
FORMAT-SPEC is a string that includes elements of the form
'%-WIDTH{NAME-POST}' that get expanded to the value of
-property NAME,
+property NAME.
The first '-', WIDTH, and -POST are optional.
% followed by the optional '-' means to right align the output.
-WIDTH limits the output to the specified number of characters by replacing
-any further output with a horizontal ellipsis.
+WIDTH limits the output to the specified number of characters by
+replacing any further output with a horizontal ellipsis.
The optional -POST means to use the empty string if NAME is
absent or else use the concatenation of the content of NAME with the
string POST."
(put-text-property start (point) 'mpc--uptodate-p pred)))
(defun mpc-cover-image-find (file)
- "Find cover image for FILE."
+ "Find cover image for FILE in suitable MPC directory."
(when-let* ((default-directory mpc-mpd-music-directory)
(dir (mpc-file-local-copy (file-name-directory file)))
(files (directory-files dir))
(expand-file-name cover dir)))
(defun mpc-cover-image-p (file)
- "Check if FILE is a cover image."
+ "Check if FILE is a cover image suitable for MPC."
(let ((covers '(".folder.png" "folder.png" "cover.jpg" "folder.jpg")))
(or (member-ignore-case file covers)
(and mpc-cover-image-re (string-match-p mpc-cover-image-re file)))))
(declare-function notifications-notify "notifications")
(defcustom mpc-notifications nil
- "Non-nil means to display notifications when the song changes."
+ "Non-nil means MPC should display notifications when the song changes."
:version "31.1"
:type 'boolean)
'("%{Title}" "Unknown Title")
"List of FORMAT-SPECs used in the notification title.
-The first element that expands to a non-empty string is used.
-See `mpc-format' for the definition of FORMAT-SPEC."
+The first element in the list that expands to a non-empty string
+will be used. See `mpc-format' for the definition of FORMAT-SPEC."
:version "31.1"
:type '(repeat string))
'("%{Artist}" "%{AlbumArtist}" "Unknown Artist")
"List of FORMAT-SPEC used in the notification body.
-The first element that returns a non-emtpy string is used.
-See `mpc-format' for the definition of FORMAT-SPEC."
+The first element in the list that expands to a non-empty string
+will be used. See `mpc-format' for the definition of FORMAT-SPEC."
:version "31.1"
:type '(repeat string))