Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions elfeed-show.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ Called without arguments."
(function-item delete-window)
function))

(defvar elfeed-show-playlist-buffer-name " elfeed-enclosures"
"Emms playlist buffer name for enclosures.")

(defvar elfeed-show-refresh-function #'elfeed-show-refresh--mail-style
"Function called to refresh the `*elfeed-entry*' buffer.")

Expand Down Expand Up @@ -94,7 +97,7 @@ Called without arguments."

(defalias 'elfeed-show-tag--unread
(elfeed-expose #'elfeed-show-tag 'unread)
"Mark the current entry unread.")
"Mark the current entry unread.")

(defun elfeed-insert-html (html &optional base-url)
"Converted HTML markup to a propertized string."
Expand Down Expand Up @@ -453,8 +456,19 @@ Prompts for ENCLOSURE-INDEX when called interactively."
(interactive (list (elfeed--enclosure-maybe-prompt-index elfeed-show-entry)))
(require 'emms) ;; optional
(with-no-warnings ;; due to lazy (require )
(emms-add-url (car (elt (elfeed-entry-enclosures elfeed-show-entry)
(- enclosure-index 1))))))
(let ((buf (get-buffer elfeed-show-playlist-buffer-name))
(title (elfeed-entry-title elfeed-show-entry))
(track (emms-track 'url (car (elt (elfeed-entry-enclosures elfeed-show-entry)
(- enclosure-index 1))))))
(emms-track-set track 'info-title title)
(unless buf
(with-current-buffer (emms-playlist-new elfeed-show-playlist-buffer-name)
(setq buf (current-buffer))
(setq emms-playlist-buffer-p t)))
(emms-playlist-set-playlist-buffer buf)
(with-current-emms-playlist
(goto-char (point-max))
(emms-playlist-insert-track track)))))

(defun elfeed-show-next-link ()
"Skip to the next link, exclusive of the Link header."
Expand Down