summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2026-01-31 16:47:07 +0100
committerPhilip Kaludercic <philipk@posteo.net>2026-01-31 16:47:07 +0100
commit4fff5e502df1421f0789d5745b7f582d34365dfb (patch)
tree5551627075c76333e66623bb75bbd119239aa70e
parent534178171e0680ef47835158922fcb1c1922cbf6 (diff)
Try to use wcurl if wget is not installed
-rw-r--r--do-at-point.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/do-at-point.el b/do-at-point.el
index 3b5cde2..4107817 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))