From 829d2f10fbde315aee63e187067f03a80a8ed5a4 Mon Sep 17 00:00:00 2001 From: forcer Date: Fri, 16 Sep 2005 12:51:00 +0000 Subject: Shuffle, sort and source-add don't move point anymore. darcs-hash:20050916125153-2189f-11149468188ec76cafabb03f51edf7870824f07f.gz --- emms.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emms.el b/emms.el index 08df47d..2cd9a17 100644 --- a/emms.el +++ b/emms.el @@ -306,14 +306,16 @@ This function uses `emms-show-format' to format the current track." This uses `emms-playlist-shuffle-function'." (interactive) (with-current-emms-playlist - (funcall emms-playlist-shuffle-function))) + (save-excursion + (funcall emms-playlist-shuffle-function)))) (defun emms-sort () "Sort the current playlist. This uses `emms-playlist-shuffle-function'." (interactive) (with-current-emms-playlist - (funcall emms-playlist-sort-function))) + (save-excursion + (funcall emms-playlist-sort-function)))) (defun emms-toggle-repeat-playlist () "Toggle whether emms repeats the playlist after it is done. @@ -827,8 +829,10 @@ See emms-source-file.el for some examples." (defun emms-source-add (source &rest args) "Add the tracks of SOURCE at the current position in the playlist." - (apply 'emms-playlist-insert-source source args) (with-current-emms-playlist + (save-excursion + (goto-char (point-max)) + (apply 'emms-playlist-insert-source source args)) (when (or (not emms-playlist-selected-marker) (not (marker-position emms-playlist-selected-marker))) (emms-playlist-select-first)))) -- cgit v1.2.3