[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emms-patches] darcs patch: Make sure we never have an empty track d...
From: |
Michael Olson |
Subject: |
[Emms-patches] darcs patch: Make sure we never have an empty track d... (and 3 more) |
Date: |
Sun, 04 Jun 2006 15:58:03 -0400 |
Sun Jun 4 15:49:40 EDT 2006 Michael Olson <address@hidden>
* Make sure we never have an empty track description when inserting a song
into a playlist buffer.
Sun Jun 4 15:53:11 EDT 2006 Michael Olson <address@hidden>
* Miscellaneous minor cleanups.
Sun Jun 4 15:54:49 EDT 2006 Michael Olson <address@hidden>
* emms-player-mpd: Differentiate between files and URLs when it makes sense
to do so.
Sun Jun 4 15:56:02 EDT 2006 Michael Olson <address@hidden>
* Add some sources for inserting playlists without inserting their contents,
and likewise for directories of playlist files. Exclude some files and
directories from being added when walking directories.
New patches:
[Make sure we never have an empty track description when inserting a song into
a playlist buffer.
Michael Olson <address@hidden>**20060604194940] {
hunk ./emms-playlist-mode.el 456
- (insert (emms-propertize (emms-track-description track)
+ (insert (emms-propertize (emms-track-force-description track)
hunk ./emms.el 496
- ":"
- (emms-track-name track))))
+ ": " (emms-track-name track))))
+
+(defun emms-track-force-description (track)
+ "Always return text that describes TRACK.
+This is used when inserting a description into a buffer.
+
+The reason for this is that if no text was returned (i.e. the
+user defined a track function that returned nil or the empty
+string), a confusing error message would result."
+ (let ((desc (emms-track-description track)))
+ (if (and (stringp desc) (not (string= desc "")))
+ desc
+ (emms-track-simple-description track))))
hunk ./emms.el 919
- (insert (emms-propertize (emms-track-description track)
+ (insert (emms-propertize (emms-track-force-description track)
}
[Miscellaneous minor cleanups.
Michael Olson <address@hidden>**20060604195311] {
hunk ./emms-source-file.el 101
-from the user"
+from the user."
hunk ./emms-source-file.el 132
-`emms-source-file-default-directory' that match REGEXP."
+`emms-source-file-default-directory' that match REGEX."
hunk ./emms-source-file.el 154
- (dired-get-marked-files))))
+ (dired-get-marked-files))))
hunk ./emms-source-file.el 228
- (save-window-excursion
- (set-buffer (get-buffer-create "*EMMS Find*"))
- (locate-mode)
+ (save-window-excursion
+ (set-buffer (get-buffer-create "*EMMS Find*"))
+ (locate-mode)
hunk ./emms-source-file.el 232
- (mapc (lambda (elt) (insert (cdr (assoc 'name elt)) "\n"))
- (emms-source-find emms-source-file-default-directory regexp))
+ (mapc (lambda (elt) (insert (cdr (assoc 'name elt)) "\n"))
+ (emms-source-find emms-source-file-default-directory regexp))
hunk ./emms-source-file.el 235
- (and (not (string-equal (buffer-name) "*EMMS Find*"))
- (switch-to-buffer-other-window "*EMMS Find*"))
- (run-hooks 'dired-mode-hook)
+ (and (not (string-equal (buffer-name) "*EMMS Find*"))
+ (switch-to-buffer-other-window "*EMMS Find*"))
+ (run-hooks 'dired-mode-hook)
hunk ./emms-source-file.el 250
+;;;###autoload (autoload 'emms-play-streamlist "emms-source-file" nil t)
+;;;###autoload (autoload 'emms-add-streamlist "emms-source-file" nil t)
hunk ./emms-streams.el 430
- (player (read (concat "emms-" emms-stream-default-action "-" (format
"%s" type)))))
+ (player (read (concat "emms-" emms-stream-default-action "-"
+ (format "%s" type)))))
}
[emms-player-mpd: Differentiate between files and URLs when it makes sense to
do so.
Michael Olson <address@hidden>**20060604195449] {
hunk ./emms-player-mpd.el 449
- (let (cell)
- (when (setq cell (assoc "file" song-info))
- (let ((track (emms-track 'file (cdr cell))))
+ (let ((file (cdr (assoc "file" song-info))))
+ (when file
+ (let* ((type (if (string-match "\\`http://" file)
+ 'url
+ 'file))
+ (track (emms-track type file)))
hunk ./emms-player-mpd.el 969
- (let ((track (emms-dictionary '*track*)))
- (emms-track-set track 'type 'file)
+ (let ((track (emms-dictionary '*track*))
+ track-desc)
+ (if (string-match "\\`http://" file)
+ (emms-track-set track 'type 'url)
+ (emms-track-set track 'type 'file))
hunk ./emms-player-mpd.el 976
- (if name
- (setq desc (concat name ": " (emms-track-description track)))
- (setq desc (emms-track-description track))))))
+ (setq track-desc (emms-track-description track))
+ (when (and (stringp track-desc) (not (string= track-desc "")))
+ (setq desc (if desc
+ (concat desc ": " track-desc)
+ track-desc))))))
}
[Add some sources for inserting playlists without inserting their contents, and
likewise for directories of playlist files. Exclude some files and directories
from being added when walking directories.
Michael Olson <address@hidden>**20060604195602] {
hunk ./emms-source-file.el 70
+(defcustom emms-source-file-exclude-regexp
+ (concat "\\`\\(.*\\.?#.*\\|.*,v\\|.*~\\|\\.\\.?\\|,.*\\)\\'\\|"
+ "/\\(CVS\\|RCS\\|\\.arch-ids\\|{arch}\\|,.*\\|\\.svn\\|"
+ "_darcs\\)\\(/\\|\\'\\)")
+ "A regexp matching files to be ignored when adding directories.
+
+You should set case-fold-search to nil before using this regexp
+in code."
+ :type 'regexp
+ :group 'emms-source-file)
+
hunk ./emms-source-file.el 119
- (emms-playlist-insert-track
- (emms-track 'file (expand-file-name file))))
+ (unless (let ((case-fold-search nil))
+ (string-match emms-source-file-exclude-regexp file))
+ (emms-playlist-insert-track
+ (emms-track 'file (expand-file-name file)))))
hunk ./emms-source-file.el 136
- (emms-playlist-insert-track
- (emms-track 'file file)))
+ (unless (let ((case-fold-search nil))
+ (string-match emms-source-file-exclude-regexp file))
+ (emms-playlist-insert-track
+ (emms-track 'file file))))
hunk ./emms-source-file.el 155
- (emms-playlist-insert-track
- (emms-track 'file file)))
+ (unless (let ((case-fold-search nil))
+ (string-match emms-source-file-exclude-regexp file))
+ (emms-playlist-insert-track
+ (emms-track 'file file))))
hunk ./emms-source-playlist.el 414
+;;; Adding playlists as files
+
+;;;###autoload (autoload 'emms-play-playlist-file "emms-source-playlist" nil t)
+;;;###autoload (autoload 'emms-add-playlist-file "emms-source-playlist" nil t)
+(define-emms-source playlist-file (file)
+ "An EMMS source for playlist files.
+This adds the given file to the current EMMS playlist buffer,
+without adding its contents.
+
+See `emms-source-playlist-formats' for a list of supported formats."
+ (interactive (list (read-file-name "Playlist file: "
+ emms-source-file-default-directory
+ emms-source-file-default-directory
+ t)))
+ (emms-playlist-insert-track
+ (emms-track 'playlist (expand-file-name file))))
+
+;;;###autoload (autoload 'emms-play-playlist-directory
+;;;###autoload "emms-source-playlist" nil t)
+;;;###autoload (autoload 'emms-add-playlist-directory
+;;;###autoload "emms-source-playlist" nil t)
+(define-emms-source playlist-directory (dir)
+ "An EMMS source for a whole directory tree of playlist files.
+If DIR is not specified, it is queried from the user."
+ (interactive (list
+ (emms-read-directory-name "Play directory: "
+ emms-source-file-default-directory
+ emms-source-file-default-directory
+ t)))
+ (mapc (lambda (file)
+ (unless (let ((case-fold-search nil))
+ (string-match emms-source-file-exclude-regexp file))
+ (emms-playlist-insert-track
+ (emms-track 'playlist (expand-file-name file)))))
+ (directory-files dir t "^[^.]")))
+
+;;;###autoload (autoload 'emms-play-playlist-directory-tree
+;;;###autoload "emms-source-playlist" nil t)
+;;;###autoload (autoload 'emms-add-playlist-directory-tree
+;;;###autoload "emms-source-file" nil t)
+(define-emms-source playlist-directory-tree (dir)
+ "An EMMS source for multiple directory trees of playlist files.
+If DIR is not specified, it is queried from the user."
+ (interactive (list
+ (emms-read-directory-name "Play directory tree: "
+ emms-source-file-default-directory
+ emms-source-file-default-directory
+ t)))
+ (mapc (lambda (file)
+ (unless (let ((case-fold-search nil))
+ (string-match emms-source-file-exclude-regexp file))
+ (emms-playlist-insert-track
+ (emms-track 'playlist file))))
+ (emms-source-file-directory-tree (expand-file-name dir) "^[^.]")))
}
Context:
[Remove debian-extras package as requested by ftpmasters (debian)
address@hidden
[Put volume options in their own customize group.
Martin Schoenmakers <address@hidden>**20060601193853
Added a separate emms-volume group for customize and put things there instead
of in the main thing.
]
[emms-volume.el: Cosmetic stuff, defvar -> defcustom
address@hidden
[emms-volume.el: Minor cosmetic cleanup
address@hidden
[emms-volme.el: Add some requires.
address@hidden
[emms-volume-amixer.el: Provide a way to set the control for amixer
address@hidden
[Make handling of multiple playlist buffers less error-prone.
Michael Olson <address@hidden>**20060531203810]
[AUTHORS: Add Martin Schoenmakers. Welcome! :-)
address@hidden
[Add emms-volume and emms-volume-amixer.
Martin Schoenmakers <address@hidden>**20060530223500
New files: emms-volume.el provides some general volume changing things,
including a minor mode to more easily change volume when not in the
EMMS buffer. emms-volume-amixer.el is a backend using amixer.
]
[emms-streams: Re-add space after prompt and use completion for type.
Michael Olson <address@hidden>**20060530190620]
[allow nonzero ogginfo exit plus some reindenting
Martin Schoenmakers <address@hidden>**20060530130411
When ogginfo gave a nonzero value on exit, any valid data would get tossed
if there was any. This prevented emms from showing info for files that are
tagged but a bit odd.
Also reindented emms-info-ogginfo accordingly, which incidentally removed
some tabs in favour of spaces.
]
[emms-streams: When the user wants emms-streams to play the selected stream
instead of add it, create our own playlist buffer. When quitting, if we own
the current playlist buffer, kill it.
Michael Olson <address@hidden>**20060530144243]
[emms-streams: Re-implement yank and kill so that they do the right thing with
emms-stream-list.
Michael Olson <address@hidden>**20060530045429]
[emms-streams: Implement kill and yank.
Michael Olson <address@hidden>**20060530040114]
[emms-streams: Make hitting RET on a URL do the right thing, improve cursor
movement, and mark the buffer as unmodified after performing a save.
Michael Olson <address@hidden>**20060529030043]
[emms-player-mpd: Use more robust method of detecting whether we need to
force-feed MusicPD our playlist.
Michael Olson <address@hidden>**20060525014253]
[emms-playlist-mode: Make "d" kill the entire line. This seems to be a good
compromise of those who use C-k and those who want more standard object-killing
behavior.
foo**20060524200008]
[emms-player-mpd: When showing the currently-playing song, prepend the name of
the radio station, if it exists.
foo**20060524195911]
[emms-player-mpd: Make seek work correctly.
Michael Olson <address@hidden>**20060525033120]
[emms-player-mpd: Fix bug that caused unconditional reloading of the entire
MusicPD playlist whenever the track was changed manually.
Michael Olson <address@hidden>**20060524061655]
[emms-player-mpd: Overhaul for streamlist support, and fix a few miscellaneous
issues.
Michael Olson <address@hidden>**20060524055707]
[emms-player-mpd: Add a few checks to make sure that the given buffer exists
before trying to do anything with it.
Michael Olson <address@hidden>**20060517035419]
[emms-source-playlist: Do not expand names of files in playlists, as this can
cause problems with emms-player-mpd in some configurations.
Michael Olson <address@hidden>**20060516081257]
[emms-playlist-mode: Implement the option (disabled by default) of opening a
new EMMS buffer for a playlist, when hitting RET on one.
Michael Olson <address@hidden>**20060510040730]
[emms-playlist-mode.el: Don't put a period after the mode map. This hangs 21.4
on display.
address@hidden
[TAG 2.0
address@hidden
Patch bundle hash:
6fba105b86aae689757c08e4d77bed4e491b861d
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emms-patches] darcs patch: Make sure we never have an empty track d... (and 3 more),
Michael Olson <=