Christopher Schmidt [Fri, 3 Aug 2012 13:36:07 +0000 (15:36 +0200)]
* ampc.el: Keep tag and song buffers dirty while querying MPD's song db.
(ampc-fill-skeleton): Ignore buffers that should be kept dirty.
(ampc-set-dirty, ampc-fill-tag-song): Handle keep-dirty.
(ampc-update): Make song and tag buffers dirty before sending listallinfo.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:45 +0000 (09:35 +0200)]
* ampc.el (ampc-send-command): Allow all other keys in PROPS. Store PROPS in
ampc-outstanding-commands.
(ampc-handle-command): Handle shuffle-listplaylistinfo.
(ampc-shuffle-playlist): New function.
(ampc-shuffle): Query playlist data before shuffle.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:44 +0000 (09:35 +0200)]
* ampc.el (ampc-send-command-impl): Only send commands if the connection live.
(ampc-send-next-command, ampc-quit): Only wait for process output if the
connection is live.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:43 +0000 (09:35 +0200)]
* ampc.el: Refine options for sending commands.
(ampc-send-command): Substitute optional argument unique with key argument list
props.
All callers changed to take advantage of the new options.
(ampc-send-next-command): Handle new command options.
(ampc-skip): Don't skip beyond playlist.
(ampc-fill-status-var): New function.
(ampc-handle-status): Store playlist length. Use ampc-fill-status-var.
(ampc-handle-current-song): Use ampc-fill-status-var.
(ampc-delete): Move point to first deletion. Remove marks.
(ampc-quit): Explicitly delete process.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:43 +0000 (09:35 +0200)]
* ampc.el: Optimise parsing of MPD's output.
(ampc-iterate-source): Cache delimiter if it should be bound. Compute delimiter
regexp at compile time.
(ampc-iterate-source-output): Cache tags and tag regexps.
(ampc-extract-regexp): New macro.
(ampc-extract): Inline function. Pass regexp rather than tag. Refactor tag
cleaning to ampc-clean-tag.
All callers changed.
(ampc-clean-tag): New function.
(ampc-narrow-entry): Inline function. Do not modify point. Return start of
delimiter match.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:42 +0000 (09:35 +0200)]
* Add tagger. ampc-tagger.cpp: New file.
.gitignore: Add ampc_tagger.
ampc.el (ampc-tagger-music-directories, ampc-tagger-executable)
(ampc-tagger-backup-directory, ampc-tagger-grab-hook, ampc-tagger-grabbed-hook)
(ampc-tagger-store-hook, ampc-tagger-stored-hook)
(ampc-tagger-previous-configuration, ampc-tagger-version-verified)
(ampc-tagger-genres, ampc-files-list-mode-map, ampc-tagger-mode-map)
(ampc-tagger-dired-mode-map, ampc-tagger-completion-at-point): New variables.
(ampc-tagger-tag-face, ampc-tagger-keyword-face): New faces.
(ampc-views): Add tagger view.
(ampc-tagger-version, ampc-tagger-tags): New constants.
(ampc-mode-map): Bind ampc-tagger.
(ampc-tagger-log): New macro.
(ampc-files-list-mode, ampc-tagger-mode, ampc-tagger-log-mode): New major modes.
(ampc-tagger-dired-mode): New minor mode.
(ampc-tagger-report, ampc-tagger-call, ampc-tagger-tags-modified)
(ampc-tagger-make-backup, ampc-tagger-get-values, ampc-tagger-update)
(ampc-tag-files, ampc-tagger-complete-tag, ampc-tagger-complete-value)
(ampc-tagger-rename-artist-title): New functions.
(ampc-post-mark-change-update): Handle files list buffers.
(ampc-tagger-reset, ampc-tagger-save, ampc-tagger-quit, ampc-tagger)
(ampc-tagger-dired, ampc-tagger-completion-all-files): New commands.
(ampc-in-ampc-p): Add optional argument or-in-tagger.
All callers changed to make use of the new argument if applicable.
(ampc): Use the second view specified in ampc-views at startup.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:41 +0000 (09:35 +0200)]
* ampc.el: Show the current playlist within the playlist view.
(ampc-views): Add current playlist to playlist view.
(ampc-up, ampc-down): Use the new interface of ampc-move.
(ampc-rename-playlist, ampc-load): Message rather than error if there is no
playlist.
(ampc-delete, ampc-shuffle, ampc-clear): Use current playlist if point is in it.
(ampc-store): Append to selected playlist if NAME-OR-APPEND is numeric.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:39 +0000 (09:35 +0200)]
* ampc.el: Track windows.
(ampc-buffers, ampc-buffers-unordered): Remove.
All users changed to use ampc-normalize-windows.
(ampc-windows): New variable, remove function.
All callers changed to use ampc-normalize-windows.
(ampc-fill-internal-db, ampc-fill-internal-db-entry): Cache tree, tags and
song-props.
(ampc-normalize-windows, ampc-restore-window-configuration): New functions.
(ampc, ampc-suspend): Use ampc-restore-window-configuration.
(ampc-configure-frame-1): Fill ampc-windows. Use total window size.
(ampc-configure-frame): Transform ampc-windows.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:38 +0000 (09:35 +0200)]
* ampc.el: Use tab-stop-list for tabulated lists.
(ampc-tab-offsets): Remove.
(ampc-item-mode-map): Remap tab-to-tab-stop to ampc-move-to-tab.
(ampc-pad, ampc-set-tab-offsets): Use tab-stop-list.
All callers of ampc-pad changed.
(ampc-move-to-tab): New command.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:35 +0000 (09:35 +0200)]
* ampc.el: Minor optimizations and doc fixes.
(ampc-debug): Refine type.
(ampc-synchronous-commands): Add play.
(ampc-face): Rename to ampc-unmarked-face.
(ampc-views): Add new tags.
(ampc-yield-redisplay): New variable.
(ampc-with-selection): Ignore selection if arg is a symbol.
(ampc-outputs-mode, ampc-tag-song-mode, ampc-playlist-mode, ampc-playlist-mode)
(ampc-playlists-mode): Remove empty body.
(ampc-current-playlist-mode): Enable ampc-highlight-current-song-mode.
(ampc-item-mode): Use ampc-unmarked-face.
(ampc-mode): Set mode-line-modified to a dummy value.
(ampc-skip, ampc-set-volume-impl, ampc-set-crossfade-impl): Send unique
commands.
(ampc-playlist): Remove properties from result.
(ampc-align-point): Skip whitespace characters.
(ampc-update, ampc-send-command): Remove backquote.
(ampc-send-next-command): Bind ampc-yield-redisplay.
(ampc-narrow-entry): Return start of match.
(ampc-fill-playlists): Force playlist update.
(ampc-yield): Force redisplay only if ampc-yield-redisplay is non-nil.
(ampc-update-header): Spelling fix.
(ampc-handle-current-song): Add file.
(ampc-handle-status, ampc-toggle-play, ampc-shuffle, ampc-goto-current-song)
(ampc-fill-tag): Code simplification.
(ampc-handle-command): Call ampc-handle-listallinfo.
(ampc-handle-listallinfo): New function.
(ampc-filter): Only print output if ampc-debug is non-nil and not t.
Message command if there is an error.
(ampc-configure-frame-1): Generate buffer name and major mode from type.
Show "[Updating...]" in mode line.
(ampc-mouse-toggle-mark, ampc-unmark-all, ampc-toggle-marks, ampc-mark-impl):
Use inhibit-read-only.
(ampc-delete-playlist): Do not error when there is no playlist.
* ampc.el: Minor optimizations and doc fixes.
(ampc-debug): Refine type.
(ampc-synchronous-commands): Add play.
(ampc-face): Rename to ampc-unmarked-face.
(ampc-views): Add new tags.
(ampc-yield-redisplay): New variable.
(ampc-with-selection): Ignore selection if arg is a symbol.
(ampc-outputs-mode, ampc-tag-song-mode, ampc-playlist-mode, ampc-playlist-mode)
(ampc-playlists-mode): Remove empty body.
(ampc-current-playlist-mode): Enable ampc-highlight-current-song-mode.
(ampc-item-mode): Use ampc-unmarked-face.
(ampc-mode): Set mode-line-modified to a dummy value.
(ampc-skip, ampc-set-volume-impl, ampc-set-crossfade-impl): Send unique commands.
(ampc-playlist): Remove properties from result.
(ampc-align-point): Skip whitespace characters.
(ampc-update, ampc-send-command): Remove backquote.
(ampc-send-next-command): Bind ampc-yield-redisplay.
(ampc-narrow-entry): Return start of match.
(ampc-fill-playlists): Force playlist update.
(ampc-yield): Force redisplay only if ampc-yield-redisplay is non-nil.
(ampc-update-header): Spelling fix.
(ampc-handle-current-song): Add file.
(ampc-handle-status, ampc-toggle-play, ampc-shuffle, ampc-goto-current-song)
(ampc-fill-tag): Code simplification.
(ampc-handle-command): Call ampc-handle-listallinfo.
(ampc-handle-listallinfo): New function.
(ampc-filter): Only print output if ampc-debug is non-nil and not t.
Message command if there is an error.
(ampc-configure-frame-1): Generate buffer name and major mode from type.
Show "[Updating...]" in mode line.
(ampc-mouse-toggle-mark, ampc-unmark-all, ampc-toggle-marks, ampc-mark-impl):
Use inhibit-read-only.
(ampc-delete-playlist): Do not error when there is no playlist.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:01 +0000 (09:35 +0200)]
* ampc.el (ampc-crossfade-step): New variable.
(ampc-mode-map): Bind ampc-set-crossfade.
(ampc-setvol): Rename to ampc-set-volume-impl. All callers changed.
(ampc-set-crossfade-impl): New function.
(ampc-set-crossfade): Make this function an interactive command.
(ampc-increase-crossfade, ampc-decrease-crossfade): Use ampc-set-crossfade.
Increase/decrease crossfade by prefix argument if given.
Christopher Schmidt [Fri, 3 Aug 2012 07:35:00 +0000 (09:35 +0200)]
* ampc.el (ampc-volume-step): New variable.
(ampc-mode-map): Bind ampc-set-volume.
(ampc-setvol): New function.
(ampc-set-volume): Make this function an interactive command.
(ampc-increase-volume, ampc-decrease-volume): Use ampc-setvol.
Increase/decrease volume by prefix argument if given.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:57 +0000 (09:34 +0200)]
* ampc.el: Make ampc synchronous.
(ampc-synchronous-commands): Change to a custom variable.
(ampc-status-tags): Add type.
(ampc-no-implicit-next-dispatch): New variable.
(ampc-send-command-impl): Clarify debug output.
(ampc-send-command): Minor optimisation.
(ampc-send-next-command): Honour the new format of ampc-synchronous-commands.
(ampc-filter): Clarify debug output and honour ampc-no-implicit-next-dispatch.
(ampc-skip): Delay index evaluation to when the command is actually dispatched.
(ampc-yield): Force redisplay.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:51 +0000 (09:34 +0200)]
* ampc.el: Add mouse support for playlist commands.
(ampc-current-playlist-mode-map, ampc-playlist-mode-map)
(ampc-playlists-mode-map): Add commands.
(ampc-playlist, ampc-load, ampc-delete-playlist): Add optional argument
at-point.
(ampc-fill-playlist): Use the right buffer when padding the entries.
(ampc-mouse-delete-playlist, ampc-mouse-load): New commands.
Christopher Schmidt [Fri, 3 Aug 2012 07:34:48 +0000 (09:34 +0200)]
* ampc.el: Add ampc-mini, a command to select the song to play via
completing-read.
(ampc-mode-map): Bind ampc-mini.
(ampc-send-next-command): For hyphen-seperated commands, only send the last part
of the command.
(ampc-mini-impl): New function.
(ampc-handle-command): Handle mini-playlistinfo.
(ampc-play-this): Take optional prefix arg to select song to play by index.
(ampc-mini): New command.
Christopher Schmidt [Wed, 1 Aug 2012 12:23:56 +0000 (14:23 +0200)]
* ampc.el: Take window width into account when computing tabular cell widths.
(ampc-views): Replace :offset by :min, :max and :width properties.
(ampc-tab-offsets): New variable.
(ampc-pad): Use ampc-tab-offsets to pad input. Do not accept an alist any
more. All users of ampc-pad changed to reflect the new format.
(ampc-update-header): Move "[ Updating... ]" label to the front of the header.
(ampc-set-tab-offsets): New function.
(ampc-configure-frame-1): Call ampc-tab-offsets to compute the tabular cell
widths.
Jonathan Kotta [Mon, 21 May 2012 04:46:36 +0000 (00:46 -0400)]
Add adaptive-wrap-extra-indent.
* adaptive-wrap/adaptive-wrap.el (adaptive-wrap-extra-indent): New var.
(adaptive-wrap-fill-context-prefix): New function.
(adaptive-wrap-prefix-function): Use it.
(adaptive-wrap-prefix-mode): Add to visual-line custom group.