functions: Fix youtube-dl-url loop

master
Pierre Neidhardt 2019-01-06 12:52:48 +01:00
parent 3339f847aa
commit 822210e001
1 changed files with 4 additions and 4 deletions

View File

@ -450,10 +450,10 @@ If URL is nil, use URL at point."
(interactive)
(setq url (or url (thing-at-point-url-at-point)))
(let ((eshell-buffer-name "*youtube-dl*")
(directory (expand-file-name (or (file-directory-p "~/temp")
(file-directory-p "~/Videos")
(file-directory-p "~/Downloads")
"."))))
(directory (seq-find (lambda (dir)
(and (file-directory-p dir) (expand-file-name dir)))
'("~/temp" "~/Videos" "~/Downloads")
".")))
(eshell)
(when (eshell-interactive-process)
(eshell t))