summaryrefslogtreecommitdiff
path: root/helm-net.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-03-16 09:05:44 +0100
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-03-16 09:05:44 +0100
commit1050b7650099947c72186116443f5c14c46e9f81 (patch)
treee04654a37cbf739f5d80fa8bf23f26714866d573 /helm-net.el
parent4ef8299d781715e8b889ab1b57fb77fa38a1156b (diff)
Allow configuring curl switches
* helm-net.el (helm-net-curl-switches): New, prevent progress meter by default (-s). (helm-net--url-retrieve-sync): Use it.
Diffstat (limited to 'helm-net.el')
-rw-r--r--helm-net.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/helm-net.el b/helm-net.el
index e8ec8e15..560171b6 100644
--- a/helm-net.el
+++ b/helm-net.el
@@ -148,6 +148,10 @@ Can be \"-new-tab\" (default) or \"-new-window\"."
(const :tag "New tab" "-new-tab")
(const :tag "New window" "-new-window")))
+(defcustom helm-net-curl-switches '("-s" "-L")
+ "Arguments list passed to curl when using `helm-net-prefer-curl'."
+ :group 'helm-net
+ :type '(repeat string))
;;; Additional actions for search suggestions
;;
@@ -161,7 +165,8 @@ Can be \"-new-tab\" (default) or \"-new-window\"."
(defun helm-net--url-retrieve-sync (request parser)
(if helm-net-prefer-curl
(with-temp-buffer
- (call-process "curl" nil t nil request "-L")
+ (apply #'call-process "curl"
+ nil t nil request helm-net-curl-switches)
(funcall parser))
(with-current-buffer (url-retrieve-synchronously request)
(funcall parser))))