[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emms-patches] darcs patch: emms-i18n changes, add playlist navigate com
From: |
Ye Wenbin |
Subject: |
[Emms-patches] darcs patch: emms-i18n changes, add playlist navigate command, uniq... |
Date: |
Thu, 07 Dec 2006 14:39:44 +0800 |
Thu Dec 7 14:35:10 CST 2006 Ye Wenbin <address@hidden>
* emms-i18n changes, add playlist navigate command, uniq playlist command
New patches:
[emms-i18n changes, add playlist navigate command, uniq playlist command
Ye Wenbin <address@hidden>**20061207063510] {
hunk ./emms-i18n.el 83
-(defun emms-call-process-to-string (program &rest args)
+(defun emms-call-process-simple (&rest args)
hunk ./emms-i18n.el 93
-The result arguments ARGS is a list of string which pass to `call-process'."
- (with-temp-buffer
- (let ((default-process-coding-system (copy-tree
default-process-coding-system))
- (process-coding-system-alist nil) exit)
+The rest arguments ARGS is as the same as `call-process', except the
+BUFFER should always have value t. Otherwise the coding detection will
+not perform."
+ (let ((default-process-coding-system (copy-tree
default-process-coding-system))
+ (process-coding-system-alist nil) exit pos)
+ (when (eq (nth 2 args) 't)
hunk ./emms-i18n.el 100
- (setq exit (apply 'call-process (append (list program nil t nil) args)))
- (when (and (zerop exit) (null (car emms-default-coding-system)))
- (decode-coding-region (point-min) (point-max)
(emms-detect-buffer-coding-system)))
- (and (zerop exit) (buffer-string)))))
+ (setq pos (point)))
+ (setq exit (apply 'call-process args))
+ (when (and (eq (nth 2 args) 't)
+ (null (car emms-default-coding-system)))
+ (save-restriction
+ (narrow-to-region pos (point))
+ (decode-coding-region (point-min) (point-max)
(emms-detect-buffer-coding-system))))
+ exit))
hunk ./emms-i18n.el 110
-(defun emms-call-process (program &rest args)
+(defun emms-call-process (&rest args)
hunk ./emms-i18n.el 119
- (apply 'call-process (append (list program nil t nil) args)))
- (apply 'call-process (append (list program nil t nil) args)))))
+ (apply 'call-process args))
+ (apply 'call-process args))))
hunk ./emms-i18n.el 148
- (let ((size (buffer-size))
+ (let ((size (- (point-max) (point-min)))
hunk ./emms-mp3tag.el 190
+(defsubst emms-mp3tag-display-log-buffer-maybe ()
+ (if (> (buffer-size (get-buffer emms-mp3tag-log-buffer)) 0)
+ (display-buffer emms-mp3tag-log-buffer)))
+
hunk ./emms-mp3tag.el 225
-(defsubst emms-mp3tag-display-log-buffer-maybe ()
- (if (> (buffer-size (get-buffer emms-mp3tag-log-buffer)) 0)
- (display-buffer emms-mp3tag-log-buffer)))
-
hunk ./emms-playlist-mode.el 128
+ (define-key map (kbd "M-n") 'emms-playlist-mode-next)
+ (define-key map (kbd "M-p") 'emms-playlist-mode-previous)
hunk ./emms-playlist-mode.el 500
+(defun emms-playlist-mode-next (arg)
+ "Navigate between playlists."
+ (interactive "p")
+ (let ((playlists (remove-if-not 'buffer-live-p
+ (emms-playlist-buffer-list)))
+ bufs idx)
+ (if playlists
+ ;; if not in playlist mode, switch to emms-playlist-buffer
+ (if (not (member (current-buffer) playlists))
+ (switch-to-buffer (if (and emms-playlist-buffer
+ (buffer-live-p emms-playlist-buffer))
+ emms-playlist-buffer
+ (car playlists)))
+ (setq bufs (member (current-buffer) playlists))
+ (setq idx
+ (+ (- (length playlists) (length bufs))
+ (if (> arg 0) 1 -1)))
+ (switch-to-buffer (nth (mod idx (length playlists)) playlists)))
+ (message "No playlist found!"))))
+(defun emms-playlist-mode-previous (arg)
+ (interactive "p")
+ (emms-playlist-mode-next (- arg)))
+
hunk ./emms-score.el 245
- (mapc (lambda (elt)
- (puthash (car elt) (cdr elt) emms-score-hash))
- (read
- (with-temp-buffer
- (insert-file-contents emms-score-file)
- (buffer-string)))))
+ (if (file-exists-p emms-score-file)
+ (mapc (lambda (elt)
+ (puthash (car elt) (cdr elt) emms-score-hash))
+ (read
+ (with-temp-buffer
+ (insert-file-contents emms-score-file)
+ (buffer-string))))
+ ;; when file not exists, make empty but valid score file
+ (emms-score-save-hash)))
hunk ./emms-setup.el 127
+ (require 'emms-history)
+ (require 'emms-mark)
hunk ./emms.el 113
+(defcustom emms-playlist-uniq-function 'emms-playlist-simple-uniq
+ "*The function to use for make track uniq in the playlist."
+ :type 'function
+ :group 'emms)
+
hunk ./emms.el 424
+(defun emms-uniq ()
+ "Uniq the current playlist.
+This uses `emms-playlist-uniq-function'."
+ (interactive)
+ (with-current-emms-playlist
+ (save-excursion
+ (funcall emms-playlist-uniq-function))))
+
hunk ./emms.el 1101
+ (point-max)
+ 'emms-track current)))
+ (if pos
+ (emms-playlist-select pos)
+ (emms-playlist-first)))))
+
+(defun emms-uniq-list (list stringfy)
+ "Compare stringfied element of list, and remove duplicate elements."
+ (let ((hash (make-hash-table :test 'equal))
+ str)
+ (remove-if (lambda (elm)
+ (setq str (funcall stringfy elm))
+ (if (gethash str hash) t
+ (puthash str t hash) nil)) list)))
+
+(defun emms-playlist-simple-uniq ()
+ "Remove duplicate tracks"
+ (emms-playlist-ensure-playlist-buffer)
+ (widen)
+ (let ((inhibit-read-only t)
+ (current (emms-playlist-selected-track))
+ (tracks (emms-playlist-tracks-in-region (point-min)
+ (point-max))))
+ (delete-region (point-min) (point-max))
+ (run-hooks 'emms-playlist-cleared-hook)
+ (mapc 'emms-playlist-insert-track
+ (nreverse
+ (emms-uniq-list tracks 'emms-track-name)))
+ (let ((pos (text-property-any (point-min)
}
Context:
[emms-mp3tag support ogg, add more documentation. fix some error
Ye Wenbin <address@hidden>**20061206153528]
[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-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:
fc4bb2e860f713170f274f73ab427c91c8f450f1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emms-patches] darcs patch: emms-i18n changes, add playlist navigate command, uniq...,
Ye Wenbin <=