[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emms-patches] darcs patch: Fix lyrics minibuffer display. Amixer displa
From: |
Wenbin Ye |
Subject: |
[Emms-patches] darcs patch: Fix lyrics minibuffer display. Amixer display playback... |
Date: |
Mon, 27 Nov 2006 23:50:47 +0800 |
Mon Nov 27 23:41:13 CST 2006 Wenbin Ye <address@hidden>
* Fix lyrics minibuffer display. Amixer display playback and more useful
commands
New patches:
[Fix lyrics minibuffer display. Amixer display playback and more useful commands
Wenbin Ye <address@hidden>**20061127154113] {
hunk ./emms-lyrics.el 117
+(defvar emms-lyrics-find-lyric-function nil)
hunk ./emms-lyrics.el 129
- (when (eq 'file (emms-track-get
- (emms-playlist-current-selected-track)
- 'type))
- (unless (file-exists-p file)
- (setq file (emms-lyrics-find-lyric file)))
- (when (and file (not (string= file "")) (file-exists-p file))
- (with-temp-buffer
- (let ((coding-system-for-read emms-lyrics-coding-system))
- (insert-file-contents file)
- (while (search-forward-regexp "\\[[0-9:.]+\\].*" nil t)
- (let ((lyric-string (match-string 0))
- (time 0)
- (lyric ""))
- (setq lyric
- (emms-replace-regexp-in-string ".*\\]" "" lyric-string))
- (while (string-match "\\[[0-9:.]+\\]" lyric-string)
- (let* ((time-string (match-string 0 lyric-string))
- (semi-pos (string-match ":" time-string)))
- (setq time
- (+ (* (string-to-number
- (substring time-string 1 semi-pos))
- 60)
- (string-to-number
- (substring time-string
- (1+ semi-pos)
- (1- (length time-string))))))
- (setq lyric-string
- (substring lyric-string (length time-string)))
- (setq emms-lyrics-alist
- (append emms-lyrics-alist `((,time ,lyric))))
- (setq time 0))))))
- t))))
+ (if (eq 'file (emms-track-get
+ (emms-playlist-current-selected-track)
+ 'type))
+ (unless (file-exists-p file)
+ (setq file (emms-lyrics-find-lyric file)))
+ (setq file (funcall emms-lyrics-find-lyric-function file)))
+ (when (and file (not (string= file "")) (file-exists-p file))
+ (with-temp-buffer
+ (let ((coding-system-for-read emms-lyrics-coding-system))
+ (insert-file-contents file)
+ (while (search-forward-regexp "\\[[0-9:.]+\\].*" nil t)
+ (let ((lyric-string (match-string 0))
+ (time 0)
+ (lyric ""))
+ (setq lyric
+ (emms-replace-regexp-in-string ".*\\]" "" lyric-string))
+ (while (string-match "\\[[0-9:.]+\\]" lyric-string)
+ (let* ((time-string (match-string 0 lyric-string))
+ (semi-pos (string-match ":" time-string)))
+ (setq time
+ (+ (* (string-to-number
+ (substring time-string 1 semi-pos))
+ 60)
+ (string-to-number
+ (substring time-string
+ (1+ semi-pos)
+ (1- (length time-string))))))
+ (setq lyric-string
+ (substring lyric-string (length time-string)))
+ (setq emms-lyrics-alist
+ (append emms-lyrics-alist `((,time ,lyric))))
+ (setq time 0))))))
+ t)))
hunk ./emms-lyrics.el 174
- (file-name-extension file) "lrc" file)))
+ (concat "\\." (file-name-extension file) "\\'") ".lrc" file)))
hunk ./emms-lyrics.el 337
- (message lyric))))
+ (unless (minibuffer-window-active-p (selected-window))
+ (message lyric)))))
hunk ./emms-volume-amixer.el 52
- (start-process "mixer" nil "amixer" "sset" emms-volume-amixer-control var))
+ (message "Playback channels: %s"
+ (with-temp-buffer
+ (when (zerop
+ (call-process "amixer" nil (current-buffer) nil
+ "sset" emms-volume-amixer-control
+ (format "%d%%%s" (abs var)
+ (if (< var 0) "-" "+"))))
+ (if (re-search-backward "\\[\\([0-9]+%\\)\\]" nil t)
+ (match-string 1))))))
hunk ./emms-volume-amixer.el 62
-(defun emms-volume-amixer-raise ()
- "Increase volume by 2%."
- (interactive)
- (emms-volume-amixer-sset-master "2%+"))
+(defvar emms-volume-amixer-raise-commands
+ '(?p ?k up ?+ ?=))
+(defvar emms-volume-amixer-lower-commands
+ '(?n ?j down ?-))
+
+(defun emms-volume-amixer-raise (&optional arg)
+ (interactive "P")
+ (if arg
+ (emms-volume-amixer-sset-master -2)
+ (emms-volume-amixer-sset-master 2))
+ (let (command)
+ (while (progn
+ (setq command (read-event))
+ (cond ((member command emms-volume-amixer-raise-commands)
+ (emms-volume-amixer-sset-master 2))
+ ((member command emms-volume-amixer-lower-commands)
+ (emms-volume-amixer-sset-master -2)))))
+ (setq unread-command-events (list command))))
hunk ./emms-volume-amixer.el 82
- "Decrease volume by 2%."
hunk ./emms-volume-amixer.el 83
- (emms-volume-amixer-sset-master "2%-"))
+ (emms-volume-amixer-raise -1))
}
Context:
[emms-info-mp3info.el: Replace `emms-iconv' with decode-coding-string and
address@hidden
encode-coding-string.
]
[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]
[emms-playing-time.el: New variable `emms-playing-time-style', it
address@hidden
supports two styles at present, `time' and `bar'.
]
[bind SPC to `scroll-up' in emms-playlist-mode and update manual.
address@hidden
[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-mplayer.el: Mplayer also supports .vob files.
address@hidden
[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]
[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
]
[emms-playing-time.el: Minor cleanups.
address@hidden
[emms-lyrics.el: Minor Cleanups.
address@hidden
[pause-for-alsaplayer
address@hidden
Get pause/resume working for alsaplayer
]
[mms-for-mplayer
address@hidden
mplayer also supports mms:// URLs
]
[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:
986a5c0b9dcff5e9c0bfbfbb5e156c18a2d8cf10
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emms-patches] darcs patch: Fix lyrics minibuffer display. Amixer display playback...,
Wenbin Ye <=