branch: externals/do-at-point
commit 4fff5e502df1421f0789d5745b7f582d34365dfb
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>

    Try to use wcurl if wget is not installed
---
 do-at-point.el | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/do-at-point.el b/do-at-point.el
index 3b5cde24dd..4107817f9f 100644
--- a/do-at-point.el
+++ b/do-at-point.el
@@ -152,7 +152,14 @@ of this variable.")
     (url
      (?b "Browse" ,#'browse-url)
      (?d "Download" ,#'(lambda (url)
-                         (start-process "*Download*" nil "wget" "-q" "-c" 
url)))
+                         (cond
+                          ((executable-find "wget")
+                           (start-process "*Download*" nil "wget" "-q" "-c" 
url))
+                          ((executable-find "wcurl")
+                           (start-process "*Download*" nil "wcurl" url))
+                          ;; FIXME: We should also try falling back to
+                          ;; `url-retrieve'.
+                          ((error "Failed to find external executable for 
downloads")))))
      (?g "git-clone into temp"
          ,(lambda (url)
             (let ((dir (make-temp-file (file-name-base url) t))

Reply via email to