Emacs: Fallback on various folders in ambrevar/youtube-dl-url
parent
69925afe96
commit
8aef55e2dc
|
@ -449,12 +449,16 @@ Each paragraph stand on its line."
|
|||
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*"))
|
||||
(let ((eshell-buffer-name "*youtube-dl*")
|
||||
(directory (expand-file-name (or (file-directory-p "~/temp")
|
||||
(file-directory-p "~/Videos")
|
||||
(file-directory-p "~/Downloads")
|
||||
"."))))
|
||||
(eshell)
|
||||
(when (eshell-interactive-process)
|
||||
(eshell t))
|
||||
(eshell-interrupt-process)
|
||||
(insert " cd ~/temp && youtube-dl " url)
|
||||
(insert (format " cd '%s' && youtube-dl " directory) url)
|
||||
(eshell-send-input)))
|
||||
|
||||
(provide 'functions)
|
||||
|
|
Loading…
Reference in New Issue