emms-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emms-patches] darcs patch: emms-mode-line: Rename `emms-playing-tim...


From: William Xu
Subject: [Emms-patches] darcs patch: emms-mode-line: Rename `emms-playing-tim... (and 1 more)
Date: Mon, 18 Dec 2006 19:22:31 +0800

Mon Dec 18 19:17:47 CST 2006  address@hidden
  * emms-mode-line: Rename `emms-playing-time-toggle' to 
`emms-mode-line-toggle'.

Mon Dec 18 19:20:57 CST 2006  address@hidden
  * emms-playing-time: Add stuffs for controlling displaying on mode line
  while still enabling emms-playing-time module at backgrond.
New patches:

[emms-mode-line: Rename `emms-playing-time-toggle' to `emms-mode-line-toggle'.
address@hidden {
hunk ./emms-mode-line.el 106
-(defun emms-playing-time-toggle ()
+(defun emms-mode-line-toggle ()
}

[emms-playing-time: Add stuffs for controlling displaying on mode line
address@hidden
 while still enabling emms-playing-time module at backgrond.
] {
hunk ./emms-playing-time.el 29
-;;              (require 'emms-playing-time)
-;;
-;; Then either `M-x emms-playing-time-enable' or add
-;; (emms-playing-time 1) in your .emacs to enable.
+;;     (require 'emms-playing-time)
+;;     (emms-playing-time 1)
+
+;; Note: `(emms-playing-time -1)' will disable emms-playing-time module
+;; completely, and is not recommended. (since some other emms modules
+;; may rely on it, such as `emms-lastfm.el')
+
+;; Instead, to toggle displaying playing time on mode line, one could
+;; call `emms-playing-time-enable-display' and
+;; `emms-playing-time-disable-display'."
hunk ./emms-playing-time.el 73
-  "Whether emms playing time is enabled or not")
+  "Whether to display playing time on mode line or not")
hunk ./emms-playing-time.el 82
+(defvar emms-playing-time-p nil
+  "Whether emms-playing-time module is enabled or not")
+
hunk ./emms-playing-time.el 123
-  "Turn on emms playing time if ARG is positive, off otherwise."
-  (interactive "p")
+  "Turn on emms playing time if ARG is positive, off otherwise.
+
+Note: `(emms-playing-time -1)' will disable emms-playing-time
+module completely, and is not recommended. (since some other emms
+modules may rely on it, such as `emms-lastfm.el')
+
+Instead, to toggle displaying playing time on mode line, one
+could call `emms-playing-time-enable-display' and
+`emms-playing-time-disable-display'."
hunk ./emms-playing-time.el 134
-       (setq emms-playing-time-display-p t)
+       (setq emms-playing-time-p t
+              emms-playing-time-display-p t)
hunk ./emms-playing-time.el 137
-       (add-hook 'emms-player-started-hook     'emms-playing-time-start)
-       (add-hook 'emms-player-stopped-hook     'emms-playing-time-stop)
-       (add-hook 'emms-player-finished-hook    'emms-playing-time-stop)
-       (add-hook 'emms-player-paused-hook      'emms-playing-time-pause)
-       (add-hook 'emms-player-seeked-functions 'emms-playing-time-seek)
+       (add-hook 'emms-player-started-hook       'emms-playing-time-start)
+       (add-hook 'emms-player-stopped-hook       'emms-playing-time-stop)
+       (add-hook 'emms-player-finished-hook      'emms-playing-time-stop)
+       (add-hook 'emms-player-paused-hook        'emms-playing-time-pause)
+       (add-hook 'emms-player-seeked-functions   'emms-playing-time-seek)
hunk ./emms-playing-time.el 143
-    (setq emms-playing-time-display-p nil)
+    (setq emms-playing-time-p nil
+          emms-playing-time-display-p nil)
hunk ./emms-playing-time.el 147
-    (remove-hook 'emms-player-started-hook     'emms-playing-time-start)
-    (remove-hook 'emms-player-stopped-hook     'emms-playing-time-stop)
-    (remove-hook 'emms-player-finished-hook    'emms-playing-time-stop)
-    (remove-hook 'emms-player-paused-hook      'emms-playing-time-pause)
-    (remove-hook 'emms-player-seeked-functions 'emms-playing-time-seek)
+    (remove-hook 'emms-player-started-hook       'emms-playing-time-start)
+    (remove-hook 'emms-player-stopped-hook       'emms-playing-time-stop)
+    (remove-hook 'emms-player-finished-hook      'emms-playing-time-stop)
+    (remove-hook 'emms-player-paused-hook        'emms-playing-time-pause)
+    (remove-hook 'emms-player-seeked-functions   'emms-playing-time-seek)
hunk ./emms-playing-time.el 155
-(defun emms-playing-time-enable ()
-  "Enable displaying emms playing time on mode line."
-  (interactive)
-  (emms-playing-time 1)
-  (message "emms playing time enabled"))
-
-;;;###autoload
-(defun emms-playing-time-disable ()
-  "Disable displaying emms playing time on mode line."
+(defun emms-playing-time-enable-display ()
+  "Display playing time on mode line."
hunk ./emms-playing-time.el 158
-  (emms-playing-time -1)
-  (message "emms playing time disabled"))
+  (setq emms-playing-time-display-p t))
hunk ./emms-playing-time.el 161
-(defun emms-playing-time-toggle ()
-  "Toggle displaying emms playing time on mode line."
+(defun emms-playing-time-disable-display ()
+  "Remove playing time from mode line."
hunk ./emms-playing-time.el 164
-  (if emms-playing-time-display-p
-      (emms-playing-time-disable)
-    (emms-playing-time-enable)))
+  (setq emms-playing-time-display-p nil))
hunk ./emms-playing-time.el 169
-  (let* ((min (/ emms-playing-time 60))
-        (sec (% emms-playing-time 60))
-        (total-playing-time
-         (or (emms-track-get
-              (emms-playlist-current-selected-track)
-              'info-playing-time)
-             0))
-        (total-min-only (/ total-playing-time 60))
-        (total-sec-only (% total-playing-time 60)))
-    (case emms-playing-time-style
-      ((bar)
-       (if (zerop total-playing-time)
-           (setq emms-playing-time-string "[==>........]")
-         (let ((progress "[")
-               ;; percent based on 10
-               (percent (/ (* emms-playing-time 10) total-playing-time)))
-           (dotimes (i percent)
-             (setq progress (concat progress "=")))
-           (setq progress (concat progress ">"))
-           (dotimes (i (- 10 percent))
-             (setq progress (concat progress " ")))
-           (setq progress (concat progress "]"))
-           (setq emms-playing-time-string progress))))
-      (t
-       (setq emms-playing-time-string
-             (emms-replace-regexp-in-string
-              " " "0"
-              (if (or emms-playing-time-display-short-p
-                      ;; unable to get total playing-time
-                      (eq total-playing-time 0))
-                  (format "%2d:%2d" min sec)
-                (format "%2d:%2d/%2s:%2s"
-                        min sec total-min-only total-sec-only))))))
-    (setq emms-playing-time-string
-          (format emms-playing-time-display-format
-                  emms-playing-time-string))
-    (force-mode-line-update)))
+  (setq emms-playing-time-string "")
+  (when emms-playing-time-display-p
+    (let* ((min (/ emms-playing-time 60))
+           (sec (% emms-playing-time 60))
+           (total-playing-time
+            (or (emms-track-get
+                 (emms-playlist-current-selected-track)
+                 'info-playing-time)
+                0))
+           (total-min-only (/ total-playing-time 60))
+           (total-sec-only (% total-playing-time 60)))
+      (case emms-playing-time-style
+        ((bar)
+         (if (zerop total-playing-time)
+             (setq emms-playing-time-string "[==>........]")
+           (let ((progress "[")
+                 ;; percent based on 10
+                 (percent (/ (* emms-playing-time 10) total-playing-time)))
+             (dotimes (i percent)
+               (setq progress (concat progress "=")))
+             (setq progress (concat progress ">"))
+             (dotimes (i (- 10 percent))
+               (setq progress (concat progress " ")))
+             (setq progress (concat progress "]"))
+             (setq emms-playing-time-string progress))))
+        (t
+         (setq emms-playing-time-string
+               (emms-replace-regexp-in-string
+                " " "0"
+                (if (or emms-playing-time-display-short-p
+                        ;; unable to get total playing-time
+                        (eq total-playing-time 0))
+                    (format "%2d:%2d" min sec)
+                  (format "%2d:%2d/%2s:%2s"
+                          min sec total-min-only total-sec-only))))))
+      (setq emms-playing-time-string
+            (format emms-playing-time-display-format
+                    emms-playing-time-string))))
+  (force-mode-line-update))
}

Context:

[submitting-when-paused.dpatch
Tassilo Horn <address@hidden>**20061212200324
 
 This patch enables emms-lastfm.el to submit the current track even if
 the playback has been paused and resumed. It's done by canceling the
 `emms-lastfm-timer' when pausing and reenabling it on resume.
] 
[change raise/lower-function to change-functon, add change-amount
Ye Wenbin <address@hidden>**20061208052114] 
[Remove emms-volume-amixer-raise/lower commands, use emms-volume-change-function
Ye Wenbin <address@hidden>**20061208052019] 
[emms-player-mpd: Document how to use MusicPD to change the volume via 
emms-volume.el
Michael Olson <address@hidden>**20061208223509] 
[emms-lyrics: Make `emms-lyrics-find-lyric-function' customizable and add
address@hidden
 `emms-lyrics-find-current-lyric'.
] 
[emms-i18n: Rename functions to match file name.
address@hidden 
[emms-setup: Add `emms-i18n' to `emms-devel'.
address@hidden 
[emms-info-mp3info: Make use of `emms-i18n-call-process-simple'.
address@hidden 
[Fix various byte-compiler warnings throughout
Michael Olson <address@hidden>**20061207143511] 
[emms-tag-editor: Rename functions to match file name
Michael Olson <address@hidden>**20061207142310] 
[Rename emms-mp3tag.el to emms-tag-editor.el
Michael Olson <address@hidden>**20061207141945] 
[emms.el: Improve `emms-uniq-list' to not use cl.el.
address@hidden 
[emms-i18n changes, add playlist navigate command, uniq playlist command
Ye Wenbin <address@hidden>**20061207063510] 
[emms-mp3tag support ogg, add more documentation. fix some error
Ye Wenbin <address@hidden>**20061206153528] 
[emms-lastfm.dpatch
Tassilo Horn <address@hidden>**20061206112823
 
 This patch adds emms-lastfm.el, its setup to emms-setup.el and myself
 to AUTHORS.
] 
[Fix a silly bug in emms-mp3tag. Remove timestamp.
Ye Wenbin <address@hidden>**20061206020710] 
[AUTHORS: Added Ye Wenbin
address@hidden 
[Fix lyrics minibuffer display. Amixer display playback and more useful commands
Wenbin Ye <address@hidden>**20061127154113] 
[Edit all track, set tag to file for mp3
Wenbin Ye <address@hidden>**20061205112209] 
[Add emms-mp3tag and emms-i18n
Wenbin Ye <address@hidden>**20061205065407] 
[Add emms-mark and emms-history
address@hidden 
[emms.el: Fix bug introduced by recent changes to 
emms-playlist-set-playlist-buffer
Michael Olson <address@hidden>**20061119204738] 
[Default to current buffer when setting the current EMMS playlist buffer.
Michael Olson <address@hidden>**20061119053410] 
[manual: Add documentation for new emms-playlist-mode keybindings
Michael Olson <address@hidden>**20061119052935] 
[emms-playlist-mode: Bind "b" key to emms-playlist-set-playlist-buffer.
Michael Olson <address@hidden>**20061119052907] 
[emms-playlist-mode: Implement adding the thing at point to the current 
playlist.  If it is a playlist, add its contents instead.  Map this to the "a" 
key.
Michael Olson <address@hidden>**20061119052254] 
[emms.el: In emms-playlist-set-playlist-buffer, prompt user from available EMMS 
playlist buffers rather than all buffers, and display feedback upon setting the 
current buffer, since this is not an easy change to see
Michael Olson <address@hidden>**20061119052023] 
[emms.el: Fix compiler warning
Michael Olson <address@hidden>**20061119051946] 
[Don't add subdirectories for directory and playlist-directory source insert 
methods
Michael Olson <address@hidden>**20061119041900] 
[bind SPC to `scroll-up' in emms-playlist-mode and update manual.
address@hidden 
[emms-info-mp3info.el: Replace `emms-iconv' with decode-coding-string and
address@hidden
 encode-coding-string.
] 
[emms-playing-time.el: New variable `emms-playing-time-style', it
address@hidden
 supports two styles at present, `time' and `bar'.
] 
[emms-player-mpd: Deal with change in output when getting supported file types
Michael Olson <address@hidden>**20061028042119] 
[emms.el: Move macros to the top of the file.
address@hidden 
[NEWS: Add entry for recent emms-player-mpd change
Michael Olson <address@hidden>**20061023125738] 
[emms-player-mpd: Handle errors that occur when we begin playback
Michael Olson <address@hidden>**20061022215310] 
[NEWS: Version 2 is version 2.0
address@hidden 
[emms-playlist-mode: Handle case where selection has not been set but user 
wants to delete a region
Michael Olson <address@hidden>**20061022201724] 
[emms-playlist-mode: Fix typo in hook name
Michael Olson <address@hidden>**20061022022812] 
[emms-player-mpd: Update version recommendation
Michael Olson <address@hidden>**20061022012223] 
[emms-player-mpd: Work properly with tracks inserted by emms-browser
Michael Olson <address@hidden>**20061022011050] 
[Add NEWS items since version 2.1
Michael Olson <address@hidden>**20061017222117] 
[emms-player-mpd: When using the emms-volume interface, allow the user to 
specify the amount of change in the volume
Michael Olson <address@hidden>**20061017220404] 
[Documentation cleanups in emms-player-mpd and emms-source-playlist
Michael Olson <address@hidden>**20061017215345] 
[Since emms-player-seeked-to-functions and emms-player-time-set-functions hooks 
do the same thing, replace the former with the latter
Michael Olson <address@hidden>**20061017210238] 
[emms-browser: Fix compiler warning
Michael Olson <address@hidden>**20061017205310] 
[emms-player-mpd: Implement seek-to support
Michael Olson <address@hidden>**20061017205106] 
[FluidSynth midi file player
address@hidden 
[Added delYsid
address@hidden 
[jackd-support-for-emacs
address@hidden
 jackd is a pro-audio server which can be used as a backend for
 alsaplayer, mplayer, and lots of other linux audio apps.
 This module allows to start jackd from within emacs, and
 connect/disconnect jack client ports.
] 
[browser: ensure the RNG is seeded before use
Damien Elmes <address@hidden>**20061011151535] 
[browser: require sort (fixes bug with sort-fold-case being void)
Damien Elmes <address@hidden>**20061010125718] 
[emms-player-mplayer.el: Mplayer also supports .vob files.
address@hidden 
[fix faulty emms-playlist-mode keybinding, fix due to William and Damien.
address@hidden 
[Added seeking to the playlist keymap, and updated the manual.
address@hidden 
[emms-player-mpd: Only display error if we are certain that url.el is not 
up-to-date
Michael Olson <address@hidden>**20061004032213] 
[seek-for-alsaplayer
address@hidden
 Add relative seek support for alsaplayer
] 
[midi-files-via-timidity
address@hidden
 A simple-player definition for timidity
] 
[pause-for-alsaplayer
address@hidden
 Get pause/resume working for alsaplayer
] 
[mms-for-mplayer
address@hidden
 mplayer also supports mms:// URLs
] 
[emms-playing-time.el: Minor cleanups.
address@hidden 
[emms-lyrics.el: Minor Cleanups.
address@hidden 
[DoTheRightThing with player pausing and emms-bookmarks.el
address@hidden 
[Added emms-bookmarks.el
address@hidden 
[Added `emms-pause' to emms-playlist-mode.el bound to to ``P''.
address@hidden 
[browser: add deletion started/finished message
Damien Elmes <address@hidden>**20060923051128] 
[Added a link to the online version of the manual.
address@hidden 
[emms-playing-time.el now works with `seek-to'.
address@hidden 
[Added `seek-to' to emms.el and emms-player-mplayer.el.
address@hidden 
[browser/cache: support deleting files, make emms-cache-dirty a defsubst
Damien Elmes <address@hidden>**20060922090553] 
[TAG 2.1
address@hidden 
Patch bundle hash:
25b508e8ca56ddd5f63ad806e5ad58cf3eced89f

reply via email to

[Prev in Thread] Current Thread [Next in Thread]