diff options
author | jao <jao@gnu.org> | 2020-06-24 02:58:59 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2020-06-24 02:58:59 +0100 |
commit | 348c39d0d7f76fe2ec0d62e729e7e11e1e9ec073 (patch) | |
tree | 163a0c9d753d00938dedcb333aab1723c10cbfe1 | |
parent | 6bdf3f32fe4b1e0ceaaaafb1188c0650d7ee6d5e (diff) | |
download | elibs-348c39d0d7f76fe2ec0d62e729e7e11e1e9ec073.tar.gz elibs-348c39d0d7f76fe2ec0d62e729e7e11e1e9ec073.tar.bz2 |
lyrics tweaks
-rw-r--r-- | emms/jao-emms-info-track.el | 4 | ||||
-rw-r--r-- | emms/jao-emms-lyrics.el | 4 | ||||
-rw-r--r-- | emms/jao-emms-random-album.el | 23 | ||||
-rw-r--r-- | net/jao-lyrics.el | 4 |
4 files changed, 19 insertions, 16 deletions
diff --git a/emms/jao-emms-info-track.el b/emms/jao-emms-info-track.el index 92eac7b..98056e4 100644 --- a/emms/jao-emms-info-track.el +++ b/emms/jao-emms-info-track.el @@ -1,6 +1,6 @@ ;; jao-emms-info-track.el -- utilities to show tracks -;; Copyright (C) 2009, 2010, 2013, 2017 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2013, 2017, 2020 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org> ;; Start date: Sat Jul 04, 2009 13:47 @@ -105,6 +105,7 @@ (defvar jao-emms-show-icon nil) +;;;###autoload (defun jao-emms-show-osd () (interactive) (emms-player-mpd-get-playing-time @@ -132,6 +133,7 @@ (info-composer . "-TCOM") (info-note . "c"))))) +;;;###autoload (defun jao-emms-info-setup (&optional show-osd show-echo-line no-id3) (setq emms-track-description-function 'jao-emms-info-track-description) (setq jao-emms-show-osd-p show-osd) diff --git a/emms/jao-emms-lyrics.el b/emms/jao-emms-lyrics.el index 05e7a27..0ea52e0 100644 --- a/emms/jao-emms-lyrics.el +++ b/emms/jao-emms-lyrics.el @@ -1,6 +1,6 @@ ;; jao-emms-lyrics.el -- simple show lyrics in emms -;; Copyright (C) 2009, 2010, 2017, 2019 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2017, 2019, 2020 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org> ;; Start date: Sat Jul 04, 2009 13:41 @@ -23,6 +23,7 @@ (require 'emms) (require 'jao-lyrics) +;;;###autoload (defun jao-emms-lyrics-track-data () (let ((track (or (emms-playlist-current-selected-track) (error "No playing track")))) @@ -31,6 +32,7 @@ (or (emms-track-get track 'info-title nil) (error "No artist"))))) +;;;###autoload (defun jao-emms-show-lyrics (&optional force) (let ((jao-lyrics-info-function 'jao-emms-lyrics-track-data)) (jao-show-lyrics force))) diff --git a/emms/jao-emms-random-album.el b/emms/jao-emms-random-album.el index bda8213..7aced29 100644 --- a/emms/jao-emms-random-album.el +++ b/emms/jao-emms-random-album.el @@ -1,6 +1,6 @@ ;; jao-emms-random-album.el -- play random albums in emms -;; Copyright (C) 2009, 2010, 2017, 2018 Jose Antonio Ortega Ruiz +;; Copyright (C) 2009, 2010, 2017, 2018, 2020 Jose Antonio Ortega Ruiz ;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org> ;; Start date: Sat Jul 04, 2009 13:06 @@ -89,23 +89,22 @@ (defun jao-emms-random-album-next () (interactive) - (let ((buffer (emms-browser-get-buffer))) - (save-excursion - (if buffer (set-buffer buffer) (emms-browser)) - (ignore-errors (emms-browser-clear-playlist)) - (emms-browse-by-album) - (jao-emms-goto-random-album) - (let ((album (substring-no-properties (thing-at-point 'line) 0 -1))) - (emms-browser-add-tracks-and-play) - (when jao-emms-random-album-notify-p - (jao-notify album "Next album" jao-emms-random-album-notify-icon))) - (emms-browser-bury-buffer)))) + (save-excursion + (ignore-errors (emms-browser-clear-playlist)) + (emms-browse-by-album) + (jao-emms-goto-random-album) + (let ((album (substring-no-properties (thing-at-point 'line) 0 -1))) + (emms-browser-add-tracks-and-play) + (when jao-emms-random-album-notify-p + (jao-notify album "Next album" jao-emms-random-album-notify-icon))) + (emms-browser-bury-buffer))) (defun jao-emms-random-album-reset () (interactive) (setq jao-emms-random-lines nil) (jao-emms-random-lines-save)) +;;;###autoload (defun jao-emms-random-album-setup () (setq emms-player-next-function 'jao-emms-next-noerror)) diff --git a/net/jao-lyrics.el b/net/jao-lyrics.el index 79be660..1967b3f 100644 --- a/net/jao-lyrics.el +++ b/net/jao-lyrics.el @@ -116,9 +116,9 @@ (defvar jao-lyrics-info-function) -(defun jao-show-lyrics (&optional force) +(defun jao-show-lyrics (&optional force info-function) (interactive "P") - (let* ((a/t (funcall jao-lyrics-info-function)) + (let* ((a/t (funcall (or info-function jao-lyrics-info-function))) (artist (car a/t)) (title (cdr a/t)) (artist (if force (read-string "Artist: " artist) artist)) |