Skip to content

Commit

Permalink
Add elfeed-curl-extra-arguments customization (#175).
Browse files Browse the repository at this point in the history
The user requires the "--netrc" argument, but this argument isn't
appropriate in general.
  • Loading branch information
skeeto committed Sep 11, 2016
1 parent a7b2827 commit 65b11cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions elfeed-curl.el
Expand Up @@ -57,6 +57,15 @@
:group 'elfeed
:type 'integer)

(defcustom elfeed-curl-extra-arguments ()
"A list of additional arguments to pass to cURL.
These extra arguments are appended after Elfeed's own arguments,
and care must be taken to not interfere with Elfeed's needs. The
guideline is to avoid arguments that change anything about cURL's
output format."
:group 'elfeed
:type '(repeat string))

(defvar elfeed-curl-queue ()
"List of pending curl requests.")

Expand Down Expand Up @@ -273,6 +282,7 @@ URL can be a string or a list of URL strings."
(dolist (header headers)
(cl-destructuring-bind (key . value) header
(push (format "-H%s: %s" key value) args)))
(setf args (nconc (reverse elfeed-curl-extra-arguments) args))
(if (listp url)
(nconc (nreverse args) url)
(nreverse (cons url args)))))
Expand Down

0 comments on commit 65b11cf

Please sign in to comment.