Hi, If I don't do C-a C-k I will not kill the entire line in *EMMS Playlist*. This is nonsense.
Also, I often have to do C-k C-k since an empty line remains. This patch fixes both of these issue and makes C-k in *EMMS Playlist* more pleasant IMO. The patch should apply against master. Thanks, Rasmus -- Need more coffee. . .
>From 94fa212fc7dd34499e167d92b3901cfaec881779 Mon Sep 17 00:00:00 2001 From: Rasmus <[email protected]> Date: Sat, 25 Oct 2014 14:06:14 +0200 Subject: [PATCH] emms-playlist-mode: Improved kill-track. * emms-playlist-mode.el (emms-playlist-mode-kill-track): Kill whole line and always start at BOL. --- lisp/emms-playlist-mode.el | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/lisp/emms-playlist-mode.el b/lisp/emms-playlist-mode.el index 7f4d776..4b3268b 100644 --- a/lisp/emms-playlist-mode.el +++ b/lisp/emms-playlist-mode.el @@ -360,18 +360,21 @@ set it as current." (defun emms-playlist-mode-kill-track () "Kill track at point." (interactive) - (emms-with-inhibit-read-only-t - (let ((track (emms-playlist-track-at))) - (if track - (let ((track-region (emms-property-region (point) - 'emms-track))) - (when (and emms-player-playing-p - (emms-playlist-selected-track-at-p)) - (emms-stop) - (delete-overlay emms-playlist-mode-selected-overlay) - (setq emms-playlist-mode-selected-overlay nil)) - (kill-line)) - (kill-line))))) + (save-excursion + (emms-with-inhibit-read-only-t + (let ((track (emms-playlist-track-at)) + (kill-whole-line t)) + (beginning-of-visual-line) + (if track + (let ((track-region (emms-property-region (point) + 'emms-track))) + (when (and emms-player-playing-p + (emms-playlist-selected-track-at-p)) + (emms-stop) + (delete-overlay emms-playlist-mode-selected-overlay) + (setq emms-playlist-mode-selected-overlay nil)) + (kill-line)) + (kill-line)))))) ;; C-w (defun emms-playlist-mode-kill () -- 2.1.2
_______________________________________________ Emms-help mailing list [email protected] https://lists.gnu.org/mailman/listinfo/emms-help
