emms-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emms-help] Proposal for a new function: emms-pbi-delete-file


From: Mathias Dahl
Subject: [emms-help] Proposal for a new function: emms-pbi-delete-file
Date: Sun, 25 Sep 2005 18:18:58 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

I propose the following addition (or similar) to emms-pbi.el:

(defun emms-pbi-delete-file ()
  "Delete file under cursor"
  (interactive)
  (let* ((idx (emms-pbi-return-current-line-index))
         (file-name (buffer-substring-no-properties 
                     (point-at-bol) (point-at-eol))))
    (if (yes-or-no-p (format "Delete %s " file-name))
        (progn
          (emms-pbi-kill-line)
          (delete-file file-name)))))

(define-key emms-pbi-mode-map (kbd "D") 'emms-pbi-delete-file)

I sometimes find myself listening to some track that I really
dislike. Hence the need for this function... :)

I am new to EMMS (tried it first time to day) so there might be things
I have overlooked while writing this small function.

Enjoy!

/Mathias





reply via email to

[Prev in Thread] Current Thread [Next in Thread]