My Emacs settings
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
558 B

(defun open-url-at-point (&optional arg)
"Browse the url at point.
Open the url in a www browser or, when called with a prefix
argument, in Emacs."
(interactive "P")
(let ((url (or (get-char-property (point) 'bug-reference-url)
(browse-url-url-at-point))))
(if arg
(browse-url-emacs url)
(browse-url url))))
(defun youtube-dl-at-point ()
(interactive)
(let ((url (browse-url-url-at-point))
(default-directory (expand-file-name "~/Downloads")))
(async-shell-command (format "youtube-dl %s" url))))
(provide 'open-url-at-point)