>From 8816a9029f33ca98437ad88323ab9068f5b964fe Mon Sep 17 00:00:00 2001 From: Ivan Kanis Date: Mon, 24 Jun 2013 11:41:58 +0200 Subject: [PATCH 6/7] add emacs-wget --- emacs/gnus/shr.el | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/emacs/gnus/shr.el b/emacs/gnus/shr.el index 868956d..5f74f27 100644 --- a/emacs/gnus/shr.el +++ b/emacs/gnus/shr.el @@ -141,6 +141,7 @@ cid: URL as the argument.") (define-key map "u" 'shr-copy-url) (define-key map "v" 'shr-browse-url) (define-key map "o" 'shr-save-contents) + (define-key map "d" 'shr-wget) (define-key map "\r" 'shr-browse-url) map)) @@ -1634,6 +1635,17 @@ ones, in case fg and bg are nil." (list oldval face) (list face oldval)))))))))) +(defun shr-wget () + "Download URL under point." + (interactive) + (when (not (fboundp 'wget-api)) + (error "You need to install emacs-wget.")) + + (let ((url (get-text-property (point) 'shr-url))) + (if (not url) + (message "No URL under point") + (wget-api url nil)))) + (provide 'shr) ;; Local Variables: -- 1.7.1